Learn R Programming

⚠️There's a newer version (0.2.8) of this package.Take me there.

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_ps can library or detach packages gracefully

  • dabiao print a message `dabiao("Message",char = "

Copy Link

Version

Install

install.packages('pcutils')

Monthly Downloads

393

Version

0.2.7

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Peng Chen

Last Published

March 27th, 2025

Functions in pcutils (0.2.7)

gghuan2

gghuan2 for multi-doughnut chart
download2

Download File
ggplot_translator

Translate axis label of a ggplot
ggmosaic

ggmosaic for mosaic plot
ggplot_lim

Get a ggplot xlim and ylim
my_circo

My circo plot
list_to_dataframe

Trans list (with NULL) to data.frame
my_lm

Fit a linear model and plot
how_to_set_options

How to set options in a package
grepl.data.frame

Grepl applied on a data.frame
lib_ps

Attach packages or install packages have not benn installed
how_to_set_font_for_plot

How to set font for ggplot
my_voronoi_treemap

My Voronoi treemap plot
otutab

test data for pcutils package
group_test

Performs multiple mean comparisons for a data.frame
make_gitbook

Make a Gitbook using bookdown
group_box

Plot a boxplot
how_to_use_sbatch

How to use sbatch
plotpdf

Plot a multi-pages pdf
make_project

Make a R-analysis project
read_fasta

Read fasta file
igraph_translator

Translate text of igraph
gsub.data.frame

Gsub applied on a data.frame
get_cols

Get n colors
remove.outliers

Remove outliers
gghist

gg histogram
pre_number_str

Prepare a numeric string
set_pcutils_config

Set config
tax_pie

Pie plot
taxonomy

test data for pcutils package
hebing

Group your data
guolv

Filter your data
search_browse

Search and browse the web for specified terms
show_pcutils_config

Show config
write_fasta

Write a data.frame to fasta
how_to_update_parameters

How to update parameters
tidai

Replace a vector by named vector
make_py_pkg

Make a new python package
venn

Plot a general venn (upset, flower)
update_param

Update the parameters
trans

Trans format your data
hebing2

Group your data
stackplot

Plot a stack plot
split_text

Split text into parts, each not exceeding a specified character count
match_df

Match otutab and metadata
squash

Squash one column in a data.frame using other columns as id.
my_cat

Show my little cat named Guo Dong which drawn by my girlfriend.
my_circle_packing

My Circle packing plot
how_to_use_parallel

How to use parallel
little_guodong

My cat
twotest

Two-group test
sample_map

Plot the sampling map
%>%

Pipe operator
sanxian

Three-line table
translator

Translator
trans_format

Transfer the format of file
pcutils-package

pcutils: Some Useful Functions for Statistics and Visualization
is.ggplot.color

Judge if a characteristic is Rcolor
legend_size

Scale a legend size
metadata

test data for pcutils package
update_NEWS_md

Update the NEW.md for a package
my_sunburst

My Sunburst plot
lm_coefficients

Get coefficients of linear regression model
mmscale

Min_Max scale
plot.coefficients

Plot coefficients as a bar chart or lollipop chart
my_treemap

My Treemap plot
multitest

Multi-groups test
multireg

Multiple regression/ variance decomposition analysis
plotgif

Plot a gif
rm_low

Remove the low relative items in each column
rgb2code

Transform a rgb vector to a Rcolor code
read.file

Read some special format file
scale_fill_pc

Scale a fill color
scale_color_pc

Scale a fill color
prepare_package

Prepare a package
strsplit2

Split Composite Names
t2

Transpose data.frame
china_map

Plot china map
add_analysis

Add an analysis for a project
add_theme

Add a global gg_theme and colors for plots
change_fac_lev

Change factor levels
copy_vector

Copy a vector
add_alpha

Add alpha for a Rcolor
dabiao

Print some message with =
count2

Like uniq -c in shell to count a vector
del_ps

Detach packages
copy_df

Copy a data.frame
generate_labels

Generate labels position
download_ncbi_genome_file

Download genome files from NCBI based on accession number
df2link

df to link table
distance2df

Convert a distance matrix to a data frame
df2distance

Convert Three-column Data to Distance Matrix
explode

Explode a data.frame if there are split charter in one column
fittest

Fit a distribution
gghuan

Plot a doughnut chart