hello guys, im a newbie (more or less) at programming with R, and I havent used Rstudio since 2019, so now when I try to install some packages, I get a message saying "Warning message:
the 'rlang' package was compiled with R 3.6.3"
so I thought maybe this means I have an old version or smtg, so I installed the latest version and still no use, I still get this msg. And this poses problems when I try to import data. at first I used the rio package and it worked once and I was able to use the import function, but after few days, I retried it and it wont work. this is what it says"Error: package or namespace load failed for 'rio' in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
package 'rlang' 0.4.11 is already loaded, but >= 1.0.0 is required"
now im just trying to import a csv the traditional way but that also doesnt work, this is what I get :
setwd("C:/Users/user/Documents/targetTS/")
Error in setwd("C:/Users/user/Documents/targetTS/") :
cannot change working directory
data <- read.csv("targetTS.csv")
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'targetTS.csv': No such file or directory.
Please help Im really desperate rn, if my supervisor knows im still stuck at this step I would be in big trouble. Thanks
Run install.packages("rlang") and then read the error message, it says it cannot find C:/Users/user/Documents/targetTS/ and therefore cannot open targetTS.csv, so check that you got those directories right or even better... Run your project using projects in RStudio
Hello, I am indeed working with Rstudio, and I checked the directory from the file's properties so normally it should be correct and I tried reversing these "/" but it still didnt work.
list.files("C:/Users/user/Documents/targetTS/")
character(0)
this is what I get when I try list.files, im not sure if thats the right way to use it.
I also tried file.choose and I select the file I need, it gives me the directory or path of the file but what should I do next?
file.choose("targetTS.csv")
[1] "C:\Users\user\Documents\targetTS.csv"
the result of file.choose shows you were incorrect that there was a folder 'targetTS' involved.
rather your folder path is C:\Users\user\Documents\ and the filename is targetTS.csv
you wont be able to setwd() on a folder path that doesnt exist ; such as targetTS.
so either, you setwd() on your documents path. or you make a folder called targetTS and move targetTS.csv into it.
Downloading GitHub repo stan-dev/cmdstanr@HEAD
ββ R CMD build ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
checking for file β/private/var/folders/66/6yy31gvd2ggdrcmn0v72j0z40000gn/T/Rtmpe1DO8E/remotes97c752247d2/stan-dev-cmdstanr-7036eee/DESCRIPTIONβ ...
β preparing βcmdstanrβ:
checking DESCRIPTION meta-information ...
β checking for LF line-endings in source and make files and shell scripts
β checking for empty or unneeded directories
Omitted βLazyDataβ from DESCRIPTION
β building βcmdstanr_0.5.3.tar.gzβ
Error: 3:49: unexpected string constant
3: if (Sys.getenv("RSTUDIO") == "1" && RSTUDIO_TERM")) &&
4: Sys.info()["
^
Execution halted
Warning: installation of package β/var/folders/66/6yy31gvd2ggdrcmn0v72j0z40000gn/T//Rtmpe1DO8E/file97c1d996812/cmdstanr_0.5.3.tar.gzβ had non-zero exit statusDownloading GitHub repo rmcelreath/rethinking@HEAD
Skipping 1 packages not available: cmdstanr
ββ R CMD build ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
checking for file β/private/var/folders/66/6yy31gvd2ggdrcmn0v72j0z40000gn/T/Rtmpe1DO8E/remotes97c17c66e2e/rmcelreath-rethinking-2f01a9c/DESCRIPTIONβ ...
β preparing βrethinkingβ:
checking DESCRIPTION meta-information
β checking for LF line-endings in source and make files and shell scripts
β checking for empty or unneeded directories
β looking to see if a βdata/datalistβ file should be added
β building βrethinking_2.31.tar.gzβ
Error: 3:49: unexpected string constant
3: if (Sys.getenv("RSTUDIO") == "1" && RSTUDIO_TERM")) &&
4: Sys.info()["
^
Execution halted
Warning: installation of package β/var/folders/66/6yy31gvd2ggdrcmn0v72j0z40000gn/T//Rtmpe1DO8E/file97c646b9a33/rethinking_2.31.tar.gzβ had non-zero exit status.
I uninstalled and reinstalled R this morning with same result. I tried installing on R (not RStudio) with same result.