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("limma-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('limma') > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "LargeDataObject" > > ### * LargeDataObject > > flush(stderr()); flush(stdout()) > > ### Name: LargeDataObject-class > ### Title: Large Data Object - class > ### Aliases: LargeDataObject-class show,LargeDataObject-method > ### Keywords: classes data > > ### ** Examples > > # see normalizeBetweenArrays > > > > cleanEx(); ..nameEx <- "PrintLayout" > > ### * PrintLayout > > flush(stderr()); flush(stdout()) > > ### Name: PrintLayout > ### Title: Print Layout - class > ### Aliases: PrintLayout-class > ### Keywords: classes data > > ### ** Examples > > # Settings for Swirl and ApoAI example data sets in User's Guide > > printer <- list(ngrid.r=4, ngrid.c=4, nspot.r=22, nspot.c=24, ndups=1, spacing=1, npins=16, start="topleft") > > # Typical settings at the Australian Genome Research Facility > > # Full pin set, duplicates side-by-side on same row > printer <- list(ngrid.r=12, ngrid.c=4, nspot.r=20, nspot.c=20, ndups=2, spacing=1, npins=48, start="topright") > > # Half pin set, duplicates in top and lower half of slide > printer <- list(ngrid.r=12, ngrid.c=4, nspot.r=20, nspot.c=20, ndups=2, spacing=9600, npins=24, start="topright") > > > > cleanEx(); ..nameEx <- "TestResults" > > ### * TestResults > > flush(stderr()); flush(stdout()) > > ### Name: TestResults-class > ### Title: Matrix of Test Results - class > ### Aliases: TestResults-class show,TestResults-method summary.TestResults > ### Keywords: classes htest > > ### ** Examples > ## Not run: > ##D # Assume a data object MA and a design matrix > ##D fit <- lmFit(MA, design) > ##D fit <- eBayes(fit) > ##D results <- decideTests(fit) > ##D summary(results) > ## End(Not run) > > > cleanEx(); ..nameEx <- "arrayWeights" > > ### * arrayWeights > > flush(stderr()); flush(stdout()) > > ### Name: arrayWeights > ### Title: Array Quality Weights > ### Aliases: arrayWeights > ### Keywords: regression models > > ### ** Examples > > ## Not run: > ##D array.wts <- arrayWeights(MA, design) > ##D fit.wts <- lmFit(MA, design, weights=array.wts) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "arrayWeightsQuick" > > ### * arrayWeightsQuick > > flush(stderr()); flush(stdout()) > > ### Name: arrayWeightsQuick > ### Title: Array Quality Weights > ### Aliases: arrayWeightsQuick > ### Keywords: regression > > ### ** Examples > > ## Not run: > ##D fit <- lmFit(y, design) > ##D arrayWeightsQuick(y, fit) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "auROC" > > ### * auROC > > flush(stderr()); flush(stdout()) > > ### Name: auROC > ### Title: Area Under Receiver Operating Curve > ### Aliases: auROC > ### Keywords: htest > > ### ** Examples > > auROC(c(1,1,0,0,0)) [1] 1 > truth <- rbinom(30,size=1,prob=0.2) > stat <- rchisq(30,df=2) > auROC(truth,stat) [1] 0.6041667 > > > > cleanEx(); ..nameEx <- "backgroundcorrect" > > ### * backgroundcorrect > > flush(stderr()); flush(stdout()) > > ### Name: backgroundCorrect > ### Title: Correct Intensities for Background > ### Aliases: backgroundCorrect > ### Keywords: models > > ### ** Examples > > RG <- new("RGList", list(R=c(1,2,3,4),G=c(1,2,3,4),Rb=c(2,2,2,2),Gb=c(2,2,2,2))) > backgroundCorrect(RG) An object of class "RGList" $R [1] -1 0 1 2 $G [1] -1 0 1 2 > backgroundCorrect(RG, method="half") An object of class "RGList" $R [1] 0.5 0.5 1.0 2.0 $G [1] 0.5 0.5 1.0 2.0 > backgroundCorrect(RG, method="minimum") An object of class "RGList" $R [,1] [1,] 0.5 [2,] 0.5 [3,] 1.0 [4,] 2.0 $G [,1] [1,] 0.5 [2,] 0.5 [3,] 1.0 [4,] 2.0 > backgroundCorrect(RG, offset=5) An object of class "RGList" $R [1] 4 5 6 7 $G [1] 4 5 6 7 > > > > cleanEx(); ..nameEx <- "blockDiag" > > ### * blockDiag > > flush(stderr()); flush(stdout()) > > ### Name: blockDiag > ### Title: Block Diagonal Matrix > ### Aliases: blockDiag > ### Keywords: array > > ### ** Examples > > a <- matrix(1,3,2) > b <- matrix(2,2,2) > blockDiag(a,b) 1 2 1 2 1 1 1 0 0 2 1 1 0 0 3 1 1 0 0 1 0 0 2 2 2 0 0 2 2 > > > > cleanEx(); ..nameEx <- "cbind" > > ### * cbind > > flush(stderr()); flush(stdout()) > > ### Name: cbind > ### Title: Combine RGList or MAList Objects > ### Aliases: cbind.RGList cbind.MAList rbind.RGList rbind.MAList > ### Keywords: manip > > ### ** Examples > > M <- A <- matrix(11:14,4,2) > rownames(M) <- rownames(A) <- c("a","b","c","d") > colnames(M) <- colnames(A) <- c("A1","A2") > MA1 <- new("MAList",list(M=M,A=A)) > > M <- A <- matrix(21:24,4,2) > rownames(M) <- rownames(A) <- c("a","b","c","d") > colnames(M) <- colnames(A) <- c("B1","B2") > MA2 <- new("MAList",list(M=M,A=A)) > > cbind(MA1,MA2) An object of class "MAList" $M A1 A2 B1 B2 a 11 11 21 21 b 12 12 22 22 c 13 13 23 23 d 14 14 24 24 $A A1 A2 B1 B2 a 11 11 21 21 b 12 12 22 22 c 13 13 23 23 d 14 14 24 24 > > > > cleanEx(); ..nameEx <- "channel2M" > > ### * channel2M > > flush(stderr()); flush(stdout()) > > ### Name: designI2M > ### Title: Convert Individual Channel Design Matrix to M-A Format > ### Aliases: designI2M designI2A > ### Keywords: regression > > ### ** Examples > > X <- cbind(1,c(1,1,1,1,0,0,0,0),c(0,0,0,0,1,1,1,1)) > designI2M(X) [,1] [,2] [,3] [1,] 0 0 0 [2,] 0 0 0 [3,] 0 0 0 [4,] 0 0 0 > designI2A(X) [,1] [,2] [,3] [1,] 1 1 0 [2,] 1 1 0 [3,] 1 0 1 [4,] 1 0 1 > > > > cleanEx(); ..nameEx <- "classifytests" > > ### * classifytests > > flush(stderr()); flush(stdout()) > > ### Name: classifyTests > ### Title: Treat Simultaneous T-Tests as Classification Problem > ### Aliases: FStat classifyTestsF classifyTestsT classifyTestsP > ### Keywords: htest > > ### ** Examples > > tstat <- matrix(c(0,5,0, 0,2.5,0, -2,-2,2, 1,1,1), 4, 3, byrow=TRUE) > classifyTestsF(tstat) TestResults matrix [,1] [,2] [,3] [1,] 0 1 0 [2,] 0 0 0 [3,] -1 -1 1 [4,] 0 0 0 > > # See also the examples for contrasts.fit and vennDiagram > > > > cleanEx(); ..nameEx <- "contrasts.fit" > > ### * contrasts.fit > > flush(stderr()); flush(stdout()) > > ### Name: contrasts.fit > ### Title: Compute Contrasts from Linear Model Fit > ### Aliases: contrasts.fit > ### Keywords: htest > > ### ** Examples > > # Simulate gene expression data: 6 microarrays and 100 genes > # with one gene differentially expressed in first 3 arrays > M <- matrix(rnorm(100*6,sd=0.3),100,6) > M[1,1:3] <- M[1,1:3] + 2 > # Design matrix corresponds to oneway layout, columns are orthogonal > design <- cbind(First3Arrays=c(1,1,1,0,0,0),Last3Arrays=c(0,0,0,1,1,1)) > fit <- lmFit(M,design=design) > # Would like to consider original two estimates plus difference between first 3 and last 3 arrays > contrast.matrix <- cbind(First3=c(1,0),Last3=c(0,1),"Last3-First3"=c(-1,1)) > fit2 <- contrasts.fit(fit,contrast.matrix) > fit2 <- eBayes(fit2) > # Large values of eb$t indicate differential expression > results <- classifyTestsF(fit2) > vennCounts(results) First3 Last3 Last3-First3 Counts [1,] 0 0 0 97 [2,] 0 0 1 1 [3,] 0 1 0 1 [4,] 0 1 1 0 [5,] 1 0 0 0 [6,] 1 0 1 1 [7,] 1 1 0 0 [8,] 1 1 1 0 attr(,"class") [1] "VennCounts" > > > > cleanEx(); ..nameEx <- "controlStatus" > > ### * controlStatus > > flush(stderr()); flush(stdout()) > > ### Name: controlStatus > ### Title: Set Status of each Spot from List of Spot Types > ### Aliases: controlStatus > ### Keywords: IO > > ### ** Examples > > genes <- data.frame(ID=c("Control","Control","Control","Control","AA1","AA2","AA3","AA4"), + Name=c("Ratio 1","Ratio 2","House keeping 1","House keeping 2","Gene 1","Gene 2","Gene 3","Gene 4")) > types <- data.frame(SpotType=c("Gene","Ratio","Housekeeping"),ID=c("*","Control","Control"),Name=c("*","Ratio*","House keeping*"),col=c("black","red","blue")) > status <- controlStatus(types,genes) Matching patterns for: ID Name Found 8 Gene Found 2 Ratio Found 2 Housekeeping Setting attributes: values col > > > > cleanEx(); ..nameEx <- "convest" > > ### * convest > > flush(stderr()); flush(stdout()) > > ### Name: convest > ### Title: Estimate Proportion of True Null Hypotheses > ### Aliases: convest > ### Keywords: htest > > ### ** Examples > > # First simulate data, use no.genes genes and no.ind individuals, > # with given value of pi0. Draw from normal distribution with mean=0 > # (true null) and mean=mean.diff (false null). > > no.genes <- 1000 > no.ind <- 20 > pi0 <- 0.9 > mean.diff <- 1 > n1 <- round(pi0*no.ind*no.genes) > n2 <- round((1-pi0)*no.ind*no.genes) > x <- matrix(c(rnorm(n1,mean=0),rnorm(n2,mean=mean.diff)),ncol=no.ind,byrow=TRUE) > > # calculate p-values using your favorite method, e.g. > pvals <- ebayes(lm.series(x))$p.value > > # run the convex decreasing density estimator to estimate pi0 > convest(pvals,niter=100,doplot=interactive()) [1] 0.8967085 > > > > cleanEx(); ..nameEx <- "dim" > > ### * dim > > flush(stderr()); flush(stdout()) > > ### Name: dim > ### Title: Retrieve the Dimensions of an RGList, MAList or MArrayLM Object > ### Aliases: dim.RGList dim.MAList dim.MArrayLM length.RGList length.MAList > ### length.MArrayLM > ### Keywords: array > > ### ** Examples > > M <- A <- matrix(11:14,4,2) > rownames(M) <- rownames(A) <- c("a","b","c","d") > colnames(M) <- colnames(A) <- c("A1","A2") > MA <- new("MAList",list(M=M,A=A)) > dim(M) [1] 4 2 > ncol(M) [1] 2 > nrow(M) [1] 4 > length(M) [1] 8 > > > > cleanEx(); ..nameEx <- "dupcor" > > ### * dupcor > > flush(stderr()); flush(stdout()) > > ### Name: dupcor.series > ### Title: Correlation Between Duplicates > ### Aliases: duplicateCorrelation dupcor.series > ### Keywords: multivariate > > ### ** Examples > > # See gls.series for an example > > > > cleanEx(); ..nameEx <- "ebayes" > > ### * ebayes > > flush(stderr()); flush(stdout()) > > ### Name: ebayes > ### Title: Empirical Bayes Statistics for Differential Expression > ### Aliases: ebayes eBayes > ### Keywords: htest > > ### ** Examples > > # Simulate gene expression data, > # 6 microarrays and 100 genes with one gene differentially expressed > set.seed(2004); invisible(runif(100)) > M <- matrix(rnorm(100*6,sd=0.3),100,6) > M[1,] <- M[1,] + 1 > fit <- lmFit(M) > > # Ordinary t-statistic > par(mfrow=c(1,2)) > ordinary.t <- fit$coef / fit$stdev.unscaled / fit$sigma > qqt(ordinary.t,df=fit$df.residual,main="Ordinary t") > abline(0,1) > > # Moderated t-statistic > eb <- eBayes(fit) > qqt(eb$t,df=eb$df.prior+eb$df.residual,main="Moderated t") > abline(0,1) > # Points off the line may be differentially expressed > par(mfrow=c(1,1)) > > > > graphics::par(get("par.postscript", env = .CheckExEnv)) > cleanEx(); ..nameEx <- "geneSetTest" > > ### * geneSetTest > > flush(stderr()); flush(stdout()) > > ### Name: geneSetTest > ### Title: Gene Set Test > ### Aliases: geneSetTest > ### Keywords: htest > > ### ** Examples > > sel <- c(2,4,5) > stat <- -9:9 > geneSetTest(sel,stat,nsim=100) [1] 0 > geneSetTest(sel,stat,ranks.only=TRUE) [1] 0.03302374 > > > > cleanEx(); ..nameEx <- "getSpacing" > > ### * getSpacing > > flush(stderr()); flush(stdout()) > > ### Name: getSpacing > ### Title: Get Numerical Spacing > ### Aliases: getSpacing > ### Keywords: IO > > ### ** Examples > > getSpacing("columns",list(ngrid.r=2,ngrid.c=2,nspot.r=20,nspot.c=19)) [1] 1 > getSpacing("rows",list(ngrid.r=2,ngrid.c=2,nspot.r=20,nspot.c=19)) [1] 19 > getSpacing("topbottom",list(ngrid.r=2,ngrid.c=2,nspot.r=20,nspot.c=19)) [1] 760 > > > > cleanEx(); ..nameEx <- "getlayout" > > ### * getlayout > > flush(stderr()); flush(stdout()) > > ### Name: getLayout > ### Title: Extract the Print Layout of an Array from the GAL File > ### Aliases: getLayout getLayout2 > ### Keywords: IO > > ### ** Examples > > # gal <- readGAL() > # layout <- getLayout(gal) > > > > cleanEx(); ..nameEx <- "gls.series" > > ### * gls.series > > flush(stderr()); flush(stdout()) > > ### Name: gls.series > ### Title: Generalized Least Squares for Series of Microarrays > ### Aliases: gls.series > ### Keywords: models regression > > ### ** Examples > > M <- matrix(rnorm(10*6),10,6) > dupcor <- duplicateCorrelation(M) Loading required package: statmod Attaching package: 'statmod' The following object(s) are masked from package:limma : matvec vecmat > fit <- gls.series(M,correlation=dupcor$consensus.correlation) > > > > cleanEx(); ..nameEx <- "heatdiagram" > > ### * heatdiagram > > flush(stderr()); flush(stdout()) > > ### Name: heatdiagram > ### Title: Stemmed Heat Diagram > ### Aliases: heatdiagram heatDiagram > ### Keywords: hplot > > ### ** Examples > > library(sma) > data(MouseArray) > MA <- normalizeWithinArrays(mouse.data,layout=mouse.setup) > design <- cbind(c(1,1,1,0,0,0),c(0,0,0,1,1,1)) > fit <- lmFit(MA,design=design) > contrasts.mouse <- cbind(Control=c(1,0),Mutant=c(0,1),Difference=c(-1,1)) > fit <- eBayes(contrasts.fit(fit,contrasts=contrasts.mouse)) > results <- decideTests(fit,method="global",p=0.1) > heatDiagram(results,fit$coef,primary="Difference") > > > > cleanEx(); ..nameEx <- "helpMethods" > > ### * helpMethods > > flush(stderr()); flush(stdout()) > > ### Name: helpMethods > ### Title: Prompt for Method Help Topics > ### Aliases: helpMethods > ### Keywords: methods > > ### ** Examples > > ## Not run: helpMethods(show) > > > > cleanEx(); ..nameEx <- "imageplot" > > ### * imageplot > > flush(stderr()); flush(stdout()) > > ### Name: imageplot > ### Title: Image Plot of Microarray Statistics > ### Aliases: imageplot > ### Keywords: hplot > > ### ** Examples > > M <- rnorm(8*4*16*16) > imageplot(M,layout=list(ngrid.r=8,ngrid.c=4,nspot.r=16,nspot.c=16)) > > > > cleanEx(); ..nameEx <- "intraspotCorrelation" > > ### * intraspotCorrelation > > flush(stderr()); flush(stdout()) > > ### Name: intraspotCorrelation > ### Title: Intra-Spot Correlation for Two Color Data > ### Aliases: intraspotCorrelation > ### Keywords: multivariate > > ### ** Examples > > # See lmscFit > > > > cleanEx(); ..nameEx <- "isfullrank" > > ### * isfullrank > > flush(stderr()); flush(stdout()) > > ### Name: is.fullrank > ### Title: Check for Full Column Rank > ### Aliases: is.fullrank nonEstimable > ### Keywords: algebra > > ### ** Examples > > # TRUE > is.fullrank(1) [1] TRUE > is.fullrank(cbind(1,0:1)) [1] TRUE > > # FALSE > is.fullrank(0) [1] FALSE > is.fullrank(matrix(1,2,2)) [1] FALSE > nonEstimable(matrix(1,2,2)) [1] "2" > > > > cleanEx(); ..nameEx <- "isnumeric" > > ### * isnumeric > > flush(stderr()); flush(stdout()) > > ### Name: isNumeric > ### Title: Test for Numeric Argument > ### Aliases: isNumeric > ### Keywords: programming > > ### ** Examples > > isNumeric(3) [1] TRUE > isNumeric("a") [1] FALSE > x <- data.frame(a=c(1,1),b=c(0,1)) > isNumeric(x) # TRUE [1] TRUE > is.numeric(x) # FALSE [1] FALSE > > > > cleanEx(); ..nameEx <- "kooperberg" > > ### * kooperberg > > flush(stderr()); flush(stdout()) > > ### Name: kooperberg > ### Title: Kooperberg Model-Based Background Correction > ### Aliases: kooperberg > ### Keywords: models > > ### ** Examples > > # This is example code for reading and background correcting GenePix data > # given GenePix Results (gpr) files in the working directory (data not > # provided). > ## Not run: > ##D genepixFiles <- dir(pattern="*\\.gpr$") # get the names of the GenePix image analysis output files in the current directory > ##D read.series(genepixFiles, suffix=NULL, skip=26, sep="\t") # read the files into data.frames, assuming headers of 26 lines > ##D layout <- getLayout(get(genepixFiles[1])) > ##D RGmodel <- kooperberg(genepixFiles, layout=layout) # model-based background correction > ##D MA <- normalizeWithinArrays(RGModel) # normalize the data > ## End(Not run) > > > > cleanEx(); ..nameEx <- "limmaUsersGuide" > > ### * limmaUsersGuide > > flush(stderr()); flush(stdout()) > > ### Name: limmaUsersGuide > ### Title: View Limma User's Guide > ### Aliases: limmaUsersGuide > ### Keywords: documentation > > ### ** Examples > > limmaUsersGuide(view=FALSE) [1] "/CRANPkg/check/limma.Rcheck/limma/doc/usersguide.pdf" > > > > cleanEx(); ..nameEx <- "lm.series" > > ### * lm.series > > flush(stderr()); flush(stdout()) > > ### Name: lm.series > ### Title: Linear Model for Series of Arrays > ### Aliases: lm.series > ### Keywords: models regression > > ### ** Examples > > # Simulate gene expression data, > # 6 microarrays and 100 genes with one gene differentially expressed in first 3 arrays > M <- matrix(rnorm(100*6,sd=0.3),100,6) > M[1,1:3] <- M[1,1:3] + 2 > # Design matrix includes two treatments, one for first 3 and one for last 3 arrays > design <- cbind(First3Arrays=c(1,1,1,0,0,0),Last3Arrays=c(0,0,0,1,1,1)) > fit <- lm.series(M,design=design) > eb <- ebayes(fit) > # Large values of eb$t indicate differential expression > qqt(eb$t[,1],df=fit$df+eb$df.prior) > abline(0,1) > > > > cleanEx(); ..nameEx <- "lmscFit" > > ### * lmscFit > > flush(stderr()); flush(stdout()) > > ### Name: lmscFit > ### Title: Fit Linear Model to Individual Channels of Two-Color Data > ### Aliases: lmscFit > ### Keywords: models regression > > ### ** Examples > > library(sma) > # Subset of data from ApoAI case study in Limma User's Guide > data(MouseArray) > # Avoid non-positive intensities > RG <- backgroundCorrect(mouse.data,method="half") > MA <- normalizeWithinArrays(RG,mouse.setup) > MA <- normalizeBetweenArrays(MA,method="Aq") > # Randomly choose 500 genes for this example > i <- sample(1:nrow(MA),500) > MA <- MA[i,] > targets <- data.frame(Cy3=I(rep("Pool",6)),Cy5=I(c("WT","WT","WT","KO","KO","KO"))) > targets.sc <- targetsA2C(targets) > targets.sc$Target <- factor(targets.sc$Target,levels=c("Pool","WT","KO")) > design <- model.matrix(~Target,data=targets.sc) > corfit <- intraspotCorrelation(MA,design) Loading required package: statmod Attaching package: 'statmod' The following object(s) are masked from package:limma : matvec vecmat > fit <- lmscFit(MA,design,correlation=corfit$consensus) > cont.matrix <- cbind(KOvsWT=c(0,-1,1)) > fit2 <- contrasts.fit(fit,cont.matrix) > fit2 <- eBayes(fit2) > topTable(fit2,adjust="fdr") M A t P.Value B 42 -0.5457321 9.171580 -3.716858 0.5721393 -3.789711 263 -0.5400095 10.242886 -3.399984 0.5721393 -3.876275 236 0.6901788 8.849650 3.373107 0.5721393 -3.883915 20 -0.6917441 11.456040 -3.187763 0.5721393 -3.937813 1 -0.4515620 9.460569 -3.170588 0.5721393 -3.942912 398 -0.9212524 10.773470 -3.079665 0.5721393 -3.970191 486 0.8371904 10.603394 3.007018 0.5721393 -3.992317 59 -0.3530359 8.902725 -3.005250 0.5721393 -3.992859 202 -0.7007627 9.632033 -3.004588 0.5721393 -3.993062 141 0.3611022 8.599806 2.782030 0.7139269 -4.062557 > > > > cleanEx(); ..nameEx <- "loessfit" > > ### * loessfit > > flush(stderr()); flush(stdout()) > > ### Name: loessFit > ### Title: Fast Simple Loess > ### Aliases: loessFit > ### Keywords: models > > ### ** Examples > > y <- rnorm(1000) > x <- rnorm(1000) > w <- rep(1,1000) > # The following are equivalent apart from execution time > # and interpolation inaccuracies > system.time(fit <- loessFit(y,x)$fitted) [1] 0.01 0.00 0.01 0.00 0.00 > system.time(fit <- loessFit(y,x,w)$fitted) [1] 0.07 0.00 0.07 0.00 0.00 > system.time(fit <- fitted(loess(y~x,weights=w,span=0.3,family="symmetric",iterations=4))) Warning: k-d tree limited by memory. ncmax= 1000 [1] 0.08 0.00 0.08 0.00 0.00 > # The same but with sorted x-values > system.time(fit <- lowess(x,y,f=0.3)$y) [1] 0.01 0.00 0.01 0.00 0.00 > > > > cleanEx(); ..nameEx <- "ma3x3" > > ### * ma3x3 > > flush(stderr()); flush(stdout()) > > ### Name: ma3x3 > ### Title: Two dimensional Moving Averages with 3x3 Window > ### Aliases: ma3x3.matrix ma3x3.spottedarray > ### Keywords: smooth > > ### ** Examples > > x <- matrix(c(2,5,3,1,6,3,10,12,4,6,4,8,2,1,9,0),4,4) > ma3x3.matrix(x,FUN="mean") [,1] [,2] [,3] [,4] [1,] 4.000000 4.333333 3.666667 3.250000 [2,] 4.833333 4.777778 5.000000 4.333333 [3,] 5.666667 5.777778 5.888889 4.666667 [4,] 6.500000 6.333333 7.166667 5.250000 > ma3x3.matrix(x,FUN="min") [,1] [,2] [,3] [,4] [1,] 2 2 1 1 [2,] 2 2 1 1 [3,] 1 1 0 0 [4,] 1 1 0 0 > > > > cleanEx(); ..nameEx <- "makeContrasts" > > ### * makeContrasts > > flush(stderr()); flush(stdout()) > > ### Name: makeContrasts > ### Title: Construct Matrix of Custom Contrasts > ### Aliases: makeContrasts > ### Keywords: regression > > ### ** Examples > > makeContrasts(B-A,C-B,C-A,levels=c("A","B","C")) B - A C - B C - A A -1 0 -1 B 1 -1 0 C 0 1 1 > makeContrasts("A","B","B-A",levels=c("A","B")) A B B-A A 1 0 -1 B 0 1 1 > > > > cleanEx(); ..nameEx <- "makeunique" > > ### * makeunique > > flush(stderr()); flush(stdout()) > > ### Name: makeUnique > ### Title: Make Values of Character Vector Unique > ### Aliases: makeUnique > ### Keywords: character > > ### ** Examples > > x <- c("a","a","b") > makeUnique(x) [1] "a1" "a2" "b" > > > > cleanEx(); ..nameEx <- "matvec" > > ### * matvec > > flush(stderr()); flush(stdout()) > > ### Name: matvec > ### Title: Multiply a Matrix by a Vector > ### Aliases: matvec vecmat > ### Keywords: array algebra > > ### ** Examples > > A <- matrix(1:12,3,4) > A [,1] [,2] [,3] [,4] [1,] 1 4 7 10 [2,] 2 5 8 11 [3,] 3 6 9 12 > matvec(A,c(1,2,3,4)) [,1] [,2] [,3] [,4] [1,] 1 8 21 40 [2,] 2 10 24 44 [3,] 3 12 27 48 > vecmat(c(1,2,3),A) [,1] [,2] [,3] [,4] [1,] 1 4 7 10 [2,] 4 10 16 22 [3,] 9 18 27 36 > > > > cleanEx(); ..nameEx <- "merge" > > ### * merge > > flush(stderr()); flush(stdout()) > > ### Name: merge.RGList > ### Title: Merge RGList or MAList Data Objects > ### Aliases: merge.RGList merge.MAList > ### Keywords: manip > > ### ** Examples > > M <- A <- matrix(11:14,4,2) > rownames(M) <- rownames(A) <- c("a","a","b","c") > MA1 <- new("MAList",list(M=M,A=A)) > > M <- A <- matrix(21:24,4,2) > rownames(M) <- rownames(A) <- c("b","a","a","c") > MA2 <- new("MAList",list(M=M,A=A)) > > merge(MA1,MA2) An object of class "MAList" $M [,1] [,2] [,3] [,4] a 11 11 22 22 a 12 12 23 23 b 13 13 21 21 c 14 14 24 24 $A [,1] [,2] [,3] [,4] a 11 11 22 22 a 12 12 23 23 b 13 13 21 21 c 14 14 24 24 > merge(MA2,MA1) An object of class "MAList" $M [,1] [,2] [,3] [,4] b 21 21 13 13 a 22 22 11 11 a 23 23 12 12 c 24 24 14 14 $A [,1] [,2] [,3] [,4] b 21 21 13 13 a 22 22 11 11 a 23 23 12 12 c 24 24 14 14 > > > > cleanEx(); ..nameEx <- "modelMatrix" > > ### * modelMatrix > > flush(stderr()); flush(stdout()) > > ### Name: modelMatrix > ### Title: Construct Design Matrix > ### Aliases: modelMatrix uniqueTargets > ### Keywords: regression > > ### ** Examples > > targets <- cbind(Cy3=c("Ref","Control","Ref","Treatment"),Cy5=c("Control","Ref","Treatment","Ref")) > rownames(targets) <- paste("Array",1:4) > > parameters <- cbind(C=c(-1,1,0),T=c(-1,0,1)) > rownames(parameters) <- c("Ref","Control","Treatment") > > modelMatrix(targets, parameters) Found unique target names: Control Ref Treatment C T Array 1 1 0 Array 2 -1 0 Array 3 0 1 Array 4 0 -1 > modelMatrix(targets, ref="Ref") Found unique target names: Control Ref Treatment Control Treatment Array 1 1 0 Array 2 -1 0 Array 3 0 1 Array 4 0 -1 > > > > cleanEx(); ..nameEx <- "modifyWeights" > > ### * modifyWeights > > flush(stderr()); flush(stdout()) > > ### Name: modifyWeights > ### Title: modifyWeights > ### Aliases: modifyWeights > ### Keywords: hplot > > ### ** Examples > > w <- matrix(runif(6*3),6,3) > status <- c("Gene","Gene","Ratio_Control","Ratio_Control","Gene","Gene") > modifyWeights(w,status,values="Ratio_Control",multipliers=0) [,1] [,2] [,3] [1,] 0.2655087 0.9446753 0.6870228 [2,] 0.3721239 0.6607978 0.3841037 [3,] 0.0000000 0.0000000 0.0000000 [4,] 0.0000000 0.0000000 0.0000000 [5,] 0.2016819 0.2059746 0.7176185 [6,] 0.8983897 0.1765568 0.9919061 > > > > cleanEx(); ..nameEx <- "mrlm" > > ### * mrlm > > flush(stderr()); flush(stdout()) > > ### Name: rlm > ### Title: Robust Linear Model for Series of Microarrays > ### Aliases: rlm.series mrlm > ### Keywords: models regression > > ### ** Examples > > # Simulate gene expression data, > # 6 microarrays and 100 genes with one gene differentially expressed in first 3 arrays > M <- matrix(rnorm(100*6,sd=0.3),100,6) > M[1,1:3] <- M[1,1:3] + 2 > # Design matrix includes two treatments, one for first 3 and one for last 3 arrays > design <- cbind(First3Arrays=c(1,1,1,0,0,0),Last3Arrays=c(0,0,0,1,1,1)) > fit <- mrlm(M,design=design) Loading required package: MASS Warning in rlm.default(x = X, y = y, weights = w, ...) : rlm failed to converge in 20 steps Warning in rlm.default(x = X, y = y, weights = w, ...) : rlm failed to converge in 20 steps Warning in rlm.default(x = X, y = y, weights = w, ...) : rlm failed to converge in 20 steps Warning in rlm.default(x = X, y = y, weights = w, ...) : rlm failed to converge in 20 steps Warning in rlm.default(x = X, y = y, weights = w, ...) : rlm failed to converge in 20 steps > eb <- ebayes(fit) > # Large values of eb$t indicate differential expression > qqt(eb$t[,1],df=fit$df+eb$df.prior) > abline(0,1) > > > > cleanEx(); ..nameEx <- "normalizeRobustSpline" > > ### * normalizeRobustSpline > > flush(stderr()); flush(stdout()) > > ### Name: normalizeRobustSpline > ### Title: Normalize Single Microarray Using Shrunk Robust Splines > ### Aliases: normalizeRobustSpline > ### Keywords: models > > ### ** Examples > > library(sma) > data(MouseArray) > M <- m.spot(mouse1) > A <- a.spot(mouse1) > M <- normalizeRobustSpline(M,A,mouse.setup) Loading required package: MASS Loading required package: splines > > > > cleanEx(); ..nameEx <- "normalizeWithinArrays" > > ### * normalizeWithinArrays > > flush(stderr()); flush(stdout()) > > ### Name: normalizeWithinArrays > ### Title: Normalize Within Arrays > ### Aliases: normalizeWithinArrays MA.RG RG.MA > ### Keywords: models > > ### ** Examples > > # See normalizeBetweenArrays > > > > cleanEx(); ..nameEx <- "normalizebetweenarrays" > > ### * normalizebetweenarrays > > flush(stderr()); flush(stdout()) > > ### Name: normalizeBetweenArrays > ### Title: Normalize Between Arrays > ### Aliases: normalizeBetweenArrays > ### Keywords: models multivariate > > ### ** Examples > > library(sma) > data(MouseArray) > MA <- normalizeWithinArrays(mouse.data, mouse.setup) > plot.scale.box(MA$M) > > # Between array scale normalization as in Yang et al (2001): > MA <- normalizeBetweenArrays(MA,method="scale") > print(MA) An object of class "MAList" $M [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.22060913 -0.97047013 -0.7132995 0.05299212 -0.4035381 0.8835727 [2,] 0.06737471 0.13335374 0.2444237 0.74556284 0.6523577 1.3419787 [3,] -0.23126298 -0.81105738 -0.8420205 -0.09262048 -0.4281592 -0.3253819 [4,] -0.17305532 -0.07044322 -0.3286331 0.20358545 0.2037528 -0.1023735 [5,] -0.84106756 -0.10980624 -0.1029215 -0.04902437 0.2820152 -0.2241410 6379 more rows ... $A [,1] [,2] [,3] [,4] [,5] [,6] [1,] 11.332980 11.198841 11.337353 9.693899 11.196822 10.506374 [2,] 11.245664 11.074098 11.051345 10.931562 11.273305 10.008818 [3,] 10.113995 10.923628 12.322088 9.875351 11.096463 10.829522 [4,] 8.390963 9.019036 8.720987 9.774672 8.826249 9.113240 [5,] 8.684837 9.017042 8.406961 9.477079 8.739632 8.557627 6379 more rows ... > show(MA) An object of class "MAList" $M [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.22060913 -0.97047013 -0.7132995 0.05299212 -0.4035381 0.8835727 [2,] 0.06737471 0.13335374 0.2444237 0.74556284 0.6523577 1.3419787 [3,] -0.23126298 -0.81105738 -0.8420205 -0.09262048 -0.4281592 -0.3253819 [4,] -0.17305532 -0.07044322 -0.3286331 0.20358545 0.2037528 -0.1023735 [5,] -0.84106756 -0.10980624 -0.1029215 -0.04902437 0.2820152 -0.2241410 6379 more rows ... $A [,1] [,2] [,3] [,4] [,5] [,6] [1,] 11.332980 11.198841 11.337353 9.693899 11.196822 10.506374 [2,] 11.245664 11.074098 11.051345 10.931562 11.273305 10.008818 [3,] 10.113995 10.923628 12.322088 9.875351 11.096463 10.829522 [4,] 8.390963 9.019036 8.720987 9.774672 8.826249 9.113240 [5,] 8.684837 9.017042 8.406961 9.477079 8.739632 8.557627 6379 more rows ... > plot.scale.box(MA$M) > > # One can get the same results using the matrix method: > M <- normalizeBetweenArrays(MA$M,method="scale") > plot.scale.box(M) > > # MpAq normalization as in Yang and Thorne (2003): > MpAq <- normalizeWithinArrays(mouse.data, mouse.setup) > MpAq <- normalizeBetweenArrays(MpAq, method="Aq") > plotDensities(MpAq) > > > > cleanEx(); ..nameEx <- "normalizeprintorder" > > ### * normalizeprintorder > > flush(stderr()); flush(stdout()) > > ### Name: normalizeForPrintorder > ### Title: Print-Order Normalization > ### Aliases: normalizeForPrintorder normalizeForPrintorder.rg > ### plotPrintorder > ### Keywords: models > > ### ** Examples > > library(sma) > data(MouseArray) > plotPrintorder(mouse.data,mouse.setup,slide=1,separate=TRUE) > RG <- normalizeForPrintorder(mouse.data,mouse.setup) > > > > cleanEx(); ..nameEx <- "normalizescale" > > ### * normalizescale > > flush(stderr()); flush(stdout()) > > ### Name: normalizeScale > ### Title: Normalize Columns of a Matrix to have the Same Scale > ### Aliases: normalizeMedianDeviations normalizeMedians > ### Keywords: array > > ### ** Examples > > M <- cbind(Array1=rnorm(10),Array2=2*rnorm(10)) > normalizeMedianDeviations(M) Array1 Array2 [1,] -0.9704239 1.95185021 [2,] 0.2844773 0.50332391 [3,] -1.2944514 -0.80207942 [4,] 2.4712096 -2.85938370 [5,] 0.5104322 1.45239053 [6,] -1.2709671 -0.05801347 [7,] 0.7550642 -0.02090314 [8,] 1.1437203 1.21858040 [9,] 0.8919285 1.06027300 [10,] -0.4730695 0.76678189 > > A <- cbind(Array1=rlnorm(10),Array2=2*rlnorm(10)) > normalizeMedians(A) Array1 Array2 [1,] 3.4266990 5.6928256 [2,] 2.9884544 1.3201422 [3,] 1.4728289 2.1558795 [4,] 0.1869841 1.3864162 [5,] 2.5407156 0.3691573 [6,] 1.2923875 0.9661198 [7,] 1.1697903 0.9863315 [8,] 0.3140722 1.3788003 [9,] 0.8474444 4.3953736 [10,] 2.0762463 3.1383680 > > > > cleanEx(); ..nameEx <- "normexpfit" > > ### * normexpfit > > flush(stderr()); flush(stdout()) > > ### Name: normexp.fit > ### Title: Fit Normal+Exp Convolution Model to Observed Intensities > ### Aliases: normexp.fit > ### Keywords: models > > ### ** Examples > > f <- c(2,3,1,10,3,20,5,6) > b <- c(2,2,2,2,2,2,2,2) > out <- normexp.fit(f,b) > > > > cleanEx(); ..nameEx <- "plotDensities" > > ### * plotDensities > > flush(stderr()); flush(stdout()) > > ### Name: plotDensities > ### Title: Individual-channel Densities Plot > ### Aliases: plotDensities > ### Keywords: hplot > > ### ** Examples > > library(sma) > data(MouseArray) > > # no normalization but background correction is done > MA.n <- MA.RG(mouse.data) > > # Default settings for plotDensities. > plotDensities(MA.n) > > # One can reproduce the default settings. > plotDensities(MA.n,arrays=c(1:6),groups=c(rep(1,6),rep(2,6)), + col=c("red","green")) > > # Color R and G individual-channels by blue and purple. > plotDensities(MA.n,arrays=NULL,groups=NULL,col=c("blue","purple")) > > # Indexing individual-channels using singlechannels (arrays=NULL). > plotDensities(MA.n,singlechannels=c(1,2,7)) > > # Change the default colors from c("red","green") to c("pink","purple") > plotDensities(MA.n,singlechannels=c(1,2,7),col=c("pink","purple")) > > # Specified too many colors since groups=NULL defaults to two groups. > plotDensities(MA.n,singlechannels=c(1,2,7),col=c("pink","purple","blue")) Warning in plotDensities(MA.n, singlechannels = c(1, 2, 7), col = c("pink", : number of groups=2 not equal to number of col > > # Three individual-channels, three groups, three colors. > plotDensities(MA.n,singlechannels=c(1,2,7),groups=c(1,2,3), + col=c("pink","purple","blue")) > > # Three individual-channels, one group, one color. > plotDensities(MA.n,singlechannels=c(1,2,7),groups=c(1,1,1), + col=c("purple")) > > # All individual-channels, three groups (ctl,tmt,reference), three colors. > plotDensities(MA.n,singlechannels=c(1:12), + groups=c(rep(1,3),rep(2,3),rep(3,6)),col=c("darkred","red","green")) > > > > > cleanEx(); ..nameEx <- "plotma" > > ### * plotma > > flush(stderr()); flush(stdout()) > > ### Name: plotMA > ### Title: MA-Plot > ### Aliases: plotMA > ### Keywords: hplot > > ### ** Examples > > MA <- new("MAList") > MA$A <- runif(300,4,16) > MA$M <- rt(300,df=3) > status <- rep("Gene",300) > status[1:3] <- "M=0" > MA$M[1:3] <- 0 > status[4:6] <- "M=3" > MA$M[4:6] <- 3 > status[7:9] <- "M=-3" > MA$M[7:9] <- -3 > plotMA(MA,main="MA-Plot with Simulated Data",status=status,values=c("M=0","M=3","M=-3"),col=c("blue","red","green")) > > # Same as above > attr(status,"values") <- c("M=0","M=3","M=-3") > attr(status,"col") <- c("blue","red","green") > plotMA(MA,main="MA-Plot with Simulated Data",status=status) > > # Same as above > MA$genes$Status <- status > plotMA(MA,main="MA-Plot with Simulated Data") > > > > cleanEx(); ..nameEx <- "poolvar" > > ### * poolvar > > flush(stderr()); flush(stdout()) > > ### Name: poolVar > ### Title: Pool Sample Variances with Unequal Variances > ### Aliases: poolVar > ### Keywords: htest > > ### ** Examples > > # Welch's t-test with unequal variances > x <- rnorm(10,mean=1,sd=2) > y <- rnorm(20,mean=2,sd=1) > s2 <- c(var(x),var(y)) > n <- c(10,20) > out <- poolVar(var=s2,n=n) > tstat <- (mean(x)-mean(y)) / sqrt(out$var*out$multiplier) > pvalue <- 2*pt(-abs(tstat),df=out$df) > # Equivalent to t.test(x,y) > > > > cleanEx(); ..nameEx <- "printorder" > > ### * printorder > > flush(stderr()); flush(stdout()) > > ### Name: printorder > ### Title: Identify Order in which Spots were Printed > ### Aliases: printorder > ### Keywords: IO > > ### ** Examples > > printorder(list(ngrid.r=2,ngrid.c=2,nspot.r=12,nspot.c=8)) $printorder [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 [26] 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 [51] 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 [76] 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 1 2 3 4 [101] 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 [126] 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 [151] 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 [176] 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 1 2 3 4 5 6 7 8 [201] 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 [226] 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 [251] 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 [276] 84 85 86 87 88 89 90 91 92 93 94 95 96 1 2 3 4 5 6 7 8 9 10 11 12 [301] 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 [326] 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 [351] 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 [376] 88 89 90 91 92 93 94 95 96 $plate [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [38] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [75] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [112] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [149] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [186] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [223] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [260] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [297] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [334] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [371] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 $plate.r [1] 2 2 2 2 2 2 2 2 2 2 2 2 4 4 4 4 4 4 4 4 4 4 4 4 6 [26] 6 6 6 6 6 6 6 6 6 6 6 8 8 8 8 8 8 8 8 8 8 8 8 10 10 [51] 10 10 10 10 10 10 10 10 10 10 12 12 12 12 12 12 12 12 12 12 12 12 14 14 14 [76] 14 14 14 14 14 14 14 14 14 16 16 16 16 16 16 16 16 16 16 16 16 1 1 1 1 [101] 1 1 1 1 1 1 1 1 3 3 3 3 3 3 3 3 3 3 3 3 5 5 5 5 5 [126] 5 5 5 5 5 5 5 7 7 7 7 7 7 7 7 7 7 7 7 9 9 9 9 9 9 [151] 9 9 9 9 9 9 11 11 11 11 11 11 11 11 11 11 11 11 13 13 13 13 13 13 13 [176] 13 13 13 13 13 15 15 15 15 15 15 15 15 15 15 15 15 2 2 2 2 2 2 2 2 [201] 2 2 2 2 4 4 4 4 4 4 4 4 4 4 4 4 6 6 6 6 6 6 6 6 6 [226] 6 6 6 8 8 8 8 8 8 8 8 8 8 8 8 10 10 10 10 10 10 10 10 10 10 [251] 10 10 12 12 12 12 12 12 12 12 12 12 12 12 14 14 14 14 14 14 14 14 14 14 14 [276] 14 16 16 16 16 16 16 16 16 16 16 16 16 1 1 1 1 1 1 1 1 1 1 1 1 [301] 3 3 3 3 3 3 3 3 3 3 3 3 5 5 5 5 5 5 5 5 5 5 5 5 7 [326] 7 7 7 7 7 7 7 7 7 7 7 9 9 9 9 9 9 9 9 9 9 9 9 11 11 [351] 11 11 11 11 11 11 11 11 11 11 13 13 13 13 13 13 13 13 13 13 13 13 15 15 15 [376] 15 15 15 15 15 15 15 15 15 $plate.c [1] 1 3 5 7 9 11 13 15 17 19 21 23 1 3 5 7 9 11 13 15 17 19 21 23 1 [26] 3 5 7 9 11 13 15 17 19 21 23 1 3 5 7 9 11 13 15 17 19 21 23 1 3 [51] 5 7 9 11 13 15 17 19 21 23 1 3 5 7 9 11 13 15 17 19 21 23 1 3 5 [76] 7 9 11 13 15 17 19 21 23 1 3 5 7 9 11 13 15 17 19 21 23 1 3 5 7 [101] 9 11 13 15 17 19 21 23 1 3 5 7 9 11 13 15 17 19 21 23 1 3 5 7 9 [126] 11 13 15 17 19 21 23 1 3 5 7 9 11 13 15 17 19 21 23 1 3 5 7 9 11 [151] 13 15 17 19 21 23 1 3 5 7 9 11 13 15 17 19 21 23 1 3 5 7 9 11 13 [176] 15 17 19 21 23 1 3 5 7 9 11 13 15 17 19 21 23 2 4 6 8 10 12 14 16 [201] 18 20 22 24 2 4 6 8 10 12 14 16 18 20 22 24 2 4 6 8 10 12 14 16 18 [226] 20 22 24 2 4 6 8 10 12 14 16 18 20 22 24 2 4 6 8 10 12 14 16 18 20 [251] 22 24 2 4 6 8 10 12 14 16 18 20 22 24 2 4 6 8 10 12 14 16 18 20 22 [276] 24 2 4 6 8 10 12 14 16 18 20 22 24 2 4 6 8 10 12 14 16 18 20 22 24 [301] 2 4 6 8 10 12 14 16 18 20 22 24 2 4 6 8 10 12 14 16 18 20 22 24 2 [326] 4 6 8 10 12 14 16 18 20 22 24 2 4 6 8 10 12 14 16 18 20 22 24 2 4 [351] 6 8 10 12 14 16 18 20 22 24 2 4 6 8 10 12 14 16 18 20 22 24 2 4 6 [376] 8 10 12 14 16 18 20 22 24 $plateposition [1] "p1B01" "p1B03" "p1B05" "p1B07" "p1B09" "p1B11" "p1B13" "p1B15" "p1B17" [10] "p1B19" "p1B21" "p1B23" "p1D01" "p1D03" "p1D05" "p1D07" "p1D09" "p1D11" [19] "p1D13" "p1D15" "p1D17" "p1D19" "p1D21" "p1D23" "p1F01" "p1F03" "p1F05" [28] "p1F07" "p1F09" "p1F11" "p1F13" "p1F15" "p1F17" "p1F19" "p1F21" "p1F23" [37] "p1H01" "p1H03" "p1H05" "p1H07" "p1H09" "p1H11" "p1H13" "p1H15" "p1H17" [46] "p1H19" "p1H21" "p1H23" "p1J01" "p1J03" "p1J05" "p1J07" "p1J09" "p1J11" [55] "p1J13" "p1J15" "p1J17" "p1J19" "p1J21" "p1J23" "p1L01" "p1L03" "p1L05" [64] "p1L07" "p1L09" "p1L11" "p1L13" "p1L15" "p1L17" "p1L19" "p1L21" "p1L23" [73] "p1N01" "p1N03" "p1N05" "p1N07" "p1N09" "p1N11" "p1N13" "p1N15" "p1N17" [82] "p1N19" "p1N21" "p1N23" "p1P01" "p1P03" "p1P05" "p1P07" "p1P09" "p1P11" [91] "p1P13" "p1P15" "p1P17" "p1P19" "p1P21" "p1P23" "p1A01" "p1A03" "p1A05" [100] "p1A07" "p1A09" "p1A11" "p1A13" "p1A15" "p1A17" "p1A19" "p1A21" "p1A23" [109] "p1C01" "p1C03" "p1C05" "p1C07" "p1C09" "p1C11" "p1C13" "p1C15" "p1C17" [118] "p1C19" "p1C21" "p1C23" "p1E01" "p1E03" "p1E05" "p1E07" "p1E09" "p1E11" [127] "p1E13" "p1E15" "p1E17" "p1E19" "p1E21" "p1E23" "p1G01" "p1G03" "p1G05" [136] "p1G07" "p1G09" "p1G11" "p1G13" "p1G15" "p1G17" "p1G19" "p1G21" "p1G23" [145] "p1I01" "p1I03" "p1I05" "p1I07" "p1I09" "p1I11" "p1I13" "p1I15" "p1I17" [154] "p1I19" "p1I21" "p1I23" "p1K01" "p1K03" "p1K05" "p1K07" "p1K09" "p1K11" [163] "p1K13" "p1K15" "p1K17" "p1K19" "p1K21" "p1K23" "p1M01" "p1M03" "p1M05" [172] "p1M07" "p1M09" "p1M11" "p1M13" "p1M15" "p1M17" "p1M19" "p1M21" "p1M23" [181] "p1O01" "p1O03" "p1O05" "p1O07" "p1O09" "p1O11" "p1O13" "p1O15" "p1O17" [190] "p1O19" "p1O21" "p1O23" "p1B02" "p1B04" "p1B06" "p1B08" "p1B10" "p1B12" [199] "p1B14" "p1B16" "p1B18" "p1B20" "p1B22" "p1B24" "p1D02" "p1D04" "p1D06" [208] "p1D08" "p1D10" "p1D12" "p1D14" "p1D16" "p1D18" "p1D20" "p1D22" "p1D24" [217] "p1F02" "p1F04" "p1F06" "p1F08" "p1F10" "p1F12" "p1F14" "p1F16" "p1F18" [226] "p1F20" "p1F22" "p1F24" "p1H02" "p1H04" "p1H06" "p1H08" "p1H10" "p1H12" [235] "p1H14" "p1H16" "p1H18" "p1H20" "p1H22" "p1H24" "p1J02" "p1J04" "p1J06" [244] "p1J08" "p1J10" "p1J12" "p1J14" "p1J16" "p1J18" "p1J20" "p1J22" "p1J24" [253] "p1L02" "p1L04" "p1L06" "p1L08" "p1L10" "p1L12" "p1L14" "p1L16" "p1L18" [262] "p1L20" "p1L22" "p1L24" "p1N02" "p1N04" "p1N06" "p1N08" "p1N10" "p1N12" [271] "p1N14" "p1N16" "p1N18" "p1N20" "p1N22" "p1N24" "p1P02" "p1P04" "p1P06" [280] "p1P08" "p1P10" "p1P12" "p1P14" "p1P16" "p1P18" "p1P20" "p1P22" "p1P24" [289] "p1A02" "p1A04" "p1A06" "p1A08" "p1A10" "p1A12" "p1A14" "p1A16" "p1A18" [298] "p1A20" "p1A22" "p1A24" "p1C02" "p1C04" "p1C06" "p1C08" "p1C10" "p1C12" [307] "p1C14" "p1C16" "p1C18" "p1C20" "p1C22" "p1C24" "p1E02" "p1E04" "p1E06" [316] "p1E08" "p1E10" "p1E12" "p1E14" "p1E16" "p1E18" "p1E20" "p1E22" "p1E24" [325] "p1G02" "p1G04" "p1G06" "p1G08" "p1G10" "p1G12" "p1G14" "p1G16" "p1G18" [334] "p1G20" "p1G22" "p1G24" "p1I02" "p1I04" "p1I06" "p1I08" "p1I10" "p1I12" [343] "p1I14" "p1I16" "p1I18" "p1I20" "p1I22" "p1I24" "p1K02" "p1K04" "p1K06" [352] "p1K08" "p1K10" "p1K12" "p1K14" "p1K16" "p1K18" "p1K20" "p1K22" "p1K24" [361] "p1M02" "p1M04" "p1M06" "p1M08" "p1M10" "p1M12" "p1M14" "p1M16" "p1M18" [370] "p1M20" "p1M22" "p1M24" "p1O02" "p1O04" "p1O06" "p1O08" "p1O10" "p1O12" [379] "p1O14" "p1O16" "p1O18" "p1O20" "p1O22" "p1O24" > > > > cleanEx(); ..nameEx <- "protectMetachar" > > ### * protectMetachar > > flush(stderr()); flush(stdout()) > > ### Name: protectMetachar > ### Title: Protect Metacharacters > ### Aliases: protectMetachar > ### Keywords: character > > ### ** Examples > > # without protectMetachar, this would be no match > grep(protectMetachar("Ch1 (mean)"),"Ch1 (mean)") [1] 1 > > > > cleanEx(); ..nameEx <- "qqt" > > ### * qqt > > flush(stderr()); flush(stdout()) > > ### Name: qqt > ### Title: Student's t Quantile-Quantile Plot > ### Aliases: qqt > ### Keywords: distribution > > ### ** Examples > > y <- rt(50,df=4) > qqt(y,df=4) > > > > cleanEx(); ..nameEx <- "qualwt" > > ### * qualwt > > flush(stderr()); flush(stdout()) > > ### Name: QualityWeights > ### Title: Spot Quality Weights > ### Aliases: QualityWeights wtarea wtflags wtIgnore.Filter > ### Keywords: regression > > ### ** Examples > > # Read in spot output files from current directory and give full weight to 165 > # pixel spots. Note: for this example to run you must set fnames to the names > # of actual spot output files (data not provided). > ## Not run: > ##D RG <- read.maimages(fnames,source="spot",wt.fun=wtarea(165)) > ##D # Spot will be downweighted according to weights found in RG > ##D MA <- normalizeWithinArrays(RG,layout) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "read.maimages" > > ### * read.maimages > > flush(stderr()); flush(stdout()) > > ### Name: read.maimages > ### Title: Read RGList from Image Analysis Output Files > ### Aliases: read.maimages read.imagene > ### Keywords: file > > ### ** Examples > > # Read all .gpr files from current working directory > # and give weight 0.1 to spots with negative flags > > ## Not run: > ##D files <- dir(pattern="*\\.gpr$") > ##D RG <- read.maimages(files,"genepix",wt.fun=wtflags(0.1)) > ## End(Not run) > > # Read all .spot files from current working director and down-weight > # spots smaller or larger than 150 pixels > > ## Not run: > ##D files <- dir(pattern="*\\.spot$") > ##D RG <- read.maimages(files,"spot",wt.fun=wtarea(150)) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "readgal" > > ### * readgal > > flush(stderr()); flush(stdout()) > > ### Name: readGAL > ### Title: Read a GAL file > ### Aliases: readGAL > ### Keywords: IO > > ### ** Examples > > # readGAL() > # will read in the first GAL file (with suffix ".gal") > # found in the current working directory > > > > cleanEx(); ..nameEx <- "removeext" > > ### * removeext > > flush(stderr()); flush(stdout()) > > ### Name: removeExt > ### Title: Remove Common Extension from File Names > ### Aliases: removeExt > ### Keywords: character file > > ### ** Examples > > x <- c("slide1.spot","slide2.spot","slide3.spot") > removeExt(x) [1] "slide1" "slide2" "slide3" > > > > cleanEx(); ..nameEx <- "splitName" > > ### * splitName > > flush(stderr()); flush(stdout()) > > ### Name: splitName > ### Title: Split Composite Gene Names > ### Aliases: splitName > ### Keywords: character > > ### ** Examples > > x <- c("AA196000;actinin, alpha 3", + "AA464163;acyl-Coenzyme A dehydrogenase, very long chain", + "3E7;W15277;No Annotation") > splitName(x) $Name [1] "AA196000" "AA464163" "3E7;W15277" $Annotation [1] "actinin, alpha 3" [2] "acyl-Coenzyme A dehydrogenase, very long chain" [3] "No Annotation" > > > > cleanEx(); ..nameEx <- "squeezeVar" > > ### * squeezeVar > > flush(stderr()); flush(stdout()) > > ### Name: squeezeVar > ### Title: Smooth Sample Variances > ### Aliases: squeezeVar > ### Keywords: htest > > ### ** Examples > > s2 <- rchisq(20,df=5)/5 > squeezeVar(s2, df=5) $var.prior [1] 0.974112 $df.prior [1] 22.36542 $var.post [1] 0.8847212 1.1120548 1.1033975 0.9882973 1.1826976 1.0285712 1.0078684 [8] 0.9124394 0.8713805 0.8851412 0.9130092 0.9376922 0.8646479 1.0395013 [15] 1.0101285 1.0527134 1.0343166 0.9501080 0.8089935 0.9989853 > > > > cleanEx(); ..nameEx <- "subsetting" > > ### * subsetting > > flush(stderr()); flush(stdout()) > > ### Name: subsetting > ### Title: Subset RGList, MAList or MArrayLM Objects > ### Aliases: [.RGList [.MAList [.MArrayLM > ### Keywords: manip > > ### ** Examples > > M <- A <- matrix(11:14,4,2) > rownames(M) <- rownames(A) <- c("a","b","c","d") > colnames(M) <- colnames(A) <- c("A","B") > MA <- new("MAList",list(M=M,A=A)) > MA[1:2,] An object of class "MAList" $M A B a 11 11 b 12 12 $A A B a 11 11 b 12 12 > MA[1:2,2] An object of class "MAList" $M B a 11 b 12 $A B a 11 b 12 > MA[,2] An object of class "MAList" $M B a 11 b 12 c 13 d 14 $A B a 11 b 12 c 13 d 14 > > > > cleanEx(); ..nameEx <- "targetsA2C" > > ### * targetsA2C > > flush(stderr()); flush(stdout()) > > ### Name: targetsA2C > ### Title: Convert Two-Color Targets Dataframe from One-Row-Per-Array to > ### One-Row-Per-Channel > ### Aliases: targetsA2C array2channel > ### Keywords: htest > > ### ** Examples > > targets <- data.frame(FileName=c("file1.gpr","file2.gpr"),Cy3=c("WT","KO"),Cy5=c("KO","WT")) > targetsA2C(targets) channel.col FileName Target 1.1 1 file1.gpr WT 1.2 2 file1.gpr KO 2.1 1 file2.gpr KO 2.2 2 file2.gpr WT > > > > cleanEx(); ..nameEx <- "toptable" > > ### * toptable > > flush(stderr()); flush(stdout()) > > ### Name: toptable > ### Title: Table of Top Genes from Linear Model Fit > ### Aliases: toptable topTable > ### Keywords: htest > > ### ** Examples > > # Simulate gene expression data, > # 6 microarrays and 100 genes with first gene differentially expressed > M <- matrix(rnorm(100*6,sd=0.3),100,6) > M[1,1:3] <- M[1,1:3] + 2 > # Design matrix includes two treatments, one for first 3 and one for last 3 arrays > design <- cbind(First3Arrays=c(1,1,1,0,0,0),Last3Arrays=c(0,0,0,1,1,1)) > fit <- lmFit(M, design=design) > fit <- eBayes(fit) > topTable(fit) M A t P.Value B 1 1.9162581 1.06039996 10.679009 1.276272e-24 49.435947 14 -0.4235604 -0.28080041 -2.360436 1.000000e+00 -4.582482 61 0.3777731 -0.02414989 2.105271 1.000000e+00 -5.149957 84 -0.3692048 -0.11059707 -2.057521 1.000000e+00 -5.248946 32 -0.3580603 -0.17397464 -1.995414 1.000000e+00 -5.374301 46 -0.3458479 -0.39706051 -1.927357 1.000000e+00 -5.507256 6 0.3444480 0.30875016 1.919555 1.000000e+00 -5.522202 28 -0.3113900 -0.12713827 -1.735328 1.000000e+00 -5.857523 78 0.2817352 0.24649089 1.570066 1.000000e+00 -6.129562 83 0.2722270 0.14331360 1.517079 1.000000e+00 -6.211025 > > > > cleanEx(); ..nameEx <- "trigammainverse" > > ### * trigammainverse > > flush(stderr()); flush(stdout()) > > ### Name: trigammaInverse > ### Title: Inverse Trigamma Function > ### Aliases: trigammaInverse > ### Keywords: math > > ### ** Examples > > y <- trigammaInverse(5) > trigamma(y) [1] 5 > > > > cleanEx(); ..nameEx <- "trimWhiteSpace" > > ### * trimWhiteSpace > > flush(stderr()); flush(stdout()) > > ### Name: trimWhiteSpace > ### Title: Trim Leading and Trailing White Space > ### Aliases: trimWhiteSpace > ### Keywords: character > > ### ** Examples > > x <- c("a "," b ") > trimWhiteSpace(x) [1] "a" "b" > > > > cleanEx(); ..nameEx <- "uniquegenelist" > > ### * uniquegenelist > > flush(stderr()); flush(stdout()) > > ### Name: uniquegenelist > ### Title: Eliminate Duplicate Names from the Gene List > ### Aliases: uniquegenelist > ### Keywords: array > > ### ** Examples > > genelist <- c("A","A","B","B","C","C","D","D") > uniquegenelist(genelist,ndups=2) [1] "A" "B" "C" "D" > genelist <- c("A","B","A","B","C","D","C","D") > uniquegenelist(genelist,ndups=2,spacing=2) [1] "A" "B" "C" "D" > > > > cleanEx(); ..nameEx <- "unwrapdups" > > ### * unwrapdups > > flush(stderr()); flush(stdout()) > > ### Name: unwrapdups > ### Title: Unwrap Duplicate Spot Values from Rows into Columns > ### Aliases: unwrapdups > ### Keywords: array > > ### ** Examples > > M <- matrix(1:12,6,2) > unwrapdups(M,ndups=2) [,1] [,2] [,3] [,4] [1,] 1 2 7 8 [2,] 3 4 9 10 [3,] 5 6 11 12 > unwrapdups(M,ndups=3) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1 2 3 7 8 9 [2,] 4 5 6 10 11 12 > unwrapdups(M,ndups=2,spacing=3) [,1] [,2] [,3] [,4] [1,] 1 4 7 10 [2,] 2 5 8 11 [3,] 3 6 9 12 > > > > cleanEx(); ..nameEx <- "venn" > > ### * venn > > flush(stderr()); flush(stdout()) > > ### Name: venn > ### Title: Venn Diagrams > ### Aliases: vennCounts vennDiagram > ### Keywords: htest > > ### ** Examples > > tstat <- matrix(rt(300,df=10),100,3) > tstat[1:33,] <- tstat[1:33,]+2 > clas <- classifyTestsF(tstat,df=10,p.value=0.05) > a <- vennCounts(clas) > print(a) Group 1 Group 2 Group 3 Counts [1,] 0 0 0 74 [2,] 0 0 1 2 [3,] 0 1 0 3 [4,] 0 1 1 4 [5,] 1 0 0 0 [6,] 1 0 1 2 [7,] 1 1 0 7 [8,] 1 1 1 8 attr(,"class") [1] "VennCounts" > vennDiagram(a) > > > > cleanEx(); ..nameEx <- "zscore" > > ### * zscore > > flush(stderr()); flush(stdout()) > > ### Name: zscore > ### Title: z-score equivalents > ### Aliases: zscoreGamma zscoreT tZscore > ### Keywords: distribution > > ### ** Examples > > zscoreGamma(1, shape=1, scale=1) [1] 0.3374750 > zscoreT(2, df=3) [1] 1.478306 > tZscore(2, df=3) [1] 3.306822 > > > > ### *