Learn R Programming

hyfo (version 1.4.6)

checkBind: Check data for bind function.

Description

check if the data is available for rbind() or cbind()

Usage

checkBind(data, bind)

Value

data can be processed by bind function; data cannot be processed by bind function

Arguments

data

A list containing different sublists ready to be processed by do.call('rbind') or do.call('cbind')

bind

A string showing which bind you are going to use can be 'rbind' or 'cbind'

Examples

Run this code
data <- list(c(1,1,1),c(2,2,2))
bind <- 'rbind'
checkBind(data,bind)

data(testdl)
if (FALSE) {
checkBind(testdl, 'rbind')
}
# Since the colnames in testdl are not the same, so it cannot be bound.
#

Run the code above in your browser using DataLab