checkTibble | R Documentation |
Check if an argument is a tibble
checkTibble(
x,
types = character(0L),
any.missing = TRUE,
all.missing = TRUE,
min.rows = NULL,
max.rows = NULL,
min.cols = NULL,
max.cols = NULL,
nrows = NULL,
ncols = NULL,
row.names = NULL,
col.names = NULL,
null.ok = FALSE
)
check_tibble(
x,
types = character(0L),
any.missing = TRUE,
all.missing = TRUE,
min.rows = NULL,
max.rows = NULL,
min.cols = NULL,
max.cols = NULL,
nrows = NULL,
ncols = NULL,
row.names = NULL,
col.names = NULL,
null.ok = FALSE
)
assertTibble(
x,
types = character(0L),
any.missing = TRUE,
all.missing = TRUE,
min.rows = NULL,
max.rows = NULL,
min.cols = NULL,
max.cols = NULL,
nrows = NULL,
ncols = NULL,
row.names = NULL,
col.names = NULL,
null.ok = FALSE,
.var.name = vname(x),
add = NULL
)
assert_tibble(
x,
types = character(0L),
any.missing = TRUE,
all.missing = TRUE,
min.rows = NULL,
max.rows = NULL,
min.cols = NULL,
max.cols = NULL,
nrows = NULL,
ncols = NULL,
row.names = NULL,
col.names = NULL,
null.ok = FALSE,
.var.name = vname(x),
add = NULL
)
testTibble(
x,
types = character(0L),
any.missing = TRUE,
all.missing = TRUE,
min.rows = NULL,
max.rows = NULL,
min.cols = NULL,
max.cols = NULL,
nrows = NULL,
ncols = NULL,
row.names = NULL,
col.names = NULL,
null.ok = FALSE
)
test_tibble(
x,
types = character(0L),
any.missing = TRUE,
all.missing = TRUE,
min.rows = NULL,
max.rows = NULL,
min.cols = NULL,
max.cols = NULL,
nrows = NULL,
ncols = NULL,
row.names = NULL,
col.names = NULL,
null.ok = FALSE
)
expect_tibble(
x,
types = character(0L),
any.missing = TRUE,
all.missing = TRUE,
min.rows = NULL,
max.rows = NULL,
min.cols = NULL,
max.cols = NULL,
nrows = NULL,
ncols = NULL,
row.names = NULL,
col.names = NULL,
null.ok = FALSE,
info = NULL,
label = vname(x)
)
x |
[any] |
types |
[ |
any.missing |
[ |
all.missing |
[ |
min.rows |
[ |
max.rows |
[ |
min.cols |
[ |
max.cols |
[ |
nrows |
[ |
ncols |
[ |
row.names |
[ |
col.names |
[ |
null.ok |
[ |
.var.name |
[ |
add |
[ |
info |
[ |
label |
[ |
Depending on the function prefix:
If the check is successful, the functions
assertTibble
/assert_tibble
return
x
invisibly, whereas
checkTibble
/check_tibble
and
testTibble
/test_tibble
return
TRUE
.
If the check is not successful,
assertTibble
/assert_tibble
throws an error message,
testTibble
/test_tibble
returns FALSE
,
and checkTibble
/check_tibble
return a string with the error message.
The function expect_tibble
always returns an
expectation
.
Other compound:
checkArray()
,
checkDataFrame()
,
checkDataTable()
,
checkMatrix()
library(tibble)
x = as_tibble(iris)
testTibble(x)
testTibble(x, nrow = 150, any.missing = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.