Day 4 - Drbingbing

Today the tasks include installing R language and RStudio. Since the instalment does not require note-taking, here I am only going to include some useful codes in my daily reflection.

To print your current work path:

getwd()

To change to a new work path:

setwd(dir="C:/Users/kingjie/Desktop/Rdata")

To list your files in your current work path:

list.files()
dir()

Some useful functions:

sum(1,2,3,4,5)
ls() #列出变量名
str(a) #打出变量a的具体信息
ls.str() #等于ls()和str()的组合
ls(all.name=TRUE)#将以.开头的对象也一并列出,相当于linux的ls -a(好像并没有什么用)

To give value to a variable:

<-
For example: x<-1+2

To delete one or more variables:

rm(b)
rm(u,c)

To list your history commends:

history()
history(10)

To clean up your screen:

ctrl+l

To save the image you created:

save.image()

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容