This is my day 4 homework of BIC by 生信星球.
The content for today is the introduction of R and R studio.
Watch the tutorial video on bilibli: https://www.bilibili.com/video/BV1J44y1R7ci/?share_source=copy_web&vd_source=ba670d5a7ca081b044384f15866b88ef
All done.
an interesting exaple of r application:
plot(rnorm(50))
#plot() is a default scatterplot function in r.
#rnorm() generates n random numbers from a normal distribution with the mean and sd you specify.
another example:
boxplot(iris$Sepal.Length~iris$Species,col = c("lightblue","lightyellow","lightpink"))
Tools -> Appearence->Global options
Read a previous paper for this point.
https://mp.weixin.qq.com/s/G-LXN9P2HVLv9v0cvyFJMA
setwd() #设置工作目录
getwd() #查看工作目录
> dir()
> list.files()
add, minus, multiple, divide, and log (skip).
syntax: <-
x <- 1+2
my question is what is the difference between <- and =?
example:
a <- 5 #赋值 a
b <- 18 #赋值b
c <- 26 #赋值c
u <- a + b #赋值u
rm(b) #删除 b
rm(u,c) #删除 u,c
rm(list = ls()) #清空所有变量
tips: tab key for filling in the rest of command or file name as far as it can automatically.
history()
fast keys:
ctrl + l
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。