OuhscBbmc / OuhscMunge

Data manipulation operations
http://ouhscbbmc.github.io/OuhscMunge/
Other
1 stars 4 forks source link

verify_data_frame() function #42

Closed wibeasley closed 6 years ago

wibeasley commented 6 years ago

Does this function have enough use to include in the package?

verify_data_frame <- function( d, minimum_row_count=100L ) {
  # Verify that a legit data.frame was returned (and not an error message)
  checkmate::assert_class(d, "data.frame")

  # Verify at least 100 rows were returned (or whatever the argument value was).
  checkmate::assert_integer(nrow(d), lower=minimum_row_count, len=1, any.missing=F)
}

https://github.com/OuhscBbmc/miechv-3/blob/a02b27819e72a30abdeecc5e3b90f2d2c5945e9a/manipulation/osdh/ellis/common-ellis.R#L137-L143