R
From CSBLwiki
(Difference between revisions)
(→Tutorials) |
(→Tutorials) |
||
Line 7: | Line 7: | ||
***[http://bioconductor.org/help/course-materials/2010/SeattleJan10/ 2010 introductory course] | ***[http://bioconductor.org/help/course-materials/2010/SeattleJan10/ 2010 introductory course] | ||
*R [http://bm2.genes.nig.ac.jp/RGM2/index.php?clear=all Graphical Manual] | *R [http://bm2.genes.nig.ac.jp/RGM2/index.php?clear=all Graphical Manual] | ||
+ | :[http://www.ploscollections.org/article/info%3Adoi%2F10.1371%2Fjournal.pcbi.1000482 A Quick Guide to Teaching R Programming to Computational Biology Students] - PLoS CompBio | ||
===Tips=== | ===Tips=== | ||
*The script editor with R.gui is a convenient tool (c.f. ESS with Emacs) | *The script editor with R.gui is a convenient tool (c.f. ESS with Emacs) |
Revision as of 10:35, 13 April 2011
|
Tutorials
- R Bioconductor
- Bioconductor course materials
- R Graphical Manual
Tips
- The script editor with R.gui is a convenient tool (c.f. ESS with Emacs)
- Command + Enter (OS X) or Ctrl + R (windows)
Packages
- Installed @panflam, @panpyro
ape
- an object of class "phylo" with the following components:
- edge a two-column matrix of mode numeric where each row represents an edge of the tree; the nodes and the tips are symbolized with numbers; the tips are numbered 1, 2, ..., and the nodes are numbered after the tips. For each row, the first column gives the ancestor.
- edge.length (optional) a numeric vector giving the lengths of the branches given by edge.
- tip.label a vector of mode character giving the names of the tips; the order of the names in this vector corresponds to the (positive) number in edge.
- Nnode the number of (internal) nodes.
- node.label (optional) a vector of mode character giving the names of the nodes.
- root.edge (optional) a numeric value giving the length of the branch at the root if it exists.
DBI
seqinr
Bioconductor
Examples
UMLS
library(RMySQL) library(DBI) drv = dbDriver("MySQL") con = dbConnect(drv,username='',password='',dbname='') que = "select CUI1,CUI2,COF from MRCOC where SAB=\'CCPSS\'" ccpss = dbSendQuery(con,statement=que) ccpss.all = unlist(fetch(ccpss,n=-1)) ccpss.all = matrix(ccpss.all,length(ccpss.all)/3,3) colnames(ccpss.all) = c('CUI1','CUI2','COF') tmp = unique(c(ccpss.all[,1],ccpss.all[,2])) cof = matrix(NA,10877,10877) dimnames(cof) = list(tmp,tmp) apply(ccpss.all,1,function(x) { cof[x[1],x[2]]=x[3] }) cof[1:10,1:10]
Links
- News article about R in NYTimes