Table of Contents
- Base
- Tutorial
- Packages
- Text
- Performance
- Data wrangling
- CLI
- ML
- Visualization
- Color
- Heatmap
- ggplot2
- Statistics
- Cluster
- File formats
- Misc
update all R packages
install.packages("rvcheck")
library(rvcheck)
update_all(check_R=FALSE)
install github repo
install.packages(c("RCurl", "curl", "httr", "openssl"))
library(devtools)
devtools::install_github("kassambara/survminer")
# if http error: manually download and install_url("file:///home/xxx/xx.tar.gz")
- R for data science
- Cheatsheets by rstudio https://github.com/rstudio/cheatsheets
- Hands-On Data Science with R
- DataPyR
- http://www.sthda.com/english/
- http://www.r-bloggers.com/search/ggplot2
- Mastering Software Development in R
- 10 R packages I wish I knew about earlier
- Great R packages for data import, wrangling & visualization
- R package development - the Leek group way!
- stringr - A fresh approach to string manipulation in R http://stringr.tidyverse.org
- Text Processing in R
- pystr - Python String Methods in R. http://cran.r-project.org/web/packages/pystr
- R语言基础知识-字符串的处理
docs
packages
- future - R package: future: Unified Parallel and Distributed Processing in R for Everyone
- furrr - simplify the combination of purrr’s family of mapping functions and future’s parallel processing capabilities.
> devtools::install_github("houyunhuang/ggcor")
Error in curl::curl_fetch_memory(url, handle = h)
error setting certificate verify locations:
CAfile: /opt/microsoft/ropen/3.5.2/lib64/R/lib/microsoft-r-cacert.pem
CApath: none
One solution :
remove.packages(c("curl","httr"))
install.packages(c("curl", "httr"))
file.edit('~/.Renviron')
CURL_CA_BUNDLE=/usr/lib/R/lib/microsoft-r-cacert.pem
http_proxy="http://127.0.0.1:12333"
https_proxy="http://127.0.0.1:12333"
Or
Sys.setenv(http_proxy="http://127.0.0.1:12333")
Sys.setenv(https_proxy="http://127.0.0.1:12333")
io
data structure
- tibble - A tibble, or tbl_df, is a modern reimagining of the data.frame, keeping what time has proven to be effective, and throwing out what is not.
tools
- tidyverse
- tidytidbits A selection of various tools to extend a data analysis workflow based on the 'tidyverse' packages
- faster-data-manipulation-7-packages
- data-wrangling-cheatsheet.pdf
- tidyr tidyr is a reframing of reshape2 designed to accompany the tidy data framework, and to work hand-in-hand with magrittr and dplyr to build a solid pipeline for data analysis.
- dplyr-and-plyr, When I use plyr/dplyr,[Using dplyr, and a comparison with plyr.]http://scicomp2014.edc.uri.edu/posts/2014-04-14-Smith.html
- dplyr: How to do data manipulation with R
- Programming with dplyr
- normalising-data-within-groups, script
- broom - Convert Statistical Analysis Objects into Tidy Data Frames
- widyr - Widen, process, and re-tidy a dataset
- themis - Extra recipes steps for dealing with unbalanced data
docs
packages
- caret - (Classification And Regression Training) R package that contains misc functions for training and plotting classification and regression models https://topepo.github.io/caret/index.html
- ROCR - visualizing classifier performance in R, with only 3 commands
- xgboost - Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Scala, C++ and more. Runs on single machine, Hadoop, Spark, Flink and DataFlow
- Large number of images: http://rgm3.lab.nig.ac.jp/RGM/R_image_list
- Static and dynamic network visualization with R
- http://rcharts.io/gallery/
- corrplot
- ordination plots
- Dendrogram: hclust
- factoextra - Visualization of the outputs of a multivariate analysis http://www.sthda.com
- Sankey from Scratch using rCharts, d3.js, and igraph
- largevis - This is an implementation of the largeVis algorithm described in (https://arxiv.org/abs/1602.00370). It also incorporates code for a very fast algorithm for estimating k-nearest neighbors.
- Vennerable - Vennerable provides Venn diagrams in R. It displays Venn and Euler diagrams for up to 9 different sets and using a variety of geometries. It allows the display of area-weighted Venn diagrams and allows fine graphical control over the result.
- alluvial - Alluvial diagrams (you can also use ggalluvial
- UpSetR - An R implementation of the UpSet set visualization technique published by Lex, Gehlenborg, et al..
- ggcorrplot - Visualization of a correlation matrix using ggplot2 https://rpkgs.datanovia.com/ggcorrplot/
book
misc
circos like
- rCircos: R package for circular plots. [last update: 2013]
- OmicCircos: R package for circular plots for omics data. vignette [last update: 2016-05]
- circlize - circular layout in R http://jokergoo.github.io/circlize
graph
- Network Visualizations in R using ggraph and graphlayouts
- Network visualization with R
- igraph, Network Analysis and Visualization with R and igraph
- graphlayouts - implements some graph layout algorithms that are not available in igraph
- ggraph - Grammar of Graph Graphics
- ggnetwork
- ggnet - Simple network plots with ggplot2 in R.
Shiny
-
shinyWidgets - shinyWidgets : Extend widgets available in shiny
- R color cheatsheet
- RColorBrewer
- colorspace - A Toolbox for Manipulating and Assessing Colors and Palettes
- ComplexHeatmap
- pheatmap
Extended packages. More: RStartHere, ggally
-
esquisse - RStudio add-in to make plots with ggplot2
-
ggthemes - Some extra themes, geoms, and scales for ggplot2.
-
hrbrthemes - Opinionated, typographic-centric ggplot2 themes and theme components
-
ggcharts - provides a high-level ggplot2 interface for creating common charts.
-
ggsci - Scientific Journal and Sci-Fi Themed Color Palettes for ggplot2
-
cowplot - provide a publication-ready theme for ggplot2. similar package: ggmatrix, ggpairs, ggscatmat
-
ggfortify - Define fortify and autoplot functions to allow ggplot2 to handle some popular R packages. http://cos.name/2015/11/ggfortify-visualization-in-one-line-of-code/
-
ggrepel - Repel overlapping text labels away from each other.
-
ggtext - Improved text rendering support for ggplot2.
ggtext::geom_richtext
. -
ggalt - Extra Coordinate Systems, Geoms and Statistical Transformations for 'ggplot2' https://cran.rstudio.com/web/packages/ggalt/ggalt.pdf ,
geom_lollipop
-
ggforce - aime primarily at ad hoc data visualization in order to investigate the data at hand, and less at utilities for composing custom plots a la D3.js.
-
sina plot:
geom_sina
: enhanced jitter strip char -
gganimate - Create easy animations with ggplot2
-
ggord - a take on ordination plots using ggplot2
-
gbiplot - A biplot based on ggplot2
-
ggvis- Interactive grammar of graphics for R
-
ggcorr: correlation matrixes with ggplot2
-
ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data.
-
ggsurv - survival curves with ggplot2
-
ggExtra Add marginal histograms to ggplot2, and more ggplot2 enhancements http://daattali.com/shiny/ggExtra-ggMarginal-demo/
-
ggradar - radar charts with ggplot2
-
ggRandomForests : Visually Exploring Random Forests
-
ggmcmc: Tools for Analyzing MCMC Simulations from Bayesian Inference
-
ggalluvial - alluvial diagrams in ggplot2
-
ggpubr - 'ggplot2' Based Publication Ready Plots
-
gggenes - Draw gene arrow maps in ggplot2
-
ggfittext - ggplot2 geoms to fit text into boxes
-
ggbeeswarm - Provides methods for beeswarm plots in ggplot2
-
gghighlight - Highlight points and lines in ggplot2
-
waffle - Make waffle (square pie) charts in R introduction
-
ggridges - Geoms to make ridgeline plots with ggplot2
-
ggwrap - ‘ggwrap’ wraps a ‘ggplot2’ plot over multiple rows, to make plots with long x axes easier to read.
-
ggbump - A geom for ggplot to create bump plots
-
ggdag - An R Package for visualizing and analyzing causal directed acyclic graphs
-
gghalves - Easy half-half geoms in ggplot2 https://erocoar.github.io/gghalves/
-
sugrrants - Calendar-based graphics
-
lindia - Extension package of linear regression diagonostic plots in ggplot2.
-
ggnewscale - Multiple Fill and Color Scales in
ggplot2
-
ggrastr - Provides a set of ggplot2 geoms to rasterize only specific layers of the plot
-
gggenomes - A grammar of graphics for comparative genomics
-
ggside - ggplot2 extension allowing for plotting various geometries as side panels using the ggplot2 API
-
ggTimeSeries - Time series visualisation. 用R语言画日历. calendarheatmap
-
ggh4x - ggplot extension: options for tailored facets, multiple colourscales and miscellaneous
-
geomtextpath - Create curved text paths in ggplot2
Tutorial
- 使用ggplot2画图 - YGC
- ggplot2-cheatsheet
- Getting started with ggplot2
- Beautiful plotting in R: A ggplot2 cheatsheet
- Recreating a famous visualisation
- http://stackoverflow.com/questions/14379737/how-can-i-make-xlab-and-ylab-visible-when-using-theme-wsj-ggthemes
- How to format plots for publication using ggplot2 (with some help from Inkscape)
- Remove grid and background from plot (ggplot2)
- Colors
- ggplot2 - Easy way to mix multiple graphs on the same page
- 2D plot with histograms for each dimension
- R Recipe: Aligning Axes in ggplot2
- making-faceted-heatmaps-with-ggplot2/
- R语言:ggplot2精细化绘图——以实用商业化图表绘图为例
- The Evolution of a ggplot (Ep. 1)
- Best practices for programming with ggplot2
- Creating and using custom ggplot2 themes0
- Getting things into the right order with
forcats
book
misc
-
Quick Multivariate data analysis (PCA, CA, MCA) and visualization
-
The R Stats Package (Adjust P-values for Multiple Comparisons, 多重检验中的FDR错误控制方法与p-value的校正及Bonferroni校正)
- rio - A Swiss-army knife for data I/O
reads xlsx/xls library(xslx)
data <- read.xlsx("datafile.xlsx", 1)
library(gdata)
# Read first sheet
data <- read.xls("datafile.xls")
- How to summarize data by group in R?
- Error in eval(expr, envir, enclos) : object ‘X' not found solution:
ggplot(..., **environment = environment()**)
- how to apply a function to every row of a matrix (or a data frame) in R
- How to apply function over each matrix element
- How do I pass variables to a custom function in ddply?
- R-Transposing a data frame
- sva - Surrogate Variable Analysis, contains functions for removing batch effects and other unwanted variation in high-throughput experiment.
- plyranges - A grammar of genomic data transformation https://sa-lee.github.io/plyranges/
Dataset
- rWikiPathways
- msigdbr
- NCG Cancer Genes
- ReactomePA Reactome Pathway Analysis
Cox Proportional-Hazards Model
- survival
- survminer
- survcomp
- survivalAnalysis - A high-level interface to perform survival analysis, including Kaplan-Meier analysis and log-rank tests and Cox regression
- TCGAmutations
- CDGS-R
- xena
- UCSCXenaTools, [intro]https://shixiangwang.github.io/home/en/post/ucscxenatools-201908/)
- vegan R package for community ecologists: popular ordination methods, ecological null models & diversity analysis https://CRAN.R-project.org/package=vegan