
Last chance! 50% off unlimited learning
Sale ends in
successive merge of selected columns out of 3 matrix or data.frames. 'selCols' will be used to define columns to be used; optionally may be different for 'dat2' : define in 'supCols2'. Output-cols will get additions specified in newSuff (default '.x' and '.y')
mergeSelCol3(
dat1,
dat2,
dat3,
selCols,
supCols2 = NULL,
supCols3 = NULL,
byC = NULL,
useAll = FALSE,
setRownames = TRUE,
newSuff = c(".x", ".y", ".z"),
callFrom = NULL
)
matrix or data.frame for fusing
matrix or data.frame for fusing
matrix or data.frame for fusing
will be used to define columns to be used; optionally may be different for 'dat2' : define in 'supCols2'
if additional column-names should be extracted form dat2
if additional column-names should be extracted form dat3
(character) 'by' value used in merge
(logical) use all lines (will produce NAs when given identifyer not found un 2nd group of data)
if TRUE, will use values of col used as 'by' as rownames instead of showing as add'l col in output
(character) prefix (argument 'suffixes' in merge
)
(character) allow easier tracking of message(s) produced
data.frame
# NOT RUN {
mat1 <- matrix(c(1:7,letters[1:7],11:17),ncol=3,dimnames=list(LETTERS[1:7],c("x1","x2","x3")))
mat2 <- matrix(c(1:6,c("b","a","e","f","g","k"),31:36),ncol=3,
dimnames=list(LETTERS[11:16],c("y1","x2","x3")))
mat3 <- matrix(c(1:6,c("c","a","e","b","g","k"),51:56),ncol=3,
dimnames=list(LETTERS[11:16],c("z1","x2","x3")))
mergeSelCol3(mat1,mat2,mat3,selC=c("x2","x3"))
# }
Run the code above in your browser using DataLab