run data quality checks using {st4gi}
functions
Arguments
- x
a dataframe
- sz
number of plants per plot
- btwn
spacing between ridges in metres
- within
spacing between plants in the same ridge in metres
- crop
character. one of "sp" or "pt"
- ...
additional arguments
Examples
f <- system.file("uon-trial-1.csv", package = "pbwrangler")
df <- read_workbooks(dir = NULL, file_to_read = f) %>%
`[[`(1) %>%
dplyr::mutate(
space_between_ridges = "0.75m",
space_between_plants_in_ridges = "0.3m",
number_of_plants_per_plot = 10
)
#> Rows: 108 Columns: 32
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (8): unique, geno, flowering_date, flower_colour, flesh_colour, skin_co...
#> dbl (24): plot, entry, row, col, rep, ntp, npe, growth_speed, pgh, plant_uni...
#>
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
df_checked <- run_checks(df)
#> Warning: Some columns with invalid names: c("unique", "entry", "growth_speed", "flowering_date", "flower_colour", "overall_impression", "flesh_colour", "skin_colour", "late_blight_60_days", "notes", "photo", "space_between_ridges", "space_between_plants_in_ridges", "number_of_plants_per_plot")
#> Warning: Some columns with invalid names: c("unique", "entry", "growth_speed", "flowering_date", "flower_colour", "overall_impression", "flesh_colour", "skin_colour", "late_blight_60_days", "notes", "photo", "space_between_ridges", "space_between_plants_in_ridges", "number_of_plants_per_plot")
#> Warning: Some columns with invalid names: c("unique", "entry", "growth_speed", "flowering_date", "flower_colour", "overall_impression", "flesh_colour", "skin_colour", "late_blight_60_days", "notes", "photo", "space_between_ridges", "space_between_plants_in_ridges", "number_of_plants_per_plot")
#> Warning: Rows with out of scale values replaced with NA for variable nmtp: 54
#> Warning: Rows with out of scale values replaced with NA for variable nmtci: 54
#> Warning: Rows with out of scale values replaced with NA for variable nmtcii: 54
#> Warning: Rows with out of scale values replaced with NA for variable tntp: 54
#> Warning: Rows with extreme values replaced with NA for variable atmw: 54
#> Warning: Rows with extreme values replaced with NA for variable atw: 54
#> Warning: Rows with extreme values replaced with NA for variable mtwp: 54
#> Warning: Rows with extreme values replaced with NA for variable mtwcii: 54
#> Warning: Rows with extreme values replaced with NA for variable mtyna: 54
#> Warning: Rows with extreme values replaced with NA for variable ttwp: 54
#> Warning: Rows with extreme values replaced with NA for variable ttyna: 54