生信星球培训第三十二期

Day4-庚帅博方便面

2019-12-20  本文已影响0人  lconan

Tasks of the day:
1.安装R(基础)和Rstudio(人性化一些的界面)

2.粗略了解R语言是什么,干什么的,认识Rstudio的工作界面

3.学会外观设置和基本操作

4.完成第一个R做的图

plot(rnorm(50))

image.png
plot Generic function for plotting of R objects
plot(x, y, …)
x: the coordinates of points in the plot. Alternatively, a single plotting structure, function or any R object with a plot method can be provided.
y: the y coordinates of points in the plot, optional if x is an appropriate structure.
boxplot(iris$Sepal.Length~iris$Species,col = c("lightblue","lightyellow","lightpink"))

norm是正态分布,前面加r表示生成随机正态分布的序列rnorm(n)表示产生n个数

Rplot.jpeg
[图片上传中...({B4E44E17-0B36-4E20-ABAE-D6D50B3D79D6}.png.jpg-6b98f9-1576804837823-0)]
boxplot(formula, data = NULL, ..., subset, na.action = NULL)

用于绘制箱线图
formula: y~grp, y--numeric vector of data values;grp is usually a factor; y is to be split into groups according to grp
col

col: if col is non-null it is assumed to contain colors to be used to color the bodies of the box plots. By default, they are in the background color.

  1. 显示文件列表 dir()
  2. 赋值<- 快捷键:Alt+-
  3. 删除变量
rm(b)
rm(u,c)  
rm(list = ls())#清空所有变量

4.列出历史命令history()
5.清空控制台ctrl+l

这里有个问题


{B4E44E17-0B36-4E20-ABAE-D6D50B3D79D6}.png.jpg

这个网站上查manual的话可以搜出来很多。大概是只要某个包里有的function都会搜出来吧~但是没法确定具体是哪一个

上一篇 下一篇

猜你喜欢

热点阅读