R : Copyright 2005, The R Foundation for Statistical Computing Version 2.1.1 (2005-06-20), ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for a HTML browser interface to help. Type 'q()' to quit R. > ### *
> ### > attach(NULL, name = "CheckExEnv") > assign(".CheckExEnv", as.environment(2), pos = length(search())) # base > ## add some hooks to label plot pages for base and grid graphics > setHook("plot.new", ".newplot.hook") > setHook("persp", ".newplot.hook") > setHook("grid.newpage", ".gridplot.hook") > > assign("cleanEx", + function(env = .GlobalEnv) { + rm(list = ls(envir = env, all.names = TRUE), envir = env) + RNGkind("default", "default") + set.seed(1) + options(warn = 1) + delayedAssign("T", stop("T used instead of TRUE"), + assign.env = .CheckExEnv) + delayedAssign("F", stop("F used instead of FALSE"), + assign.env = .CheckExEnv) + sch <- search() + newitems <- sch[! sch %in% .oldSearch] + for(item in rev(newitems)) + eval(substitute(detach(item), list(item=item))) + missitems <- .oldSearch[! .oldSearch %in% sch] + if(length(missitems)) + warning("items ", paste(missitems, collapse=", "), + " have been removed from the search path") + }, + env = .CheckExEnv) > assign("..nameEx", "__{must remake R-ex/*.R}__", env = .CheckExEnv) # for now > assign("ptime", proc.time(), env = .CheckExEnv) > grDevices::postscript("maanova-Examples.ps") > assign("par.postscript", graphics::par(no.readonly = TRUE), env = .CheckExEnv) > options(contrasts = c(unordered = "contr.treatment", ordered = "contr.poly")) > options(warn = 1) > library('maanova') Attaching package: 'maanova' The following object(s) are masked from package:datasets : volcano > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "Rmaanova.version" > > ### * Rmaanova.version > > flush(stderr()); flush(stdout()) > > ### Name: Rmaanova.version > ### Title: Display the current version of the package > ### Aliases: Rmaanova.version > ### Keywords: utilities > > ### ** Examples > > Rmaanova.version() Current R/maanova version is 0.98-5 > > > > cleanEx(); ..nameEx <- "abf1" > > ### * abf1 > > flush(stderr()); flush(stdout()) > > ### Name: abf1.raw > ### Title: Data for a 18-array affymetrix experiment > ### Aliases: abf1.raw abf1 > ### Keywords: datasets > > ### ** Examples > > data(abf1.raw) Warning in data(abf1.raw) : data set 'abf1.raw' not found > > > > cleanEx(); ..nameEx <- "adjPval" > > ### * adjPval > > flush(stderr()); flush(stdout()) > > ### Name: adjPval > ### Title: Generate FDR adjusted P values for F test result. > ### Aliases: adjPval > ### Keywords: utilities > > ### ** Examples > > data(paigen) > paigen <- createData(paigen.raw, n.rep=2) > model.noint.fix <- makeModel(data=paigen, formula=~Array+Dye+Spot+Strain+Diet) > # F-test strain effect > ## Not run: > ##D test.strain.fix <- matest(paigen, model.noint.fix, term="Strain", n.perm=100, > ##D shuffle.method="resid", test.method=rep(1,4)) > ##D # make FDR adjusted P values > ##D test.strain.fix <- adjPval(test.strain.fix) > ## End(Not run) > # there will be new fields in test.strain.fix after this > > > > cleanEx(); ..nameEx <- "arrayview" > > ### * arrayview > > flush(stderr()); flush(stdout()) > > ### Name: arrayview > ### Title: View the layout of input data > ### Aliases: arrayview > ### Keywords: hplot > > ### ** Examples > > ## Not run: > ##D data(dbldyeswap) > ##D ############################ > ##D # arrayview plot on rawdata > ##D ############################ > ##D # arrayview raw data on screen > ##D arrayview(rawdata) > ##D graphics.off() > ##D # arrayview raw data array 1 and 3 and output to postscript file > ##D postscript(file="dbldyeswapArrayview.ps") > ##D arrayview(rawdata, array=c(1,3), onScreen=FALSE) > ##D > ##D ############################ > ##D # RI plot on madata > ##D ############################ > ##D # make madata object without collapsing replicates > ##D data2 <- createData(rawdata, n.rep=2, avgreps=0) > ##D arrayview(data2) > ##D graphics.off() > ## End(Not run) > > # once the replicates are collapsed, > # arrayview will be unavailable > ## Not run: data1 <- createData(rawdata, n.rep=2, avgreps=1) > ## Not run: arrayview(data1) # get an error here > > > > cleanEx(); ..nameEx <- "consensus" > > ### * consensus > > flush(stderr()); flush(stdout()) > > ### Name: consensus > ### Title: Build consensus tree out of bootstrap cluster result > ### Aliases: consensus > ### Keywords: cluster > > ### ** Examples > > # load in data > data(paigen) > # make data object with rep 2 > paigen <- createData(paigen.raw, 2) > # make interactive model > model.int.fix <- makeModel(data=paigen, + formula=~Dye+Array+Strain+Diet+Strain:Diet) > # fit ANOVA model > anova.int <- fitmaanova(paigen, model.int.fix) > # test interaction effect > ## Not run: test.int.fix <- matest(paigen, model.int.fix, term="Strain:Diet", n.perm=100) > ##D # pick significant genes - pick the genes selected by Fs test > ##D idx <- volcano(test.int.fix)$idx.Fs > ##D > ##D # do k-means cluster on genes > ##D gene.cluster <- macluster(anova.int, "Strain:Diet", idx, "gene", > ##D "kmean", kmean.ngroups=5) > ##D # get the consensus group > ##D consensus(gene.cluster, 0.5) > ##D > ##D # HC cluster on samples > ##D sample.cluster <- macluster(anova.int, "Strain:Diet", idx, "sample","hc") > ##D # get the consensus group > ##D consensus(sample.cluster, 0.5) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "createData" > > ### * createData > > flush(stderr()); flush(stdout()) > > ### Name: createData > ### Title: Calculate and create a data object for Micro Array experiment > ### Aliases: createData > ### Keywords: utilities > > ### ** Examples > > ################# > # 2-dye arrays > ################# > data(paigen) > # create data object with replicate > data2 <- createData(paigen.raw, n.rep=2) > # summarize the data object > summary(data2) Summary for this experiment Number of dyes: 2 Number of arrays: 28 Number of genes: 300 Number of replicates: 2 Transformation method: log2 Replicate collapsed: FALSE > # create data with averaging of replicates > data1 <- createData(paigen.raw, n.rep=2, avgreps=1) > summary(data1) Summary for this experiment Number of dyes: 2 Number of arrays: 28 Number of genes: 300 Number of replicates: 1 Transformation method: log2 Replicate collapsed: TRUE > > #################################################################### > # affy array - data is pre-transformed so log2 is skipped > #################################################################### > data(abf1) > abf1 <- createData(abf1.raw, n.rep=1, log.trans=FALSE) > summary(abf1) Summary for this experiment Number of dyes: 1 Number of arrays: 18 Number of genes: 500 Number of replicates: 1 Transformation method: None Replicate collapsed: FALSE > > > > cleanEx(); ..nameEx <- "dbldyeswap" > > ### * dbldyeswap > > flush(stderr()); flush(stdout()) > > ### Name: rawdata > ### Title: Data for a double dye-swap experiment > ### Aliases: rawdata dbldyeswap > ### Keywords: datasets > > ### ** Examples > > data(rawdata) Warning in data(rawdata) : data set 'rawdata' not found > > > > cleanEx(); ..nameEx <- "dyeswapfilter" > > ### * dyeswapfilter > > flush(stderr()); flush(stdout()) > > ### Name: dyeswapfilter > ### Title: Gene filter for dye-swap experiment > ### Aliases: dyeswapfilter > ### Keywords: models > > ### ** Examples > > ## Not run: > ##D data(dbldyeswap) > ##D # riplot before filtering > ##D riplot(rawdata) > ##D # filter the gene > ##D rawdata <- dyeswapfilter(rawdata) > ##D # riplot again - some genes are highlighted > ##D riplot(rawdata) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "fitmaanova" > > ### * fitmaanova > > flush(stderr()); flush(stdout()) > > ### Name: fitmaanova > ### Title: Fit ANOVA model for Micro Array experiment > ### Aliases: fitmaanova > ### Keywords: models > > ### ** Examples > > ################################### > # fixed model fitting > ################################### > # load in Paigen's data > data(paigen) > # make data object with rep 2 > paigen <- createData(paigen.raw, 2) > # Note that the data is normalized so normalization is skipped > # full model > model.full.fix <- makeModel(data=paigen, + formula=~Dye+Array+Spot+Strain+Diet+Strain:Diet) > anova.full.fix <- fitmaanova(paigen, model.full.fix) > # residual plot > resiplot(paigen, anova.full.fix) > > ####################################### > # mixed model fitting - > # Array, Spot and biological > # replicates are random effects. > # This may take a while to finish > ####################################### > ## Not run: > ##D model.full.mix <- makeModel(data=paigen, > ##D formula=~Dye+Array+Spot+Strain+Diet+Strain:Diet+Sample, > ##D random=~Array+Spot+Sample) > ##D anova.full.mix <- fitmaanova(paigen, model.full.mix, method="REML") > ##D # residual plot > ##D resiplot(paigen, anova.full.mix) > ##D # variance component plot > ##D varplot(anova.full.mix) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "fom" > > ### * fom > > flush(stderr()); flush(stdout()) > > ### Name: fom > ### Title: Figure of Merit > ### Aliases: fom > ### Keywords: models > > ### ** Examples > > # load in data > data(paigen) > # make data object with rep 2 > paigen <- createData(paigen.raw, 2) > # make interactive model > model.int.fix <- makeModel(data=paigen, + formula=~Dye+Array+Strain+Diet+Strain:Diet) > # fit ANOVA model > ## Not run: > ##D anova.int <- fitmaanova(paigen, model.int.fix) > ##D # test interaction effect > ##D test.int.fix <- matest(paigen, model.int.fix, term="Strain:Diet", n.perm=100) > ##D # pick significant genes - pick the genes selected by Fs test > ##D idx <- volcano(test.int.fix)$idx.Fs > ##D # generate FOM > ##D m <- fom(anova.int, idx, "Strain:Diet", 10) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "geneprofile" > > ### * geneprofile > > flush(stderr()); flush(stdout()) > > ### Name: geneprofile > ### Title: Expression plot for selected genes > ### Aliases: geneprofile > ### Keywords: hplot > > ### ** Examples > > # load in data > data(paigen) > # make data object with rep 2 > paigen <- createData(paigen.raw, 2) > # make an additive model > model.add.fix <- makeModel(data=paigen, formula=~Dye+Array+Strain+Diet) > # fit ANOVA model > anova.add <- fitmaanova(paigen, model.add.fix) > # test strain effect > ## Not run: test.Strain.fix <- matest(paigen, model.add.fix, term="Strain", n.perm=100) > ##D # volcano plot > ##D idx <- volcano(test.Strain.fix) > ##D > ##D # do gene profile for the selected genes > ##D geneprofile(anova.add, "Strain", idx$idx.all) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "gridcheck" > > ### * gridcheck > > flush(stderr()); flush(stdout()) > > ### Name: gridcheck > ### Title: Plot grid-by-grid data comparison for arrays > ### Aliases: gridcheck > ### Keywords: hplot > > ### ** Examples > > ## Not run: > ##D # load in data > ##D data(dbldyeswap) > ##D # grid check on all arrays > ##D gridcheck(rawdata, margin=c(1,1,1,1)) > ##D graphics.off() > ##D # grid check array 1 versus array 2 > ##D gridcheck(rawdata, array1=1, array2=2, margin=c(1,1,1,1)) > ##D graphics.off() > ## End(Not run) > > > > cleanEx(); ..nameEx <- "kidney" > > ### * kidney > > flush(stderr()); flush(stdout()) > > ### Name: kidney.raw > ### Title: Kidney Data from CAMDA > ### Aliases: kidney.raw kidney > ### Keywords: datasets > > ### ** Examples > > data(kidney.raw) Warning in data(kidney.raw) : data set 'kidney.raw' not found > > > > cleanEx(); ..nameEx <- "maanova-internal" > > ### * maanova-internal > > flush(stderr()); flush(stdout()) > > ### Name: maanova-internal > ### Title: Internal maanova functions > ### Aliases: JS JSshrinker buildtree calPval calVolcanoXval caldf > ### check.confounding checkContrast cluster2num consensus.hc > ### consensus.kmean dist.cor findgroup getPval.volcano glowess intprod > ### linlog linlog.engine linlogshift locateTerm make.ratio makeAB > ### makeCompMat makeD makeDesign makeHq makeShuffleGroup makeZiZi > ### makelevel matest.engine matest.perm meanvarlog plot.consensus.hc > ### plot.consensus.kmean print.maanova print.madata print.summary.madata > ### print.summary.mamodel ratioVarplot rlowess shift shuffle.maanova > ### solveMME summary.madata summary.mamodel volcano.ftest volcano.ttest > ### blkdiag colmax colmin makeContrast matrank matsort mixed norm num2yn > ### ones parseformula pinv repmat rowmax rowmin sumrow zeros fdr > ### Keywords: internal > > ### ** Examples > > # for matsort > a<-matrix(c(1,6,4,3,5,2),2,3) > matsort(a,1) [,1] [,2] [,3] [1,] 1 3 2 [2,] 6 4 5 > matsort(a,2) [,1] [,2] [,3] [1,] 1 4 5 [2,] 2 3 6 > > # for ones and zeros > ones(c(2,2)) [,1] [,2] [1,] 1 1 [2,] 1 1 > zeros(c(2,3,2)) , , 1 [,1] [,2] [,3] [1,] 0 0 0 [2,] 0 0 0 , , 2 [,1] [,2] [,3] [1,] 0 0 0 [2,] 0 0 0 > > # for repmat > a<-c(1,2) > repmat(a,2,1) mat [1,] 1 [2,] 2 [3,] 1 [4,] 2 > a<-matrix(1:4,2,2) > repmat(a,1,2) [,1] [,2] [,3] [,4] [1,] 1 3 1 3 [2,] 2 4 2 4 > > # for blkdiag > a<-matrix(1:4,2,2) > b<-matrix(3:6,2,2) > blkdiag(a,b) [,1] [,2] [,3] [,4] [1,] 1 3 0 0 [2,] 2 4 0 0 [3,] 0 0 3 5 [4,] 0 0 4 6 > blkdiag(a,b,c(1,2)) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1 3 0 0 0 0 [2,] 2 4 0 0 0 0 [3,] 0 0 3 5 0 0 [4,] 0 0 4 6 0 0 [5,] 0 0 0 0 1 2 > > # others examples are omitted > > > > > cleanEx(); ..nameEx <- "macluster" > > ### * macluster > > flush(stderr()); flush(stdout()) > > ### Name: macluster > ### Title: Clustering analysis for Micro Array experiment > ### Aliases: macluster > ### Keywords: cluster > > ### ** Examples > > # load in data > data(paigen) > # make data object with rep 2 > paigen <- createData(paigen.raw, 2) > # make interactive model > model.int.fix <- makeModel(data=paigen, + formula=~Dye+Array+Strain+Diet+Strain:Diet) > # fit ANOVA model > anova.int <- fitmaanova(paigen, model.int.fix) > # test interaction effect > ## Not run: test.int.fix <- matest(paigen, model.int.fix, term="Strain:Diet", n.perm=100) > ##D # pick significant genes - pick the genes selected by Fs test > ##D idx <- volcano(test.int.fix)$idx.Fs > ##D > ##D # do k-means cluster on genes > ##D gene.cluster <- macluster(anova.int, "Strain:Diet", idx, "gene", > ##D "kmean", kmean.ngroups=5) > ##D # get the consensus group > ##D consensus(gene.cluster, 0.5) > ##D > ##D # HC cluster on samples > ##D sample.cluster <- macluster(anova.int, "Strain:Diet", idx, "sample","hc") > ##D # get the consensus group > ##D consensus(sample.cluster, 0.5) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "makeModel" > > ### * makeModel > > flush(stderr()); flush(stdout()) > > ### Name: makeModel > ### Title: Make model object for N-dye Micro Array experiment > ### Aliases: makeModel > ### Keywords: models > > ### ** Examples > > #load in data > data(paigen) > # make data object with rep 2 > paigen <- createData(paigen.raw, 2) > # make full model for fixed effect model > model.full.fix <- makeModel(data=paigen, + formula=~Dye+Array+Spot+Strain+Diet+Strain:Diet) > summary(model.full.fix) Model Summary This is a fixed effect model Gene-specific ANOVA model: Dye + Array + Spot + Strain + Diet + Strain:Diet Gene-specific Random terms: None Gene-specific covariate: None Class Level Information Class Levels Effect 1 Dye 2 fixed 2 Array 28 fixed 3 Spot 56 fixed 4 Strain 3 fixed 5 Diet 2 fixed 6 Strain:Diet 6 fixed Dimensions Observations(per gene): 112 Columns in X: 98 > # make full model for mixed effect model > model.full.mix <- makeModel(data=paigen, + formula=~Dye+Array+Spot+Strain+Diet+Strain:Diet+Sample, + random=~Array+Spot+Sample) > summary(model.full.mix) Model Summary This is a mixed effect model Gene-specific ANOVA model: Dye + Array + Spot + Strain + Diet + Strain:Diet + Sample Gene-specific Random terms: Array + Spot + Sample Gene-specific covariate: None Class Level Information Class Levels Effect 1 Dye 2 fixed 2 Strain 3 fixed 3 Diet 2 fixed 4 Strain:Diet 6 fixed 5 Array 28 random 6 Spot 56 random 7 Sample 12 random Dimensions Observations(per gene): 112 Columns in X: 14 Columns in Z: 96 > > > > cleanEx(); ..nameEx <- "matest" > > ### * matest > > flush(stderr()); flush(stdout()) > > ### Name: matest > ### Title: Statistical test for Microarray experiment > ### Aliases: matest > ### Keywords: models > > ### ** Examples > > # load in Paigen's data > data(paigen) > # make data object with rep 2 > paigen <- createData(paigen.raw, 2) > # Note that the data is normalized so normalization is skipped > > ################################## > # fixed model test > ################################## > # make an additive model > model.add.fix <- makeModel(data=paigen, formula=~Dye+Array+Strain+Diet) > # test strain effect > ## Not run: test.Strain.fix <- matest(paigen, model.add.fix, term="Strain", n.perm=100) > # volcano plot > ## Not run: idx <- volcano(test.Strain.fix) > > # test pairwise comparisions for Strain, using a MPI cluster with 8 nodes > ## Not run: C <- matrix(c(1,-1,0,1,0,-1, 0,1,-1), nrow=3, byrow=TRUE) > ## Not run: > ##D ttest.strain.fix <- matest(paigen, model.add.fix, > ##D term="Strain", Contrast=C, n.perm=100, nnodes=8) > ## End(Not run) > ## Not run: volcano(ttest.strain.fix) > > # a user specified F-test on Strain > # note that the F- and P-values generated in this test is exactly the > # same as the above F-test. But the volcano plot looks a little > # different because the X-axis values are different > ## Not run: > ##D C <- matrix(c(1,-1/2,-1/2,1,0,-1), nrow=2, byrow=TRUE) > ##D test.Strain.fix <- matest(paigen, model.add.fix, term="Strain", > ##D Contrast=C, test.type="ftest", n.perm=100) > ## End(Not run) > > ################################## > # mixed model test > ################################## > # mixed model permutation test is very slow > # I will skip the example for that > # the syntax of the function will be the same > # except the input model object is for mixed effects model > > > > cleanEx(); ..nameEx <- "paigen" > > ### * paigen > > flush(stderr()); flush(stdout()) > > ### Name: paigen.raw > ### Title: Data for a multiple factor 28-array expeirment > ### Aliases: paigen.raw paigen > ### Keywords: datasets > > ### ** Examples > > data(paigen.raw) Warning in data(paigen.raw) : data set 'paigen.raw' not found > > > > cleanEx(); ..nameEx <- "read.madata" > > ### * read.madata > > flush(stderr()); flush(stdout()) > > ### Name: read.madata > ### Title: Read Micro Array data from TAB delimited simple text file > ### Aliases: read.madata > ### Keywords: IO > > ### ** Examples > > # note that data files are not distributed with the package, > # read in a file with spot flag > ## Not run: > ##D kidney.raw <- read.madata("kidney.txt", designfile="kidneydesign.txt", > ##D metarow=1, metacol=2, col=3, row=4, Name=5, ID=6, > ##D pmt=7, spotflag=TRUE) > ## End(Not run) > # read in a file without spot flag > ## Not run: > ##D rawdata <- read.madata("paigen.txt", designfile="design.txt",cloneid=1, > ##D metarow=2, metacol=3, row=4, col=5, pmt=6, spotflag=FALSE) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "resiplot" > > ### * resiplot > > flush(stderr()); flush(stdout()) > > ### Name: resiplot > ### Title: Residual plot for Micro Array Experiment > ### Aliases: resiplot > ### Keywords: hplot > > ### ** Examples > > # load in Paigen's data > data(paigen) > # make data object with rep 2 > paigen <- createData(paigen.raw, 2) > # Note that the data is normalized so normalization is skipped > # full model > model.full.fix <- makeModel(data=paigen, + formula=~Dye+Array+Spot+Strain+Diet+Strain:Diet) > anova.full.fix <- fitmaanova(paigen, model.full.fix) > # residual plot > resiplot(paigen, anova.full.fix) > > > > cleanEx(); ..nameEx <- "riplot" > > ### * riplot > > flush(stderr()); flush(stdout()) > > ### Name: riplot > ### Title: Ratio intensity plot for 2-dye Micro Array experiment > ### Aliases: riplot > ### Keywords: hplot > > ### ** Examples > > ## Not run: > ##D data(dbldyeswap) > ##D ############################ > ##D # riplot on rawdata > ##D ############################ > ##D # riplot raw data on screen > ##D riplot(rawdata) > ##D graphics.off() > ##D # riplot raw data array 1 and 3 and output to postscript file > ##D postscript(file="dbldyeswapRIplot.ps") > ##D riplot(rawdata, array=c(1,3), onScreen=FALSE) > ##D > ##D ############################ > ##D # RI plot on madata > ##D ############################ > ##D # create data object with collapsing replicates > ##D data1 <- createData(rawdata, n.rep=2, avgreps=1) > ##D # do RI plot for all arrays > ##D riplot(data1) > ##D graphics.off() > ## End(Not run) > > > > cleanEx(); ..nameEx <- "subset.madata" > > ### * subset.madata > > flush(stderr()); flush(stdout()) > > ### Name: subset.madata > ### Title: Subsetting Micro Array data objects > ### Aliases: subset.madata > ### Keywords: utilities > > ### ** Examples > > data(dbldyeswap) > # create data object with replicate > data <- createData(rawdata, n.rep=2) > # take out array 1 and 2 > smalldata <- subset(data, arrays=c(1,2)) > # take out the all arrays except array 1 > idx.array <- 1:data$n.array > smalldata <- subset(data,arrays=(idx.array[-1])) > # take out gene number 1 to 20 > smalldata <- subset(data,genes=1:20) > > > > cleanEx(); ..nameEx <- "transform.madata" > > ### * transform.madata > > flush(stderr()); flush(stdout()) > > ### Name: transform.madata > ### Title: Micro Array experiment data transformation > ### Aliases: transform.madata transform.rawdata > ### Keywords: smooth > > ### ** Examples > > # load in data > data(dbldyeswap) > # do regional loess on raw data > ## Not run: > ##D raw.lowess <- transform(rawdata, method="rlowess") > ##D graphics.off() > ##D > ##D # make data object and do normalization on it > ##D # create data object with collapsing replicates > ##D data1<-createData(rawdata, n.rep=2, avgreps=1) > ##D # do shift without displaying the plot > ##D data1.shift <- transform(data1, method="shift", lolim=-50, uplim=50, > ##D draw="off") > ## End(Not run) > # do global lowess and output the plots to a postscript file > ## Not run: > ##D postscript(file="glowess.ps") > ##D data1.glowess <- transform(data1, method="glowess", draw="dev") > ##D graphics.off() > ##D > ##D # do linear-log > ##D data1.linlog <- transform(data1, method="linlog") > ##D graphics.off() > ##D > ##D # do linear-log shift > ##D data1.linlogshift <- transform(data1, method="linlogshift", lolim=-50, > ##D uplim=50) > ##D graphics.off() > ##D > ##D # note that spatial lowess will be unavailable after collapsing > ##D data1.rlowess <- transform(data1, method="rlowess") > ## End(Not run) # get an error here > > > > cleanEx(); ..nameEx <- "varplot" > > ### * varplot > > flush(stderr()); flush(stdout()) > > ### Name: varplot > ### Title: Variance component plot > ### Aliases: varplot > ### Keywords: dplot > > ### ** Examples > > # load in Paigen's data > data(paigen) > # make data object with rep 2 > paigen <- createData(paigen.raw, 2) > ## Not run: > ##D model.full.mix <- makeModel(data=paigen, > ##D formula=~Dye+Array+Spot+Strain+Diet+Strain:Diet+Sample, > ##D random=~Array+Spot+Sample) > ##D anova.full.mix <- fitmaanova(paigen, model.full.mix, method="REML") > ##D varplot(anova.full.mix) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "volcano" > > ### * volcano > > flush(stderr()); flush(stdout()) > > ### Name: volcano > ### Title: Volcano plot for F test results > ### Aliases: volcano > ### Keywords: hplot > > ### ** Examples > > data(paigen) > paigen <- createData(paigen.raw, n.rep=2) > > # make model without interaction > model.noint.fix <- makeModel(data=paigen, formula=~Array+Dye+Spot+Strain+Diet) > > # F-test strain effect > ## Not run: > ##D test.strain.fix <- matest(paigen, model.noint.fix, term="Strain", n.perm=500, > ##D shuffle.method="resid", test.method=rep(1,4)) > ##D # volcano plot > ##D idx.strain.fix <- volcano(test.strain.fix, title="Strain test - fixed model") > ##D > ##D # T-test all pairwise comparison on strain > ##D C <- matrix(c(1,-1,0,1,0,-1, 0,1,-1), nrow=3, byrow=TRUE) > ##D ttest.strain.fix <- matest(paigen, model.noint.fix, term="Strain", > ##D Contrast=C, n.perm=500, test.method=rep(1,4)) > ##D # volcano plot > ##D volcano(ttest.strain.fix) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "write.madata" > > ### * write.madata > > flush(stderr()); flush(stdout()) > > ### Name: write.madata > ### Title: Write Micro Array data to a TAB delimited simple text file > ### Aliases: write.madata > ### Keywords: IO > > ### ** Examples > > # load in data > data(paigen) > # make data object > paigen <- createData(paigen.raw, 2) > # take out first 6 arrays > smallpaigen <- subset(paigen, array=1:6) > # write to file > ## Not run: > ##D write.madata(smallpaigen, datafile="smallpaigen.txt", > ##D designfile="smallpaigendesign.txt") > ## End(Not run) > > > > ### *