# save. image( file=paste( getwd ( ), Sys. time( ), sep ="/"))
save.image(file=gsub(" ","",paste(getwd(),Sys.time(),sep="/")))
save.image(file=gsub(" ","",paste(getwd(),Sys.time(),sep="/")))
}
Backup files are created under the current working directory with the time stamp.
save.image(file=paste(getwd(),format(Sys.time(), "%b%d%X"),sep="/"))
or
save.image(file=gsub(" ","",paste(getwd(),Sys.time(),sep="/"))
Will eliminate unnecessary space in the file names.
> gsub(" ","",paste(getwd(),Sys.time(),sep="/")
+ )
[1] "/Users/honomoto /2017-12-1210:08:23"
Below will improve the readability.
> gsub(" ","",paste(getwd(),gsub(" ","-",Sys.time()),sep="/"))
[1] "/Users/honomoto/R_proj/tmp1/2018-08-14-15:00:34"
>format ( Sys. time( ), "%b%d%X")
[1] "121210時03分53秒"
>Sys . setlocale( "LC_ALL",'C')
[1] "C/C/C/C/C/ja_JP.UTF-8"
>format ( Sys. time( ), "%b%d%X")
[1] "Dec1210: 04:28"
save.image(file=paste(getwd(),format(Sys.time(), "%b%d%X"),sep="/"))
save.image(file=gsub(" ","",paste(getwd(),Sys.time(),sep="/"))
Will eliminate unnecessary space in the file names.
> gsub(" ","",paste(getwd(),Sys.time(),sep="/")
+ )
[1] "/Users/
Below will improve the readability.
> gsub(" ","",paste(getwd(),gsub(" ","-",Sys.time()),sep="/"))
[1] "/Users/honomoto/R_proj/tmp1/2018-08-14-15:00:34"
>
[1] "121210時03分53秒"
>
[1] "C/C/C/C/C/ja_JP.UTF-8"
>
[1] "Dec1210
0 件のコメント:
コメントを投稿