Skip to content

Commit

Permalink
6.5 first version
Browse files Browse the repository at this point in the history
  • Loading branch information
Asa12138 committed Jun 5, 2023
1 parent 3ac22cb commit 75a2114
Show file tree
Hide file tree
Showing 37 changed files with 1,472 additions and 334 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
pcutils.Rproj

.DS_Store
inst/doc
25 changes: 24 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,27 @@ Suggests:
gghalves,
pheatmap,
ggcor,
corrplot
corrplot,
ggspatial,
sf,
ggimage,
ggpmisc,
ggvenn,
Vennerable,
UpSetR,
plotrix,
RBGL,
graph,
ggradar,
ggsankey,
ggtern,
sankeyD3,
wordcloud2,
chorddiag,
circlize,
RIdeogram,
igraph,
tibble,
knitr,
rmarkdown
VignetteBuilder: knitr
19 changes: 19 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,27 +1,41 @@
# Generated by roxygen2: do not edit by hand

S3method(venn,data.frame)
S3method(venn,list)
export("%>%")
export(add_alpha)
export(add_analysis)
export(add_theme)
export(change_fac_lev)
export(china_map)
export(copy_vector)
export(cor_plot)
export(count2)
export(dabiao)
export(del_ps)
export(dna_plot)
export(explode)
export(fittest)
export(get_cols)
export(get_doi)
export(gghuan)
export(gghuan2)
export(grepl.data.frame)
export(group_box)
export(hebing)
export(how_to_update_parameters)
export(how_to_use_parallel)
export(is.ggplot.color)
export(legend_size)
export(lib_ps)
export(make_project)
export(mmscale)
export(multitest)
export(my_cat)
export(my_circo)
export(my_lm)
export(my_sankey)
export(my_synteny)
export(plotgif)
export(plotpdf)
export(read.file)
Expand All @@ -31,10 +45,15 @@ export(rgb2code)
export(sanxian)
export(stackplot)
export(strsplit2)
export(tax_pie)
export(tax_radar)
export(tax_wordcloud)
export(toXY)
export(trans_format)
export(triangp)
export(twotest)
export(update_param)
export(venn)
export(write_fasta)
import(dplyr)
import(ggplot2)
Expand Down
27 changes: 27 additions & 0 deletions R/l_tools.R
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,33 @@ grepl.data.frame <- function(pattern, x, ...) {
y
}

#' Group your data
#'
#' @param otutab dataframe
#' @param group group vector
#' @param margin 1 for row and 2 for column(default: 2)
#' @param act do (default: mean)
#'
#' @export
#'
#' @examples
#' data(otutab)
#' hebing(otutab,metadata$Group)
hebing<-function(otutab,group,margin=2,act='mean'){
if (margin==2) {
stats::aggregate(t(otutab),FUN=act,by=list(factor(group)))->a
a[,-1]->a
data.frame(t(a))->a
levels(factor(group))->colnames(a)
}
else{
stats::aggregate(otutab,FUN=act,by=list(factor(group)))->a
a[,-1]->a
levels(factor(group))->rownames(a)
}
return(a)
}

#' Split Composite Names
#'
#' @param x character vector
Expand Down
10 changes: 10 additions & 0 deletions R/otutab.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,13 @@ NULL
#'}
#'
NULL

#'@title My cat.
#'@description my little cat named Guo Dong which drawn by my girlfriend.
#'
#'@docType data
#'@name little_guodong
#'@usage otutab
#'@format rastergrob object.
#'
NULL
Loading

0 comments on commit 75a2114

Please sign in to comment.