R语言学习网址和图书(引自生信星球)
1.官网:https://www.r-project.org/
2.CRAN:https://cran.r-project.org/
3.书籍:R语言实战(第2版)
4.腾讯课堂自行搜索入门课程
RStudio features(引自RStudio)
RStudio is an integrated development environment (IDE) for the R programming language. Some of its features include:
- Customizable workbench with all of the tools required to work with R in one place (console, source, plots, workspace, help, history, etc.).
- Syntax highlighting editor with code completion.
- Execute code directly from the source editor (line, selection, or file).
- Full support for authoring Sweave and TeX documents.
- Runs on all major platforms (Windows, Mac, and Linux) and can also be run as a server, enabling multiple users to access the RStudio IDE using a web browser. project website.
R命令
1.1随机数的产生runif
语法:runif(n,min=0,max=1) n表示生成的随机数数量,min表示均匀分布的下限,max表示均匀分布的上限;若省略参数min、max,则默认生成[0,1]上的均匀分布随机数。
> plot(runif(50)) #默认产生50个0到1之间分布均匀的随机数,并绘图
1.2查看和设置工作目录
> getwd() # 查看工作目录
>setwd(dir=""C:/Users/Administrator/Documents"") #设置工作目录
1.3显示目录文件
dir()
list.flies()
1.4赋值
8->x #8赋值x
9->y # 9赋值y
u<-2
sum(x,y) #求和x+y
rm(x,u) #删除对象
刚刚入门还有很多需要学习,加油!