File: jmfuns.rda
root.dir returns the root directory for the current computer.
root.dir(endSlash = TRUE)
The root.dir function expects that 1 of 5 cases will apply
1) R is running on a computer that has an object named root.dir.local on the search path. root.dir.local is a string that names the directory to be treated as the root directory on the current computer. If root.dir.local exists on the search path, it supercedes any other specification of the root directory and the root.dir function returns root.dir.local as its value. Thus, you can set the directory to be treated as the root directory on any computer by creating a root.dir.local that names that directory, e.g., 'root.dir.local <- "c:/mywork/".
2) R is running on JM's X220 laptop and the computer name is SPARSEGREY. In this case, root.dir returns "e:/".
3) R is running on Dad's computer and the computer name is SFMIYA2011-PC. In this case, root.dir returns "b:/ab/john/".
4) R is running on Jean's ThinkPad and the computer name is JC-THINKPAD. In this case, root.dir returns "d:/john/".
5) None of the cases, (1) - (4) applies. In this case, the root directory is the root directory on the path to the current R working directory. E.g., if getwd() returns "C:/mywork/data", then root.dir() returns "c:/".
If endSlash = TRUE, then the root specification ends in a /; otherwise it does not, e.g., root.dir( endSlash = FALSE ) returns "e:" on the x220 laptop.
#-------------- The 'doc' bookmark highlights all of the documentation but not the function skeleton at the top of the file. Use rdocToString macro to convert documentation to an R string variable. Bkmk docStringsLoc = <\#PATH\docStrings\> ---------------
Format for this html document: Page Size = Tabloid: 11" x 17". Note that Tabloid page size is available if Adobe PDF is set as the default printer, but not if the default printer is a physical printer that prints 8.5" x 11" standard paper. Table widths = 9.5"