[BioC] Using \"model.matrix(~0 + as.factor(cancer), data=pheno)\" with \'sva\' package

Kaj Chokeshaiusaha [guest] guest at bioconductor.org
Tue Dec 3 10:36:07 CET 2013


Dear R helpers,

I'm an biologist and very new to R. I've read 'sva' and 'limma' packages. Would you please enlighten me about the design of model.matrix in 'sva' vignette?

In page 4 of the vignette, what will the whole script look like if I design the full model matrix (Let's say “mod1”) as following

mod1 = model.matrix(~0 + as.factor(cancer), data=pheno)

I try to follow the all steps using “mod1”, then end up with confusion due to my limited knowledge.
Please guide me.

With respects,
Kaj 


 -- output of sessionInfo(): 

R version 3.0.2 (2013-09-25)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8    
 [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8   
 [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] splines   parallel  stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
 [1] limma_3.16.8       pamr_1.54.1        survival_2.37-4    cluster_1.14.4    
 [5] bladderbatch_1.0.5 Biobase_2.20.1     BiocGenerics_0.6.0 sva_3.6.0         
 [9] mgcv_1.7-27        nlme_3.1-113       corpcor_1.6.6     

loaded via a namespace (and not attached):
[1] grid_3.0.2      lattice_0.20-24 Matrix_1.1-0    tools_3.0.2    


--
Sent via the guest posting facility at bioconductor.org.



More information about the Bioconductor mailing list