[R] 之 管理工作空间函数

getwd()  显示当前工作目录

setwd("mydirectory")  修改当前工作目录为mydirectory

ls()  列出当前工作空间中的对象

rm(obj)  删除一个或多个对象

help(options)  显示可用选项的说明

options()  显示或设置当前选项

history(#)  显示最近使用过的#个命令

savehistory("myfile")  保存命令历史到文件myfile中(默认为.Rhistory)

loadhistory("myfile")  载入一个命令历史文件(默认为.Rhistory)

save.image("myfile")  保存工作空间到文件myfile中(默认为.RData)

load("myfile")  读取一个工作空间到当前会话中(默认为.RData)

save(obj,file="myfile")  保存指定对象到一个文件中

q()  退出

posted on 2016-11-04 22:26  萧飞IDO  阅读(304)  评论(0编辑  收藏  举报

导航