This function queries the INBOVEG database for relation information on recordings for one or more surveys based on Parent (classic-chain/bucket) and Child (classic) relationship.

get_inboveg_relation_recording(
  connection,
  survey_name,
  multiple = FALSE,
  collect = FALSE
)

Arguments

connection

dbconnection with the database 'Cydonia' on the inbo-sql07-prd server

survey_name

A character string or a character vector, depending on multiple parameter, giving the name or names of the survey(s) for which you want to extract recordings information. If missing, all surveys are returned.

multiple

If TRUE, survey_name can take a character vector with multiple survey names that must match exactly. If FALSE (the default), survey_name must be a single character string (one survey name) that can include wildcards to allow partial matches

collect

If FALSE (the default), a remote tbl object is returned. This is like a reference to the result of the query but the full result of the query is not brought into memory. If TRUE the full result of the query is collected (fetched) from the database and brought into memory of the working environment.

Value

A dataframe with variables RecordingId, Child_GIVID (unique RecordingGIVID), Child_UserRef (UserReference), ParentId (RecordingId), Parent_GIVID (uniek RecordingGIVID) and Parent_UserRef (UserReference)

Examples

if (FALSE) {
library(inbodb)
con <- connect_inbo_dbase("D0010_00_Cydonia")

# get the Parent-Child-relations from one survey
relations_N2000meetnet_Grasland <- get_inboveg_relation_recording(con,
    survey_name = "N2000meetnet_Grasland")

# get all Parent-Child-relations from N2000meetnet surveys (partial matching)
relations_N2000meetnet <-
    get_inboveg_relation_recording(con, survey_name = "%N2000meetnet%")

# get Parent-Child-relations from several specific surveys
relations_severalsurveys <-
   get_inboveg_relation_recording(con,
   survey_name = c("DeBlankaart-1985-Beheer", "N2000meetnet_Grasland"),
   multiple = TRUE)

# get all Parent-Child-relations of all relevant surveys
allrelations <- get_inboveg_relation_recording(con)

# Close the connection when done
dbDisconnect(con)
rm(con)
}