## Not run:
# # Using the rgbif package
# if (requireNamespace("rgbif", quietly=TRUE)) {
# library("rgbif")
#
# # Prepare data
# d <- occ_data(scientificName="Apis mellifera", limit=50, minimal=FALSE)
# d <- d$data
#
# # Format data.frame
# d <- format_gq(d, source="rgbif")
#
# # Execute the call to the API, showing output and
# # logging information, and store the results
# dd <- add_flags(d)
#
# # Alternatively, instead of formating with 'format_gq', make the function
# # guess the correct name of the fields.
# dd <- add_flags(d, guess_fields=TRUE)
#
# # Execute the call without showing summary output, but
# # showing logging information
# dd <- add_flags(d, show_summary=FALSE)
#
# # Execute the call without showing any logging at all
# # (except errors, obviously)
# dd <- add_flags(d, quiet=TRUE)
#
# # Data quality output will be stored in a new field called flags
# names(dd$flags)
#
# # You can check records with certain flags as usual
# # See records with coordinates-country mismatch
# dd[dd$flags$coordinatesInsideCountry == FALSE,]
# }
# ## End(Not run)
Run the code above in your browser using DataLab