我第一次使用 R 我试图保存数据并再次加载它,我使用这个
> a <- 1:10
> save(a, file = "desktop/Data.Rdata")
> rm(a)
> load("desktop/Data.Rdata")
警告:
cannot open compressed file 'desktop/Data.Rdata', probable reason 'No such file or directory'
请帮帮我。
工作的人
> a <- 1:10
> getwd()
[1] "C:/Users/saramachandran/Documents"
> save(a,file="Documents/sai.R")
Error in gzfile(file, "wb") : cannot open the connection
In addition: Warning message:
In gzfile(file, "wb") :
cannot open compressed file 'Documents/sai.R', probable reason 'No such file or directory'
> save(a,file="/Documents/sai.R")
Error in gzfile(file, "wb") : cannot open the connection
In addition: Warning message:
In gzfile(file, "wb") :
cannot open compressed file '/Documents/sai.R', probable reason 'No such file or directory'
> save(a,file="C:/Users/saramachandran/Documents/sai.R")
> rm(a)
> load("C:/Users/saramachandran/Documents/sai.R")
> print(a)
[1] 1 2 3 4 5 6 7 8 9 10
>