Skip to contents

run data quality checks using {st4gi} functions

Usage

run_checks(x, sz = 10000, btwn = 0.75, within = 0.3, crop = "pt", ...)

Arguments

x

a dataframe

sz

size of farm, here taken to be 10000 sq metres

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

Value

a dataframe

Examples

f <- system.file("uon-trial-1.csv", package = "pbwrangler")
df <- read_workbooks(dir = NULL, file_to_read = f) %>%
  `[[`(1)
#> 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")
#> 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")
#> 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")
#> 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