diff --git a/DESCRIPTION b/DESCRIPTION index a88abe9..fadbbfb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -75,5 +75,5 @@ Suggests: VignetteBuilder: knitr Encoding: UTF-8 -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 Config/testthat/edition: 3 diff --git a/R/phenocam.R b/R/phenocam.R index a04bbd9..ec69896 100644 --- a/R/phenocam.R +++ b/R/phenocam.R @@ -24,7 +24,7 @@ phenocam <- function(level = "daily", path = get_default_data_path()) pheno <- read.csv(url, - skip = 22, header = TRUE, na.strings = c(""), stringsAsFactors = FALSE, + skip = 22, header = TRUE, na.strings = c("", "NA"), stringsAsFactors = FALSE, colClasses = c("Date", rep("integer", 3), "character", rep("numeric", 22), rep("character", 5))) %>% dplyr::arrange(.data$date) diff --git a/man/load_datafile.Rd b/man/load_datafile.Rd index f318681..fcae1c9 100644 --- a/man/load_datafile.Rd +++ b/man/load_datafile.Rd @@ -18,8 +18,8 @@ load_datafile( \item{na.strings}{a character vector of strings which are to be interpreted as \code{\link{NA}} values. Blank fields are also considered to be missing values in logical, integer, numeric and - complex fields. Note that the test happens \emph{after} - white space is stripped from the input, so \code{na.strings} + complex fields. Note that the test happens \emph{after} + white space is stripped from the input, so \code{na.strings} values may need their own white space stripped in advance.} \item{path}{either the file path that contains the PortalData folder or diff --git a/tests/testthat/test-99-regression.R b/tests/testthat/test-99-regression.R index 7b69412..1456ece 100644 --- a/tests/testthat/test-99-regression.R +++ b/tests/testthat/test-99-regression.R @@ -321,9 +321,9 @@ test_that("data generated by default setting is same (phenocam)", { attributes(data) <- attributes(data)[sort(names(attributes(data)))] # correct for NAs in output - expect_known_hash(is.na(data), "4c798df02b") + expect_known_hash(is.na(data), "888e883896") data[is.na(data)] <- -999999 - expect_known_hash(data, "040fa9c6b1") + expect_known_hash(data, "7b8d62a5a9") }) test_that("seasonal summaries generated by default setting is same", {