View source: R/get_idaifield_docs.R
get_idaifield_docs | R Documentation |
Imports 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.
get_idaifield_docs(
connection = connect_idaifield(serverip = "127.0.0.1", project = "rtest", user = "R",
pwd = "hallo"),
raw = TRUE,
json = FALSE,
projectname = NULL
)
connection |
A connection object as returned
by |
raw |
TRUE/FALSE. Should the result already be unnested to
resource level using |
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. |
projectname |
(deprecated) The name of the project in the Field Client that one
wishes to load. Will overwrite the project set in the |
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 check_and_unnest()
from this package.
NOTE: If you are planning on using the coordinates stored in the database,
I strongly suggest you consider changing your R digits-setting to a higher
value than the default. Depending on the projection used, coordinates may
be represented by rather long numbers which R might automatically round on
import. options(digits = 20)
should more than do the trick. (That applies
to other fields containing long numbers as well.)
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.)
For querying the database: idf_query()
,idf_index_query()
, idf_json_query()
For filtering / selecting an idaifield_docs
- or idaifield_resources
-list: idf_select_by()
For processing the list: check_and_unnest()
, simplify_idaifield()
## Not run:
conn <- connect_idaifield(project = "rtest", pwd = "hallo")
idaifield_docs <- get_idaifield_docs(connection = conn)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.