Currently:
path.expand("~")
Gives:
"C:\\Users\\trinker\\Documents"
I want it to yield:
"C:\\Users\\trinker"
The directory for the windows command prompt is C:\Users\trinker
. This indicates that this is my windows home directory.
?path.expand
tells me to look at the rw-FAQ (LINK). This gives information above my cognitive ability. I decided to try to experiment as below:
> Sys.getenv("R_USER")
[1] "C:\\Users\\trinker\\Documents"
> normalizePath("~")
[1] "C:\\Users\\trinker\\Documents"
> Sys.getenv("R_USER") <- "C:\\Users\\trinker"
Error in Sys.getenv("R_USER") <- "C:\\Users\\trinker" :
target of assignment expands to non-language object
> normalizePath("~") <- "C:\\Users\\trinker"
Error in normalizePath("~") <- "C:\\Users\\trinker" :
target of assignment expands to non-language object
I saw:
Sys.setenv(...)
Sys.unsetenv(x)
But got scared I was messing with things I ought not be blindly messing with and decided to ask for guidance.
So again I would like to have ~
mean C:\\Users\\trinker\\
again (this was the default for my last PC) not the C:\\Users\\trinker\\Documents
it is now.