R语言常用包及介绍

来源:互联网 发布:淘宝客佣金设置好之后 编辑:程序博客网 时间:2024/05/16 01:44


安装包的命令:install.packages("packagesName")

卸载包的命令:remove.packages("packagesName")


1.rmarkdown可以将R代码插入到一个markdown文档中。然后,R生成最终文档,以各种格式替换R代码及其结果。

https://www.rstudio.com/products/rpackages/

2.shiny闪亮使得它非常容易构建交互式Web应用程序与R. Shiny有自动“反应”绑定输入和输出和广泛的预构建的小部件。
https://cran.r-project.org/web/packages/shiny/index.html

3.knitr是一个优雅,灵活和快速的动态报告生成,将R与TeX,Markdown或HTML相结合。
https://yihui.name/knitr/

4.ggplot 2是用于R的增强型数据可视化包。轻松创建令人惊叹的多层图形。ggplot2是基于图形语法的R的绘图系统,它试图占据基础和格子图形的良好部分,而不是坏的部分。它照顾了许多细节细节,使得绘制麻烦(如绘图传说),以及提供强大的图形模型,使其易于制作复杂的多层图形。
http://ggplot2.org/

5.tidyr是新的软件包,可以轻松地“整理”您的数据。整洁的数据是易于使用的数据:可以轻松地(使用dplyr),可视化(使用ggplot2或ggvis)和模型(使用R的数百个建模包)。
http://vita.had.co.nz/papers/tidy-data.html

6.readr使得读取许多类型的表格数据变得容易,包括:使用read_delim(),read_csv(),read_tsv()和read_csv2()定义文件,带read_fwf()和read_table()的固定宽度文件以及带有read_log()的Web日志文件。
https://blog.rstudio.org/2015/04/09/readr-0-1-0/

7.Lubridate是一个R包,它使日期和时间更容易工作。以下是一些简洁的旅程,一些浪漫可以为您做的事情。
https://cran.r-project.org/web/packages/lubridate/vignettes/lubridate.html

8.devtools的目的是通过提供简化许多常见任务的R功能,使您的生活更轻松。
https://cran.r-project.org/web/packages/lubridate/vignettes/lubridate.html

9.magrittr提供了一种用于使用新的前向管道运算符%>%链接命令的机制。
https://cran.r-project.org/web/packages/magrittr/index.html

10.packrat是R的依赖管理工具,用于使您的R项目更加隔离,便携和可重现。
http://rstudio.github.io/packrat/

11.stringr包旨在为常见的字符串操作提供一个干净,现代的界面
https://cran.r-project.org/web/packages/stringr/vignettes/stringr.html

12.dplyr是plyr的下一个迭代,仅关注数据帧。dplyr更快,并且具有更一致的API。
https://github.com/hadley/dplyr

13Haven allows you to load foreign data formats (SAS, Spss and Stata) in to R by wrapping the fantastic ReadStat C library.
https://github.com/hadley/haven

14.Leaflet is one of the most popular open-source JavaScript libraries for interactive maps. This R package makes it easy to integrate and control Leaflet maps in R.
https://rstudio.github.io/leaflet/

15.The R package DT provides an R interface to the JavaScript library DataTables. R data objects (matrices or data frames) can be displayed as tables on HTML pages, and DataTables provides filtering, pagination, sorting, and many other features in the tables.
https://rstudio.github.io/DT/

16..Documentation is one of the most important aspects of good code. Without it, users won’t know how to use your package, and are unlikely to do so.  The goal of roxygen2 is to make documenting your code as easy as possible.
https://cran.r-project.org/web/packages/roxygen2/vignettes/roxygen2.html

17.Testing your code is normally painful and boring. testthat tries to make testing as fun as possible, so that you get a visceral satisfaction from writing tests. Testing should be fun, not a drag, so you do it all the time.
https://github.com/hadley/testthat

18.html widgets brings the best of JavaScript data visualization to R. You can use JavaScript visualization libraries at the R console, just like plots, embed widgets in R Markdown documents and Shiny web applications, and develop new widgets using a framework that seamlessly bridges R and JavaScript.
http://www.htmlwidgets.org/

19.shinydashboard makes it easy to use Shiny to create dashboards
http://rstudio.github.io/shinydashboard/index.html.

20.pandoc 由knitr生成的markdown文件由pandoc 处理,负责创建完成的格式。

21.聚类:

常用的包: fpc,cluster,pvclust,mclust 基于划分的方法: kmeans, pam, pamk, clara 基于层次的方法: hclust, pvclust, agnes, diana 基于模型的方法: mclust 基于密度的方法: dbscan 基于画图的方法: plotcluster, plot.hclust 基于验证的方法: cluster.stats


22.分类:

常用的包: rpart,party,randomForest,rpartOrdinal,tree,marginTree,maptree,survival 决策树: rpart, ctree 随机森林: cforest, randomForest 回归, Logistic回归, Poisson回归: glm, predict, residuals 生存分析: survfit, survdiff, coxph


23.关联规则:

常用的包: arules:支持挖掘频繁项集,最大频繁项集,频繁闭项目集和关联规则 DRM:回归和分类数据的重复关联模型 APRIORI算法,广度RST算法:apriori, drm ECLAT算法: 采用等价类,RST深度搜索和集合的交集: eclat


24.序列模式:

常用的包: arulesSequences SPADE算法: cSPADE


25.时间序列:

常用的包: timsac 时间序列构建函数: ts 成分分解: decomp, decompose, stl, tsr


26.统计:

常用的包: Base R, nlme 方差分析: aov, anova 密度分析: density 假设检验: t.test, prop.test, anova, aov 线性混合模型:lme 主成分分析和因子分析:princomp


27.图表:

条形图: barplot 饼图: pie 散点图: dotchart 直方图: hist 密度图: densityplot 蜡烛图, 箱形图 boxplot QQ (quantile-quantile) 图: qqnorm, qqplot, qqline Bi-variate plot: coplot 树: rpart Parallel coordinates: parallel, paracoor, parcoord 热图, contour: contour, filled.contour 其他图: stripplot, sunflowerplot, interaction.plot, matplot, fourfoldplot,assocplot, mosaicplot 保存的图表格式: pdf, postscript, win.metafile, jpeg, bmp, png


——imbenben

0 0
原创粉丝点击