Makes the union between two omics_array objects.
# S4 method for omics_array,omics_array
unionOmics(M1, M2)
a omics-array or a list of omics-arrays
a omics-array or nothing if M1 is a list of omics-arrays
Returns a omics_array object which is the union of M1 and M2.
Returns a omics_array object which is the union of the elements of M1.
if(require(CascadeData)){
data(micro_S, package="CascadeData")
#Create another omicsarray object with 100 genes
Mbis<-M<-as.omics_array(micro_S[1:100,],1:4,6)
#Rename the 100 genes
Mbis@name<-paste(M@name,"bis")
rownames(Mbis@omicsarray) <- Mbis@name
#Union (merge without duplicated names) of the two omicsarrays.
str(unionOmics(M,Mbis))
}
#> Formal class 'omics_array' [package "Patterns"] with 7 slots
#> ..@ omicsarray: num [1:200, 1:24] 136.1 32 78 201.8 16.3 ...
#> .. ..- attr(*, "dimnames")=List of 2
#> .. .. ..$ : chr [1:200] "1007_s_at" "1053_at" "117_at" "121_at" ...
#> .. .. ..$ : chr [1:24] "N1_S_T60" "N1_S_T90" "N1_S_T210" "N1_S_T390" ...
#> ..@ name : chr [1:200] "1007_s_at" "1053_at" "117_at" "121_at" ...
#> ..@ gene_ID : chr [1:200] "0" "0" "0" "0" ...
#> ..@ group : num [1:200] 0 NA NA NA NA NA NA NA NA NA ...
#> ..@ start_time: num [1:200] 0 NA NA NA NA NA NA NA NA NA ...
#> ..@ time : int [1:4] 1 2 3 4
#> ..@ subject : num 6