Day 1: Packages and Version Control

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:

  1. The DESCRIPTION contains info about the package; we edited it for our purpose.
  2. We looked at the NAMESPACE, but didn't touch it.
  3. We created our first function in the R folder, 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")

Day 2: Classic, Rich and Tidy data

'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)]))


ziqiangc/Elbo documentation built on May 4, 2019, 11:23 p.m.