| to_df | R Documentation |
to_df() checks whether an argument can be coerced to a data frame,
returning it silently if so. Otherwise an informative error message is
signaled. to_data_frame() is a synonym of to_df().
to_df(
x,
...,
x_arg = caller_arg(x),
call = caller_env(),
x_class = object_type(x)
)
to_data_frame(
x,
...,
x_arg = caller_arg(x),
call = caller_env(),
x_class = object_type(x)
)
## S3 method for class ''NULL''
to_df(x, ..., allow_null = TRUE, x_arg = caller_arg(x), call = caller_env())
x |
The argument to stabilize. |
... |
Arguments passed to |
x_arg |
|
call |
|
x_class |
|
allow_null |
|
The argument as a data frame.
Other data frame functions:
specify_df(),
stabilize_df()
to_df(mtcars)
to_df(list(name = "Alice", age = 30L))
to_df(NULL)
try(to_df(NULL, allow_null = FALSE))
try(to_df(c("a", "b", "c")))
to_df(letters)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.