diff --git a/R/checkdataset.R b/R/checkdataset.R index 563cbef..3b5760f 100644 --- a/R/checkdataset.R +++ b/R/checkdataset.R @@ -542,7 +542,7 @@ checkdataset = function(Event = NULL, Occurrence = NULL, eMoF = NULL, IPTreport mof_noSamplingdescriptor <- data.frame(level = "warning", field = "measurementType", row = NA, - message = "No sampling descriptors present: see http://vocab.nerc.ac.uk/collection/Q01/current/") + message = "No sampling descriptors/effort present: see https://github.com/EMODnet/EMODnetBiocheck/blob/master/files/workingEnvironment.R#L26") } diff --git a/R/smallfunctions.R b/R/smallfunctions.R index f3f9675..6b3101c 100644 --- a/R/smallfunctions.R +++ b/R/smallfunctions.R @@ -76,17 +76,26 @@ cleandataframe <- function (x, vector = TRUE) { } } - # turn character NAs and spaces into an actual empty cell - x <- x %>% mutate(across(where(is.character), ~na_if(., "NA"))) %>% - mutate(across(where(is.character), ~na_if(., ""))) %>% - mutate(across(where(is.character), ~na_if(., " "))) - # remove empty columns x <- x[,colSums(is.na(x))% mutate(across(where(is.character), ~na_if(., "NA"))) %>% + mutate(across(where(is.character), ~na_if(., "NULL"))) %>% + mutate(across(where(is.character), ~na_if(., ""))) %>% + mutate(across(where(is.character), ~na_if(., " "))) %>% + mutate(across(where(is.character), replace_non_ascii)) return (x) } diff --git a/README.md b/README.md index 7f8495e..b3a0d26 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ The tool is based on and builds on top of the % cleandataframe() +BODCparameters <- read.csv("~/EMODnetBiocheck/files/BODCparameters.csv") %>% cleandataframe() +BODCvalues <- read.csv("~/EMODnetBiocheck/files/BODCvalues.csv") %>% cleandataframe() + + + +use_data(BODCunits, overwrite = TRUE) +use_data(BODCvalues, overwrite = TRUE) +use_data(BODCparameters, overwrite = TRUE) use_data(BODCnomofvalues, overwrite = TRUE) use_data(BODCbiometrics, overwrite = TRUE) use_data(BODCeffort, overwrite = TRUE) diff --git a/man/BODCbiometrics.Rd b/man/BODCbiometrics.Rd index aa93348..bdd7a4e 100644 --- a/man/BODCbiometrics.Rd +++ b/man/BODCbiometrics.Rd @@ -5,7 +5,7 @@ \alias{BODCbiometrics} \title{BODC vocabulary terms related to Biometric or other Biotic data.} \format{ -An object of class \code{character} of length 12. +An object of class \code{character} of length 13. } \usage{ BODCbiometrics diff --git a/man/BODCeffort.Rd b/man/BODCeffort.Rd index ed41f43..1cb514a 100644 --- a/man/BODCeffort.Rd +++ b/man/BODCeffort.Rd @@ -5,7 +5,7 @@ \alias{BODCeffort} \title{BODC vocabulary terms related to sampling descriptors.} \format{ -An object of class \code{character} of length 6. +An object of class \code{character} of length 30. } \usage{ BODCeffort diff --git a/man/BODCquantity.Rd b/man/BODCquantity.Rd index 1be7fe9..0f3fc28 100644 --- a/man/BODCquantity.Rd +++ b/man/BODCquantity.Rd @@ -5,7 +5,7 @@ \alias{BODCquantity} \title{BODC vocabulary term related to measurements of quantities where no valueID apply.} \format{ -An object of class \code{character} of length 20. +An object of class \code{character} of length 21. } \usage{ BODCquantity