Skip to content

Commit

Permalink
Adding I() notation in calls to read_fwf() to ensure compatibility wi…
Browse files Browse the repository at this point in the history
…th readr 2.0. Adding version >= 1.0.0 to dplyr entry in DESCRIPTION.
  • Loading branch information
palderman committed Jul 23, 2021
1 parent a15638a commit 549bccb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ issues
cran-comments.md
^CRAN-RELEASE$
LICENSE
vignettes
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: DSSAT
Type: Package
Title: A Comprehensive R Interface for the DSSAT Cropping Systems Model
Version: 0.0.2
Version: 0.0.3
Author: Phillip D. Alderman [aut, cre]
Maintainer: Phillip D. Alderman <[email protected]>
Description: The purpose of this package is to provide a comprehensive
Expand All @@ -17,13 +17,13 @@ Imports:
utils,
readr,
stringr,
dplyr,
dplyr (>= 1.0.0),
purrr,
glue,
tidyr,
lubridate,
rlang
RoxygenNote: 7.1.0
RoxygenNote: 7.1.1
Suggests:
knitr,
rmarkdown
Expand Down
2 changes: 1 addition & 1 deletion R/read_pest.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ read_pest <- function(file_name,col_types=NULL,col_names=NULL){
)

# Extract all tiers
pest_coefs <- read_fwf(raw_lines[sec_begin[1]:sec_end[1]],
pest_coefs <- read_fwf(I(raw_lines[sec_begin[1]:sec_end[1]]),
fwf_pos,
comment = '!',
na = c('-99','-99.','-99.0','-99.00','-99.000',
Expand Down
2 changes: 1 addition & 1 deletion R/read_tier_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ read_tier_data <- function(raw_lines,col_types=NULL,col_names=NULL,na_strings=NU
}else{
cmnt <- '!'
}
tdata <- read_fwf(raw_lines[skip[i]:end[i]],
tdata <- read_fwf(I(raw_lines[skip[i]:end[i]]),
fwf_pos[[i]],
comment = cmnt,
skip = 1,
Expand Down

0 comments on commit 549bccb

Please sign in to comment.