Bill Dunlap
2022-Jun-17 15:46 UTC
[R] Is it possible to set a default working directory for all R consoles?
Is there an environment variable containing that IP address? as.list(grep(value=TRUE, "172", Sys.getenv())) # as.list to make printing nicer If you know which variable is causing the problem you may be able to override it by setting an R-specific one. -Bill On Fri, Jun 17, 2022 at 8:28 AM IAGO GIN? V?ZQUEZ <iago.gine at sjd.es> wrote:> Hi all, > > Is there some way to set a default working directory each time R.exe is > opened? I ask this because Always that I open R 4.2.o in Windows 10 I get > the next warning messages > > Warning message: > In normalizePath(path.expand(path), winslash, mustWork) : > path[1]="\\172.19.2.44\profiles\profiles\me\Documents": Access is denied > Warning message: > In normalizePath(path.expand(path), winslash, mustWork) : > path[1]="\\172.19.2.44\profiles\profiles\me\Documents": Access is denied > Warning message: > In normalizePath(path.expand(path), winslash, mustWork) : > path[1]="\\172.19.2.44\profiles\profiles\me\Documents": Access is denied > Warning message: > In normalizePath(path.expand(path), winslash, mustWork) : > path[1]="\\172.19.2.44\profiles\profiles\me\Documents": Access is denied > > Even from cmd.exe in a C: location > > C:\Users\me>R > Warning message: > In normalizePath(path.expand(path), winslash, mustWork) : > > > path[1]="\\172.19.2.44\profiles\profiles\me\Documents": Access > is denied > Warning message: > In normalizePath(path.expand(path), winslash, mustWork) : > path[1]="\\172.19.2.44\profiles\profiles\me\Documents": Access is > denied > Warning message: > In normalizePath(path.expand(path), winslash, mustWork) : > path[1]="\\172.19.2.44\profiles\profiles\me\Documents": Access is > denied > Warning message: > In normalizePath(path.expand(path), winslash, mustWork) : > path[1]="\\172.19.2.44\profiles\profiles\me\Documents": Access is > denied > > Reading > https://cran.r-project.org/bin/windows/base/rw-FAQ.html#What-are-HOME-and-working-directories_003f, > first I cannot apply the suggested solution (I cannot see such "shortcut?s > properties"), and second, I am not interested just in Rgui, or even > RStudio, but other terminals running R (like VSCode-radian or > SublimeText-Terminus) > > Thanks in advance. > > Best wishes, > > Iago > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Spencer Graves
2022-Jun-17 16:17 UTC
[R] Is it possible to set a default working directory for all R consoles?
I use the free version of RStudio, and I routinely work with "Projects". For new projects, I first I create a new project directory in Finder (in a Mac) or Windows Explorer if it does not already exist. Then in RStudio, I do File > "New Project..." > in "Existing Directory". Then when I want to work on an existing project, I can do File > "Recent Projects" in RStudio. Or I can double click on the appropriate *.Rproj file in Finder or Windows Explorer. Hope this helps. Spencer Graves On 6/17/22 10:46 AM, Bill Dunlap wrote:> Is there an environment variable containing that IP address? > > as.list(grep(value=TRUE, "172", Sys.getenv())) # as.list to make > printing nicer > > If you know which variable is causing the problem you may be able to > override it by setting an R-specific one. > > -Bill > > On Fri, Jun 17, 2022 at 8:28 AM IAGO GIN? V?ZQUEZ <iago.gine at sjd.es> wrote: > >> Hi all, >> >> Is there some way to set a default working directory each time R.exe is >> opened? I ask this because Always that I open R 4.2.o in Windows 10 I get >> the next warning messages >> >> Warning message: >> In normalizePath(path.expand(path), winslash, mustWork) : >> path[1]="\\172.19.2.44\profiles\profiles\me\Documents": Access is denied >> Warning message: >> In normalizePath(path.expand(path), winslash, mustWork) : >> path[1]="\\172.19.2.44\profiles\profiles\me\Documents": Access is denied >> Warning message: >> In normalizePath(path.expand(path), winslash, mustWork) : >> path[1]="\\172.19.2.44\profiles\profiles\me\Documents": Access is denied >> Warning message: >> In normalizePath(path.expand(path), winslash, mustWork) : >> path[1]="\\172.19.2.44\profiles\profiles\me\Documents": Access is denied >> >> Even from cmd.exe in a C: location >> >> C:\Users\me>R >> Warning message: >> In normalizePath(path.expand(path), winslash, mustWork) : >> >> >> path[1]="\\172.19.2.44\profiles\profiles\me\Documents": Access >> is denied >> Warning message: >> In normalizePath(path.expand(path), winslash, mustWork) : >> path[1]="\\172.19.2.44\profiles\profiles\me\Documents": Access is >> denied >> Warning message: >> In normalizePath(path.expand(path), winslash, mustWork) : >> path[1]="\\172.19.2.44\profiles\profiles\me\Documents": Access is >> denied >> Warning message: >> In normalizePath(path.expand(path), winslash, mustWork) : >> path[1]="\\172.19.2.44\profiles\profiles\me\Documents": Access is >> denied >> >> Reading >> https://cran.r-project.org/bin/windows/base/rw-FAQ.html#What-are-HOME-and-working-directories_003f, >> first I cannot apply the suggested solution (I cannot see such "shortcut?s >> properties"), and second, I am not interested just in Rgui, or even >> RStudio, but other terminals running R (like VSCode-radian or >> SublimeText-Terminus) >> >> Thanks in advance. >> >> Best wishes, >> >> Iago >> >> >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. >> > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.