Some Useful Functions for Statistics and Visualization.
pcutils 
pcutils is a package that contains some useful functions for me, it offers a range of utilities and functions for everyday programming tasks.
The HTML documentation of the latest version is available at Github page.
Installation
The stable version is available on CRAN:
install.packages("pcutils")
Or you can install the development version of pcutils from GitHub with:
# install.packages("devtools")
devtools::install_github("Asa12138/pcutils")
Little tools
lib_ps,del_pscan library or detach packages gracefullydabiaoprint a messagedabiao("Message",char = "π",n = 20): ππππππMessageππππππcopy_vectorhelp to copy a vector, likedatapastapackage;copy_dfhelp to copy a dataframechange_fac_levcan change a factor levels;tidaican replace a vector by named vectorupdate_paramupdate a parameter in a functionsanxianprint a three-line tablegrepl.data.frameandgsub.data.framedo grepl and gsub on a dataframe.
for file
read.fileread some special format filestrans_formatconvert file format like jpg, png, svg, pdf, htmlβ¦read_fastaandwrite_fastaread and write fasta file
for web
download2download a file from a urldownload_ncbi_genome_filedownload a file from NCBIsearch_browsesearch and browse a websitetranslatortranslate a text
Statistics
data preprocessing
remove.outliersremove the outlierscount2imitate theuniq -cin shellhebinggroup your dataframe;guolvfilter a dataframe;rm_lowremove low frequencytranstransfer your datammscaledo a scale specifying the min and maxstrsplit2is better thanstrsplitfor me;t2is better thantfor meexplodeexpand a column in dataframe;squashsquash a dataframepre_number_strprepare a number string
statistical test
twotestdo a two-group test andmultitestdo a multi-group test;group_testperforms multiple mean comparisons for a data.framefittesttest a vector fit which distributiontoXYtransfer geographical latitude and longitude to XY(m)lm_coefficientsget the coefficients of a linear model;multiregfit a multiple linear model
Visualization
utils for plot
rgb2codeconvert between r,g,b and color code;is.ggplot.colorjudge a right color;add_alphaadd a alpha for a colorplotpdf,plotgifprint pdf or gif for a plot listget_colsgenerate n colors based on a palette;scale_fill_pcandscale_color_pcare scales for ggplotadd_themegenerate a mytheme object for ggplotlegend_sizeresize the legend for a ggplot;ggplot_limget the x-y limits for a ggplotgenerate_labelsgenerate points position for a series of labelsggplot_translatortranslate the text of a ggplot
plot functions

stackplotplot a bar plot or stack bar plot easily;areaplotplot a area plot easilymy_sankeyplot a sankey plotcor_plotplot a correlation plotgroup_boxplot a boxplot easilygghuanplot a doughnut chart;gghuan2plot a multi-doughnut chartmy_lmfit a linear model and plotchina_mapplot a china map;sample_mapplot a sample mapgghistplot a histogramvennplot a venn plottax_pieplot a pie plottax_radarplot a radar plotmy_circoplot a circlize plot

my_sunburstplot a sunburst plotmy_circle_packingplot a circle packing plotmy_treemapplot a treemap plotmy_voronoi_treemapplot a voronoi treemap plot
Project
make_projectbuild a R projectadd_analysiscreate a specific Rmd filemake_gitbookbuild a git book
Package
prepare_packageprepare a packageupdate_NEWS_mdupdate the NEWS.md
Easter EggοΌ my_cat will show my little cat named GuoDong.