Add helper to quickly resolve ambiguous and unspecified guesses
Opened this issue · 0 comments
mgirlich commented
In some cases the guessing API might not return what you want:
tib_unspecified()
because the field is alwaysNULL
or absent -> the field could be anythingtib_unspecified()
because the field is alwaysNULL
, absent or an empty list -> the field could betib_vector(input_form != "vector")
,tib_row()
ortib_df()
tib_df(.names_to = "...")
could also betib_object()
(tspec_guess()
should prefertib_df()
as it produces the shorter spec)tib_vector(input_form = "object")
could also betib_object()
(tspec_guess()
should prefertib_vector()
as it produces the shorter spec)
The guess_*()
functions should be smarter about this. Add argument unspecified
which can be one of:
"ask"
: ask the user immediately what to do"unspecified"
: keep them as unspecified"known"
: add them to the known fields
and argument ambiguous
"ask"
: ask the user immediately what to do"inform"
: choose one and inform