assert_valid_list_format: Assert List can be Converted into a Nested List Compatible...

View source: R/assertions.R

assert_valid_list_formatR Documentation

Assert List can be Converted into a Nested List Compatible with the Format Argument of Reformat.

Description

Assert List can be Converted into a Nested List Compatible with the Format Argument of Reformat.

Usage

assert_valid_list_format(object)

Arguments

object

(list) to assert.

Value

invisible TRUE or an error message if the criteria are not fulfilled.

Examples

format <- list(
  df1 = list(
    var1 = list("X" = "x", "N" = c(NA, ""))
  ),
  df2 = list(
    var1 = list(),
    var2 = list("f11" = "F11", "NN" = NA)
  ),
  df3 = list()
)

assert_valid_list_format(format)

dunlin documentation built on Oct. 31, 2024, 5:07 p.m.