Last data update: 2014.03.03
R: Combine a list of RTCA objects
combineRTCA R Documentation
Combine a list of RTCA objects
Description
Combine a list of RTCA objects
Usage
combineRTCA(list)
Arguments
list
A list of RTCA
objects
Details
The current implementation requires all the objects have exactly the
same time-points recorded (or at least of same length).
The combined RTCA
object has an obligatory column in the
phenoData
‘Plate’ (upper-case!), which matches the names of the
RTCA
list. When the list
has no names, the
‘Plate’ field is filled with integer index starting from 1.
Value
A new RTCA
object
Note
Special attention should be given to the cases where the list
parameter partially has names. In this case all items without name
will be assigned to a ‘Plate’ field of empty string
(“”). Therefore it is advised either to assign names to all
items of the list, or leave them all off.
Author(s)
Jitao David Zhang jitao_david.zhang@roche.com
Examples
## An artificial example
require(RTCA)
ofile <- system.file("/extdata/testOutput.csv", package="RTCA")
x <- parseRTCA(ofile)
xSub1 <- x[,1:3]
xSub2 <- x[,4:ncol(x)]
xComb <- combineRTCA(list(sub1=xSub1, sub2=xSub2))
identical(exprs(x), exprs(xComb))
pData(xComb)$Plate
## in case of nameless list
pData(combineRTCA(list(xSub1, xSub2)))$Plate
## partial names
pData(combineRTCA(list(a=xSub1, xSub2)))$Plate
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
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 an HTML browser interface to help.
Type 'q()' to quit R.
> library(RTCA)
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
rbind, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
Loading required package: RColorBrewer
Loading required package: gtools
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/RTCA/combineRTCA.Rd_%03d_medium.png", width=480, height=480)
> ### Name: combineRTCA
> ### Title: Combine a list of RTCA objects
> ### Aliases: combineRTCA
>
> ### ** Examples
>
> ## An artificial example
> require(RTCA)
>
> ofile <- system.file("/extdata/testOutput.csv", package="RTCA")
> x <- parseRTCA(ofile)
Read 245 items
>
> xSub1 <- x[,1:3]
> xSub2 <- x[,4:ncol(x)]
> xComb <- combineRTCA(list(sub1=xSub1, sub2=xSub2))
> identical(exprs(x), exprs(xComb))
[1] TRUE
> pData(xComb)$Plate
[1] sub1 sub1 sub1 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2
[16] sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2
[31] sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2
[46] sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2
[61] sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2
[76] sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2 sub2
[91] sub2 sub2 sub2 sub2 sub2 sub2
Levels: sub1 sub2
>
> ## in case of nameless list
> pData(combineRTCA(list(xSub1, xSub2)))$Plate
[1] 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
[39] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
[77] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Levels: 1 2
>
> ## partial names
> pData(combineRTCA(list(a=xSub1, xSub2)))$Plate
[1] a a a
[39]
[77]
Levels: a
>
>
>
>
>
> dev.off()
null device
1
>