clean_data {bdclean} | R Documentation |
Use run_questionnaire
to add Questionnaire Responses and pass it to this
function to process the data faster.
clean_data(data, custom_questionnaire = NULL, clean = TRUE,
missing = FALSE, report = TRUE, format = c("html_document",
"pdf_document"))
data |
Biodiversity data in a data frame |
custom_questionnaire |
Custom user created questionnaire responses if to pypass answering questions each time. |
clean |
Whether to clean after flagging. If false only flagging will be done. |
missing |
How to treat data with missing values. Default: false - will be treated as bad data. |
report |
Whether to print report of cleaning done. |
format |
Formats of the cleaning report required. Options are: Markdown, HTML or / and PDF |
Use create_default_questionnaire
to create default questionnaire object.
You can add your custom questions to this questionnaire and then pass it to this
function to process the data.
data frame with clean data
custom_questionnaire <- create_default_questionnaire()
if(interactive()){
library(rgbif)
occdat <- occ_data(
country = 'AU', # Country code for australia
classKey = 359, # Class code for mammalia
limit = 50 # Get only 50 records
)
myData <- occdat$data
responses <- run_questionnaire()
cleaned_data <- clean_data(myData, responses)
cleaned_data2 <- clean_data(myData)
}