We learned to create a package using devtools. The way to get started is to create a skeleton of a package.
library(devtools) create("Elbo")
This creates a directory with a couple files and a folder. We then did the following:
hi()
.We then used roxygen2 to add documentation to the function,
including inforamtion about parameters and return values.
We also used tags (@export
) to indicate that we want to 'export' the function
from the namespace.
We also learn to manage source code with github.
Here's the result of our work:
library(Elbo) hi("Ziqiang")
'Classic' data is represented as a `data.frame()' with sample as rows and feature as columns.
pdatafl = "C:/Users/ziqiangc/Dropbox/RDevWorkshop/Elbo/ALL-phenoData.csv" exprfl = "C:/Users/ziqiangc/Dropbox/RDevWorkshop/Elbo/ALL-expression.csv" classic <- input_classic(pdatafl, exprfl) classic[1:5,c(1:3, 22:24)]
One of the things we did was to plot the distribution of expression values across genes.
hist(colMeans(classic[, -(1:22)]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.