vertesy / CodeAndRoll2

A set of more than >130 productivity functions: vector, matrix, list manipulations and math. Used by MarkdownReports, ggExpress, SeuratUtils, etc.
https://vertesy.github.io/CodeAndRoll2
GNU General Public License v3.0
3 stars 0 forks source link
list matrix r utility vector

Cite via: DOI

CodeAndRoll2

Packaged version of the core functionalities (vector, matrix and list manipulations; math) of the formerly used CodeAndRoll (v1). A standalone set of more than >130 productivity functions.

Used by MarkdownReports, ggExpress, Seurat.utils.

CodeAndRoll2 depends on:

... and provides functions for


Installation

Install directly from GitHub via devtools with one R command:

# install.packages("devtools"); # If you don't have it.
require("devtools")

# Install dependencies
devtools::install_github(repo = "vertesy/Stringendo", upgrade = F)
devtools::install_github(repo = "vertesy/ReadWriter", upgrade = F)

# Install CodeAndRoll2
devtools::install_github(repo = "vertesy/CodeAndRoll2", upgrade = F)

...then simply load the package:

require("CodeAndRoll2")

Alternatively, you simply source it from the web. This way function help will not work, and you will have no local copy of the code on your hard drive.

source("https://raw.githubusercontent.com/vertesy/CodeAndRoll2/master/CodeAndRoll2/R/CodeAndRoll2.R")


Troubleshooting

If you encounter a bug, something doesn't work or unclear, please let me know by raising an issue on CodeAndRoll2 – Please check if it has been asked.



Function relationships

(of connected functions)

 flowchart LR 

  zigzagger(zigzagger) --> intermingle2vec(intermingle2vec)
  which_names_grep(which_names_grep) --> grepv(grepv)
  table_fixed_categories(table_fixed_categories) --> pc_TRUE(pc_TRUE)
  symdiff.ls(symdiff.ls) --> symdiff(symdiff)
  rowSEM(rowSEM) --> sem(sem)
  rowGeoMeans(rowGeoMeans) --> geomean(geomean)
  rowCV(rowCV) --> cv(cv)
  movingSEM(movingSEM) --> sem(sem)
  merge_numeric_df_by_rn(merge_numeric_df_by_rn) --> symdiff(symdiff)
  merge_ls_of_named_vec_as_df_cols(merge_ls_of_named_vec_as_df_cols) --> unlapply(unlapply)
  merge_dfs_by_rn(merge_dfs_by_rn) --> idim(idim)
  merge_1col_dfs_by_rn(merge_1col_dfs_by_rn) --> union.ls(union.ls)
  median_normalize(median_normalize) --> colMedians(colMedians)
  mdlapply2df(mdlapply2df) --> arr.of.lists.2.df(arr.of.lists.2.df)
  mdlapply2df(mdlapply2df) --> copy.dimension.and.dimnames(copy.dimension.and.dimnames)
  mdlapply(mdlapply) --> copy.dimension.and.dimnames(copy.dimension.and.dimnames)
  ls2categvec(ls2categvec) --> unlapply(unlapply)
  list2fullDF.presence(list2fullDF.presence) --> matrix.fromNames(matrix.fromNames)
  list2fullDF.byNames(list2fullDF.byNames) --> matrix.fromNames(matrix.fromNames)
  list.2.replicated.name.vec(list.2.replicated.name.vec) --> unlapply(unlapply)
  intermingle.cbind(intermingle.cbind) --> matrix.fromNames(matrix.fromNames)
  intermingle.cbind(intermingle.cbind) --> intermingle2vec(intermingle2vec)
  intermingle.cbind(intermingle.cbind) --> symdiff(symdiff)
  intermingle.cbind(intermingle.cbind) --> idim(idim)
  imovingSEM(imovingSEM) --> sem(sem)
  idimnames(idimnames) --> idim(idim)
  getRows(getRows) --> which_names(which_names)
  which_names(which_names) --> as.logical.wNames(as.logical.wNames)
  getCols(getCols) --> which_names(which_names)
  getCols(getCols) --> symdiff(symdiff)
  fix_tibble_lists(fix_tibble_lists) --> get_col_types(get_col_types)
  df.remove.empty.rows.and.columns(df.remove.empty.rows.and.columns) --> pc_TRUE(pc_TRUE)
  df.remove.empty.rows.and.columns(df.remove.empty.rows.and.columns) --> idim(idim)
  sem(sem) --> na.omit.strip(na.omit.strip)
  colSEM(colSEM) --> sem(sem)
  colGeoMeans(colGeoMeans) --> geomean(geomean)
  colCV(colCV) --> cv(cv)
  as.list.df.by.row(as.list.df.by.row) --> zero.omit(zero.omit)
  as.list.df.by.row(as.list.df.by.row) --> na.omit.strip(na.omit.strip)
  as.list.df.by.col(as.list.df.by.col) --> zero.omit(zero.omit)
  as.list.df.by.col(as.list.df.by.col) --> na.omit.strip(na.omit.strip)
  any.duplicated.rownames.ls.of.df(any.duplicated.rownames.ls.of.df) --> any.duplicated(any.duplicated)

created by convert_igraph_to_mermaid()


List of Functions in CodeAndRoll2 (166)

Updated: 2024/10/23 18:22

In 2021, function libraries got reorganized as below:

R-package Tree

Vertesy, 2023. Cite via: DOI