Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
"~/Desktop" for setwd() isn't the OS standard Desktop in Windows #435
As mentioned in https://carpentries.topicbox.com/groups/discuss/Tdeb023c3d8873d39-M4f43fa22d3ee362bf2d9fca9/r-setwd-desktop-in-windows and confirmed by Ashwin Srinath and Pariksheet Nanda, the use of
in Windows, can send users to one folder that isn't one Desktop folder that isn't the same as the one they normally see.
We should add a note to this on the Instructors Note or a call out box on the lesson itself (when we introduce
This is related to how R defines home folder after tilde expansion. On Windows it is
although this has a side effect when calling R from a directory, or using an R project in Rstudio -- you'll still end up in
when R is installed on a Windows machine, the default start icon parameters are:
So the fix seems to be to tell Windows users to fix their start icon properties. Change the "start" path to
(or to wherever they installed R). Then ALSO change the "Start in:" path to
(obviously not using "Foo" but the users actual username). Then R will start at the users Desktop every time.