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.
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")-
lib_ps,del_pscan library or detach packages gracefully -
dabiaoprint a messagedabiao("Message",char = "😀",n = 20): 😀😀😀😀😀😀Message😀😀😀😀😀😀 -
copy_vectorhelp to copy a vector, likedatapastapackage;copy_dfhelp to copy a dataframe -
change_fac_levcan change a factor levels;tidaican replace a vector by named vector -
update_paramupdate a parameter in a function -
sanxianprint a three-line table -
grepl.data.frameandgsub.data.framedo grepl and gsub on a dataframe.
-
read.fileread some special format files -
trans_formatconvert file format like jpg, png, svg, pdf, html… -
read_fastaandwrite_fastaread and write fasta file
-
download2download a file from a url -
download_ncbi_genome_filedownload a file from NCBI -
search_browsesearch and browse a website -
translatortranslate a text
-
remove.outliersremove the outliers -
count2imitate theuniq -cin shell -
hebinggroup your dataframe;guolvfilter a dataframe;rm_lowremove low frequency -
transtransfer your data -
mmscaledo a scale specifying the min and max -
strsplit2is better thanstrsplitfor me;t2is better thantfor me -
explodeexpand a column in dataframe;squashsquash a dataframe -
pre_number_strprepare a number string
-
twotestdo a two-group test andmultitestdo a multi-group test;group_testperforms multiple mean comparisons for a data.frame -
fittesttest a vector fit which distribution -
toXYtransfer geographical latitude and longitude to XY(m) -
lm_coefficientsget the coefficients of a linear model;multiregfit a multiple linear model
-
rgb2codeconvert between r,g,b and color code;is.ggplot.colorjudge a right color;add_alphaadd a alpha for a color -
plotpdf,plotgifprint pdf or gif for a plot list -
get_colsgenerate n colors based on a palette;scale_fill_pcandscale_color_pcare scales for ggplot -
add_themegenerate a mytheme object for ggplot -
legend_sizeresize the legend for a ggplot;ggplot_limget the x-y limits for a ggplot -
generate_labelsgenerate points position for a series of labels -
ggplot_translatortranslate the text of a ggplot
-
stackplotplot a bar plot or stack bar plot easily;areaplotplot a area plot easily -
my_sankeyplot a sankey plot -
cor_plotplot a correlation plot -
group_boxplot a boxplot easily -
gghuanplot a doughnut chart;gghuan2plot a multi-doughnut chart -
ggmosaicplot a mosaic plot -
my_lmfit a linear model and plot -
china_mapplot a china map;sample_mapplot a sample map -
gghistplot a histogram -
vennplot a venn plot -
tax_pieplot a pie plot -
tax_radarplot a radar plot -
my_circoplot a circlize plot
-
my_sunburstplot a sunburst plot -
my_circle_packingplot a circle packing plot -
my_treemapplot a treemap plot -
my_voronoi_treemapplot a voronoi treemap plot
-
make_projectbuild a R project -
add_analysiscreate a specific Rmd file -
make_gitbookbuild a git book
-
prepare_packageprepare a package -
update_NEWS_mdupdate the NEWS.md
Easter Egg: my_cat will show my little cat named GuoDong.


