Day 4 - Drbingbing

作者: DrBingbing | 来源:发表于2019-03-13 14:22 被阅读1次

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()

相关文章

网友评论

    本文标题:Day 4 - Drbingbing

    本文链接:https://www.haomeiwen.com/subject/btwbpqtx.html