is.data.frame.simple.RdChecks for the existence of dimensions within the data frame. Returns FALSE if any object within dframe has non-null dim value.
is.data.frame.simple(dframe)Boolean, TRUE or FALSE. An attribute "not_a_simple_column" is created, indicating which of the elements in the dframe have dimensions
See: http://stackoverflow.com/questions/38902880/data-frame-in-which-elements-are-not-single-columns
N <- 100
mydf <- data.frame(x5 = rnorm(N),
x4 = rpois(N, lambda = 3),
x3 = ordered(sample(c("lo", "med", "hi"),
size = N, replace=TRUE)))
is.data.frame.simple(mydf)
#> [1] TRUE
#> attr(,"not_a_simple_column")
#> character(0)
mydf$amatr <- matrix(0, ncol = 2, nrow = NROW(mydf))
is.data.frame.simple(mydf)
#> [1] FALSE
#> attr(,"not_a_simple_column")
#> [1] "amatr"
mydf$amatr <- NULL
is.data.frame.simple(mydf)
#> [1] TRUE
#> attr(,"not_a_simple_column")
#> character(0)
mydf$adf <- mydf
is.data.frame.simple(mydf)
#> [1] FALSE
#> attr(,"not_a_simple_column")
#> [1] "adf"