学习小组Days5笔记--CY

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.
RStudio.png

下图引自生信星球
RStudio.png

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()
dir.png
1.4赋值
8->x       #8赋值x
9->y       # 9赋值y
u<-2
sum(x,y)   #求和x+y
rm(x,u)    #删除对象

刚刚入门还有很多需要学习,加油!

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 135,087评论 19 139
  • 偶尔还能在城市中看到蓝天白云,是件多么幸运的事儿,赶早起来,趁着万物静默,偷摸着爬上天台,才发现,原来我不是城市中...
    木子言寺月阅读 231评论 0 2
  • 即羡慕又心疼现在的小朋友们。 除了自己的课要上之外,还有好多的兴趣班等着他们,书包不像以前的我们,现在是用箱子在拖...
    九悠阅读 310评论 4 6
  • 半夜十二点三十九分,刚准备入睡的我接到了一个电话: “小鱼老师,你睡了没有?” “还没有睡,这么晚打电话有什...
    亲爱的小鱼老师阅读 329评论 1 3