Misc R functions, rmarkdown templates, etc. for making life a bit easier in the Ley Lab
Feel free to contribute! Just clone the repo, make some changes, commit, and create a pull request.
renv
R packagerenv::install("leylabmpi/LeyLabRMisc")
devtools
R packagedevtools::install_github("leylabmpi/LeyLabRMisc")
source()
functiongit clone git@github.com:leylabmpi/LeyLabRMisc.git
source("path/to/repo/init.R")
*.R
file individuallygit submodule
Rmarkdown templates are in inst/rmarkdown/templates/
To use a template:
File => New File => R Markdow ... => From Template
library(dplyr)
library(ggplot2)
library(data.table)
library(tidytable)
library(LeyLabRMisc)
# listing files
brk_cls_files = list_files(profile_dir, 'all-combined-bracken.tsv')
brk_cls_files %>% length
# reading tables
brk_cls = brk_cls_files %>% file_list(-2) %>%
plyr::llply(read_bracken) %>%
data.table::rbindlist(use.names=TRUE, idcol='dataset')
brk_cls
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.