View source: R/check_and_unnest.R
check_and_unnest | R Documentation |
idaifield_docs
-listChecks if the input object is an idaifield_docs
-list,
and if it is already unnested (i.e., of class idaifield_resources
or
idaifield_simple
). If the object is not unnested, the function unnests
it by stripping all top-level lists and returning only the list
called "resource" within the db docs. If the input
object cannot be processed because it is not an idaifield_docs
or an
unnested idaifield_resources
or idaifield_simple
object,
the function issues a warning and returns the same object. You may force
the function to process it anyway using force = TRUE
, but the outcome
is uncertain.
check_and_unnest(idaifield_docs, force = FALSE)
idaifield_docs |
An object of class |
force |
TRUE/FALSE. Should the function attempt to unnest the input object regardless of type or class? Default is FALSE. |
If already unnested, the same object as handed to it. If not, the same list with the top-level lists removed down to the "resource"-level.
## Not run:
conn <- connect_idaifield(pwd = "hallo", project = "rtest")
idaifield_docs <- get_idaifield_docs(conn, raw = TRUE)
# Check if idaifield_docs is already unnested, and if not, do so:
idaifield_docs <- check_and_unnest(idaifield_docs)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.