epiverse-trace / cleanepi

R package to clean and standardize epidemiological data
https://epiverse-trace.github.io/cleanepi/
Other
8 stars 3 forks source link

Update function documentations #184

Closed Karim-Mane closed 1 month ago

Karim-Mane commented 1 month ago

This PR contains the following changes:

cleaned_data <- clean_data(
  data = test_data,
  remove_constants = list(cutoff = 1),
  replace_missing_values = list(target_columns = NULL, na_strings = "-99"),
  remove_duplicates = list(target_columns = NULL),
  standardize_dates = list(
    target_columns = NULL,
    error_tolerance = 0.4,
    format = NULL,
    timeframe = as.Date(c("1973-05-29", "2023-05-29")),
    orders = list(
      world_named_months = c("Ybd", "dby"),
      world_digit_months = c("dmy", "Ymd"),
      US_formats = c("Omdy", "YOmd")
    ),
    modern_excel = TRUE
  ),
  standardize_subject_ids = list(
    target_columns = "study_id",
    prefix = "PS",
    suffix = "P2",
    range = c(1, 100),
    nchar = 7
  ),
  to_numeric = list(target_columns = "sex", lang = "en"),
  dictionary = NULL
)