Skip to content

Commit

Permalink
Fix R CMD CHECK errors and issues on cran check_results.
Browse files Browse the repository at this point in the history
  • Loading branch information
rfiorella committed Aug 12, 2021
1 parent da2fac2 commit 37cfabf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 1 addition & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: NEONiso
Type: Package
Title: Tools to Calibrate and Work with NEON Atmospheric Isotope Data
Version: 0.5.0
Version: 0.5.1
Authors@R: c(person("Rich", "Fiorella", email = "rich.fiorella@utah.edu",
role = c("aut", "cre"), comment = c(ORCID = "0000-0002-0824-4777")),
person(c("Gabriel", "J."), "Bowen", email = 'gabe.bowen@utah.edu',
Expand All @@ -27,9 +27,7 @@ RoxygenNote: 7.1.1
Imports:
dplyr,
zoo,
downloader,
httr,
jsonlite,
lubridate,
neonUtilities (>= 2.0.1),
magrittr,
Expand Down
5 changes: 5 additions & 0 deletions R/calibrate_carbon.R
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ calibrate_carbon <- function(inname,

}

print(nrow(refe))
# filter for rmse estimates:
refe <- refe %>%
dplyr::filter(verticalPosition %in% c("co2Low","co2High"))

# get calibration parameters data.frame.
cal_df <- fit_carbon_regression(ref_data = refe, method = method,
calibration_half_width = calibration_half_width)
Expand Down
2 changes: 1 addition & 1 deletion R/calibrate_water.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ calibrate_water <- function(inpath,
slope_tolerance = 9999) {

# stack data available for a given site into a single timeseries.
if (packageVersion("neonUtilities") >= "2.1.1") {
if (utils::packageVersion("neonUtilities") >= "2.1.1") {
wiso_ref <- neonUtilities::stackEddy(inpath, level = "dp01", avg = 3, var = 'isoH2o')
wiso_amb <- neonUtilities::stackEddy(inpath, level = "dp01", avg = 9, var = 'isoH2o')
} else {
Expand Down
2 changes: 1 addition & 1 deletion R/restructure_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ingest_data <- function(inname, analyte) {

if (analyte == 'Co2') {

if (packageVersion("neonUtilities") >= "2.1.1") {
if (utils::packageVersion("neonUtilities") >= "2.1.1") {
data <- neonUtilities::stackEddy(inname, avg = 9, level = 'dp01', var = 'isoCo2')[[1]]
} else {
data <- neonUtilities::stackEddy(inname, avg = 9, level = 'dp01')[[1]]
Expand Down

0 comments on commit 37cfabf

Please sign in to comment.