生信星球培训第十三期

Day 4 - Drbingbing

2019-03-13  本文已影响1人  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()

上一篇下一篇

猜你喜欢

热点阅读