Skip to content

Commit

Permalink
Merge pull request #303 from henrykironde/sting-NA
Browse files Browse the repository at this point in the history
Set default as NA in phenocam function
  • Loading branch information
henrykironde authored Aug 8, 2024
2 parents 560de90 + 2006916 commit 7e15d88
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,5 @@ Suggests:
VignetteBuilder:
knitr
Encoding: UTF-8
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Config/testthat/edition: 3
2 changes: 1 addition & 1 deletion R/phenocam.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions man/load_datafile.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/testthat/test-99-regression.R
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down

0 comments on commit 7e15d88

Please sign in to comment.