R语言6-R简介:R帮助系统

2019-04-18

在线帮助系统

本地帮助系统

#### 关于R的基础知识 ####
help.start()


#### 关于R中的函数或关键字符 ####
## 查看sum函数的帮助文档
help(sum)
?sum
## 查看heatmap函数的帮助文档
help(heatmap)
?heatmap
## 查找所有包含histogram函数的扩展包的帮助文档
help("histogram",try.all.packages=T)
## 查找lattice包中的histogram帮助文档
help("histogram",package="lattice")

## R site search
Search help files, manuals, and mailing list archives.
## 搜索http://search.r-project.org网站的帮助页面
RSiteSearch("matlab")

## 找出名字中含有“plot”的函数
apropos("plot")
apropos("plot", mod="function")
## 列出所有在帮助页面含有字符“plot”的函数帮助文档
help.search("plot")
## 得到名为“plot”函数所在的程序包
find("plot")
## 得到名为“plot”函数的自变量列表
args("plot")

## 展示mean函数使用示例
example(mean)
## 显示hist函数使用示例
example("hist")
## 展示数据处理和绘图实例
example("example")
## 展示R语言的各种类型的绘图示例
demo(graphics)
## R 3D绘图示例
demo(persp)

## 查看Biostrings软件包自带的帮助文档
browseVignettes(package = "Biostrings")
system.file(package = "Biostrings")
## 将软件包Biostrings中Rnw格式转换成纯R代码格式
library("tools")
vigSrc = list.files(pattern = "Rnw$",
                    system.file("doc", package = "Biostrings"),
                    full.names = TRUE)
vigSrc
for (v in vigSrc) Stangle(v)