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("clac-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('clac') > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "clac.PlotAllArray.R" > > ### * clac.PlotAllArray.R > > flush(stderr()); flush(stdout()) > > ### Name: clac.PlotAllArray.R > ### Title: A function to plot multiple arrays for CLAC result. > ### Aliases: clac.PlotAllArray.R > ### Keywords: cluster > > ### ** Examples > > library(clac) > data(BACarray) > attach(BACarray) > > ############ prepare the normal reference arrays > NormalResult<-clac.preparenormal.R(DiseaseArray, NormalArray, Normal.Type=rep(0,3), chromosome.number=chromosome, nucleotide.position=nucposition, windowsize=5, targetFDR=0.01, chromosomeOption=FALSE) > > ############ clac on selected tumor arrays > clac.result<-clac.tumorarray.R(NormalResult, tumorarrayIndex=1:4) Warning in return(fdr = CLAC.result[1, ], RegionMean = CLAC.result[-c(1, : multi-argument returns are deprecated > > ############ Plot for the first arrays > i<-1 > clac.PlotSingleArray.R(i, NormalResult, clac.result) > title(main=paste("CLAC Plot for the ", i ,"th BAC array; FDR=", round(clac.result$fdr[i],3), sep="")) > > ############ consensus plot > clac.PlotConsensus.R(clac.result, chromosome, nucposition, 1:4) > title(main="Consensus Plot for 4 BAC arrays") > > ############ Plot all arrays > clac.PlotAllArray.R(NormalResult, clac.result) > title(main="Plot for all 4 arrays") > > > > cleanEx(); ..nameEx <- "clac.PlotConsensus.R" > > ### * clac.PlotConsensus.R > > flush(stderr()); flush(stdout()) > > ### Name: clac.PlotConsensus.R > ### Title: A function to make consensus plot for CLAC result. > ### Aliases: clac.PlotConsensus.R > ### Keywords: cluster > > ### ** Examples > > library(clac) > data(BACarray) > attach(BACarray) > > ############ prepare the normal reference arrays > NormalResult<-clac.preparenormal.R(DiseaseArray, NormalArray, Normal.Type=rep(0,3), chromosome.number=chromosome, nucleotide.position=nucposition, windowsize=5, targetFDR=0.01, chromosomeOption=FALSE) > > ############ clac on selected tumor arrays > clac.result<-clac.tumorarray.R(NormalResult, tumorarrayIndex=1:4) Warning in return(fdr = CLAC.result[1, ], RegionMean = CLAC.result[-c(1, : multi-argument returns are deprecated > > ############ Plot for the first arrays > i<-1 > clac.PlotSingleArray.R(i, NormalResult, clac.result) > title(main=paste("CLAC Plot for the ", i ,"th BAC array; FDR=", round(clac.result$fdr[i],3), sep="")) > > ############ consensus plot > clac.PlotConsensus.R(clac.result, chromosome, nucposition, 1:4) > title(main="Consensus Plot for 4 BAC arrays") > > ############ Plot all arrays > clac.PlotAllArray.R(NormalResult, clac.result) > title(main="Plot for all 4 arrays") > > > > cleanEx(); ..nameEx <- "clac.PlotSingleArray.R" > > ### * clac.PlotSingleArray.R > > flush(stderr()); flush(stdout()) > > ### Name: clac.PlotSingleArray.R > ### Title: A function to plot one single array for CLAC result. > ### Aliases: clac.PlotSingleArray.R > ### Keywords: cluster > > ### ** Examples > > library(clac) > data(BACarray) > attach(BACarray) > > ############ prepare the normal reference arrays > NormalResult<-clac.preparenormal.R(DiseaseArray, NormalArray, Normal.Type=rep(0,3), chromosome.number=chromosome, nucleotide.position=nucposition, windowsize=5, targetFDR=0.01, chromosomeOption=FALSE) > > ############ clac on selected tumor arrays > clac.result<-clac.tumorarray.R(NormalResult, tumorarrayIndex=1:4) Warning in return(fdr = CLAC.result[1, ], RegionMean = CLAC.result[-c(1, : multi-argument returns are deprecated > > ############ Plot for the first arrays > i<-1 > clac.PlotSingleArray.R(i, NormalResult, clac.result) > title(main=paste("CLAC Plot for the ", i ,"th BAC array; FDR=", round(clac.result$fdr[i],3), sep="")) > > ############ consensus plot > clac.PlotConsensus.R(clac.result, chromosome, nucposition, 1:4) > title(main="Consensus Plot for 4 BAC arrays") > > ############ Plot all arrays > clac.PlotAllArray.R(NormalResult, clac.result) > title(main="Plot for all 4 arrays") > > > > cleanEx(); ..nameEx <- "clac.preparenormal.R" > > ### * clac.preparenormal.R > > flush(stderr()); flush(stdout()) > > ### Name: clac.preparenormal.R > ### Title: A function to prepare normal reference in CLAC(Cluster Along > ### Chromosome) Analysis > ### Aliases: clac.preparenormal.R > ### Keywords: cluster > > ### ** Examples > > library(clac) > data(BACarray) > attach(BACarray) > > ############ prepare the normal reference arrays > NormalResult<-clac.preparenormal.R(DiseaseArray, NormalArray, Normal.Type=rep(0,3), chromosome.number=chromosome, nucleotide.position=nucposition, windowsize=5, targetFDR=0.01, chromosomeOption=FALSE) > > ############ clac on selected tumor arrays > clac.result<-clac.tumorarray.R(NormalResult, tumorarrayIndex=1:4) Warning in return(fdr = CLAC.result[1, ], RegionMean = CLAC.result[-c(1, : multi-argument returns are deprecated > > ############ Plot for the first arrays > i<-1 > clac.PlotSingleArray.R(i, NormalResult, clac.result) > title(main=paste("CLAC Plot for the ", i ,"th BAC array; FDR=", round(clac.result$fdr[i],3), sep="")) > > ############ consensus plot > clac.PlotConsensus.R(clac.result, chromosome, nucposition, 1:4) > title(main="Consensus Plot for 4 BAC arrays") > > ############ Plot all arrays > clac.PlotAllArray.R(NormalResult, clac.result) > title(main="Plot for all 4 arrays") > > > > cleanEx(); ..nameEx <- "clac.tumorarray.R" > > ### * clac.tumorarray.R > > flush(stderr()); flush(stdout()) > > ### Name: clac.tumorarray.R > ### Title: A function to do CLAC(Cluster Along Chromosome) Analysis > ### Aliases: clac.tumorarray.R > ### Keywords: cluster > > ### ** Examples > > library(clac) > data(BACarray) > attach(BACarray) > > ############ prepare the normal reference arrays > NormalResult<-clac.preparenormal.R(DiseaseArray, NormalArray, Normal.Type=rep(0,3), chromosome.number=chromosome, nucleotide.position=nucposition, windowsize=5, targetFDR=0.01, chromosomeOption=FALSE) > > ############ clac on selected tumor arrays > clac.result<-clac.tumorarray.R(NormalResult, tumorarrayIndex=1:4) Warning in return(fdr = CLAC.result[1, ], RegionMean = CLAC.result[-c(1, : multi-argument returns are deprecated > > ############ Plot for the first arrays > i<-1 > clac.PlotSingleArray.R(i, NormalResult, clac.result) > title(main=paste("CLAC Plot for the ", i ,"th BAC array; FDR=", round(clac.result$fdr[i],3), sep="")) > > ############ consensus plot > clac.PlotConsensus.R(clac.result, chromosome, nucposition, 1:4) > title(main="Consensus Plot for 4 BAC arrays") > > ############ Plot all arrays > clac.PlotAllArray.R(NormalResult, clac.result) > title(main="Plot for all 4 arrays") > > > > ### *