Learn R Programming

tibblify (version 0.3.1)

guess_tspec: Guess the tibblify() Specification

Description

Use guess_tspec() if you don't know the input type. Use guess_tspec_df() if the input is a data frame or an object list. Use guess_tspec_objecte() is the input is an object.

Usage

guess_tspec(
  x,
  ...,
  empty_list_unspecified = FALSE,
  simplify_list = FALSE,
  inform_unspecified = should_inform_unspecified(),
  call = rlang::current_call()
)

guess_tspec_df( x, ..., empty_list_unspecified = FALSE, simplify_list = FALSE, inform_unspecified = should_inform_unspecified(), call = rlang::current_call(), arg = rlang::caller_arg(x) )

guess_tspec_object( x, ..., empty_list_unspecified = FALSE, simplify_list = FALSE, call = rlang::current_call() )

Value

A specification object that can used in tibblify().

Arguments

x

A nested list.

...

These dots are for future extensions and must be empty.

empty_list_unspecified

Treat empty lists as unspecified?

simplify_list

Should scalar lists be simplified to vectors?

inform_unspecified

Inform about fields whose type could not be determined?

call

The execution environment of a currently running function, e.g. caller_env(). The function will be mentioned in error messages as the source of the error. See the call argument of abort() for more information.

arg

An argument name as a string. This argument will be mentioned in error messages as the input that is at the origin of a problem.

Examples

Run this code
guess_tspec(list(x = 1, y = "a"))
guess_tspec(list(list(x = 1), list(x = 2)))

guess_tspec(gh_users)

Run the code above in your browser using DataLab