If you want to know how many lines of code are in an Rmd file:
rmarkdown::render("file.Rmd", output_format = "md_document")
cat file.md | grep -c '^ \{4\}'
And then how many lines of code in .R files:
| > library(UpSetR) | |
| > library(org.Hs.eg.db) | |
| > all_genes <- keys(org.Hs.eg.db) | |
| > n_gene <- c(2000, 500, 1000, 900) | |
| > # create a list, where each entry is the vector of Gene IDs that were diff | |
| > # expressed in that condition |
| > anova_data <- structure(list(y = c(-72.8380122783358, -42.0699052900013, -13.2570336146187, | |
| + 35.5231083258988, - .... [TRUNCATED] | |
| > # data set: | |
| > # | |
| > # two patients, P1 and P2 | |
| > # each patient has samples from two diseases, D1 and D2 | |
| > # each of the samples from each patient in e .... [TRUNCATED] | |
| , , patient = P1 |
| { | |
| "mzML": { | |
| "schemaLocation": "http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0.xsd", | |
| "id": "exampleData", | |
| "version": "1.1.0" | |
| }, | |
| "cvList": { | |
| "cv": [ | |
| { | |
| "id": "MS", |
| > library(xml2) | |
| > mzml_file <- "test_mzml.mzML" | |
| > doc <- read_xml(mzml_file) | |
| > xml_find_all(doc, "//cvParam") | |
| {xml_nodeset (0)} | |
| > ns <- xml_ns(doc) |
| library(devtools) | |
| # install_github("wesm/feather/R") | |
| library(feather) | |
| library(microbenchmark) | |
| set.seed(3-29-16) | |
| rows <- 100000 | |
| x <- data.frame(ints = round(runif(rows, -100, 100)), stringsAsFactors = FALSE) |
If you want to know how many lines of code are in an Rmd file:
rmarkdown::render("file.Rmd", output_format = "md_document")
cat file.md | grep -c '^ \{4\}'
And then how many lines of code in .R files:
| # use case is -omics data where some samples have missing data, can | |
| # be coded as NA or 0, but can always set 0 to NA for my use cases | |
| # want the pairwise correlations, where each pairwise comparison | |
| # removes NA in either of the pairs being compared | |
| set.seed(1234) | |
| data_matrix <- matrix(rnorm(200, 0, 1), nrow = 20) | |
| na_locs <- sample(200, 10) | |
| data_matrix[na_locs] <- NA |
tar -xzf ****.tgz
./configure --prefix=/mlab/data/software/RDir --enable-R-shlib --with-recommended-packages=no --with-tcltk --with-cairo
make
make install
| --- | |
| title: "test document" | |
| --- | |
| # test | |
| this is just some simple test text to show what will happen if we ask rstudio to reflow | |
| the text | |
| ```{r and_a_code_block} |
2016-01-05 CompGO: an R package for comparing and visualizing Gene Ontology enrichment differences between DNA binding experiments. interesting take on the problem of comparing two experiments at the annotation level, especially for ways to do it without a cutoff. would be cool to try out some of these methods integrated into categoryCompare, especially wondering if we did PCA on the log odds of subgroups of annotations, or if log odds could be used as a weighting to help find sub groups of annotations.