I have a workflow with three different operating systems and I use the switch
function in R
to change my working directory between them.
It works fine in Windows and macOS, but in Linux, returns a warning message and I don't know why.
I'm using Elementary OS 5.1 Hera, and that's the code:
switch (Sys.info()["sysname"],
Linux = setwd("~/Documentos/GitHub/Economic Activity Monitor"),
Darwin = setwd("~/Documents/GitHub/Economic Activity Monitor"),
Windows = setwd("~/GitHub/Economic Activity Monitor")
)
The warning message:
#Warning message:
#In normalizePath(dirname(f)) :
# path[1]="NA": No such file or directory
It changes the working directory, but I would like to understand why is returning that message only on Linux.