November 2018
Intermediate to advanced
360 pages
9h 36m
English
This recipe is an aggressive simplification of the previous one because it illustrates the conciseness and elegance of R magics:
import rpy2.robjects as robjectsimport rpy2.robjects.lib.ggplot2 as ggplot2%load_ext rpy2.ipython
Note that the % starts an IPython-specific directive. Just as a simple example, you can write %R print(c(1, 2)) on a Jupyter cell.
Check out how easy it is to execute the R code without using the robjects package. Actually, rpy2 is being used to look under the hood.
%%R seq.data <- read.delim('sequence.index', header=TRUE, stringsAsFactors=FALSE) seq.data$READ_COUNT ...