Import all docs from an iDAI.field / Field Desktop project
Source:R/get_idaifield_docs.R
get_idaifield_docs.RdImports all docs from an iDAI.Field-database that is currently running and syncing into a list-object for further processing in R. The function is only useful for the import from iDAI.field 2 or Field Desktop with the respective client running on the same computer or in the same network as the R-script.
Arguments
- connection
A connection object as returned by
connect_idaifield()- raw
TRUE/FALSE. Should the result already be unnested to resource level using
maybe_unnest_docs()? (Default is FALSE.)- json
TRUE/FALSE. Should the function return a JSON-character string? (Default is FALSE.) If TRUE output cannot be processed with the functions from this package. Can be parsed using e.g.
jsonlite::fromJSON().
Value
an object (list) of class idaifield_docs if raw = TRUE and
idaifield_resources if raw = FALSE that contains all docs/resources
in the selected project except for the project configuration.
The connection and projectname are attached as attributes for
later use. (If json = TRUE, returns a character string in JSON-format.)
Details
When using raw = TRUE (the default) this function will allow
you to get the change log for each resource, i.e. which user changed
something in the resource at what time and who created it.
Setting raw = FALSE will only return a list of the actual data.
You can do this at a later time using maybe_unnest_docs()
from this package.
See also
For querying the database:
idf_query(),idf_index_query(),idf_json_query()For filtering / selecting an
idaifield_docs- oridaifield_resources-list:idf_select_by()For processing the list:
maybe_unnest_docs(),simplify_idaifield()
Examples
if (FALSE) { # \dontrun{
conn <- connect_idaifield(project = "rtest", pwd = "hallo")
idaifield_docs <- get_idaifield_docs(connection = conn)
} # }