Learn R Programming

hyfo (version 1.3.4)

checkBind: Check data for bind function.

Description

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

Usage

checkBind(data, bind)

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'

Value

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

Examples

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

data(testdl)
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