clean_data: Data cleaning according to Questionnaire Responses.

Description Usage Arguments Details Value Examples

Description

Use run_questionnaire to add Questionnaire Responses and pass it to this function to process the data faster.

Usage

1
2
3
clean_data(data, custom_questionnaire = NULL, clean = TRUE,
  missing = FALSE, report = TRUE, format = c("html_document",
  "pdf_document"))

Arguments

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

Details

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.

Value

data frame with clean data

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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)

} 

bdclean documentation built on May 1, 2019, 10:54 p.m.