Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with read_output() when using read_only argument #38

Open
palderman opened this issue Sep 23, 2022 · 0 comments
Open

Problem with read_output() when using read_only argument #38

palderman opened this issue Sep 23, 2022 · 0 comments

Comments

@palderman
Copy link
Owner

read_output() is reading some columns as character that should be double when using the read_only argument. To duplicate the problem, first run the standard Kansas wheat experiment KSAS8101.WHX with CERES wheat. Then read PlantGro.OUT with:

library(DSSAT)
file.copy("/DSSAT47/Wheat/KSAS8101.WHX", ".")
options(DSSAT.CSM = "/DSSAT47/dscsm047")
run_dssat("C", "KSAS8101.WHX 1")
read_output("PlantGro.OUT",  read_only = c("TRNO", "DATE", "RUN", "RUNNO", "LAID", "CWAD", "LWAD", "SWAD", "T#AD"))
#> [1] TRUE
#> # A tibble: 251 × 10
#>    EXPERIMENT MODEL      RUN  TRNO DATE                LAID    CWAD   LWAD  SWAD
#>    <chr>      <chr>    <int> <int> <dttm>              <chr>   <chr> <dbl> <dbl>
#>  1 KSAS8101   CSCER047     1     1 1981-10-16 00:00:00 10    … 0.00…     0     0
#>  2 KSAS8101   CSCER047     1     1 1981-10-17 00:00:00 11    … 0.00…     0     0
#>  3 KSAS8101   CSCER047     1     1 1981-10-18 00:00:00 12    … 0.00…     0     0
#>  4 KSAS8101   CSCER047     1     1 1981-10-19 00:00:00 13    … 0.00…     0     0
#>  5 KSAS8101   CSCER047     1     1 1981-10-20 00:00:00 14    … 0.00…     0     0
#>  6 KSAS8101   CSCER047     1     1 1981-10-21 00:00:00 15    … 0.00…     0     0
#>  7 KSAS8101   CSCER047     1     1 1981-10-22 00:00:00 16    … 0.00…     1     0
#>  8 KSAS8101   CSCER047     1     1 1981-10-23 00:00:00 17    … 0.00…     1     0
#>  9 KSAS8101   CSCER047     1     1 1981-10-24 00:00:00 18    … 0.00…     1     1
#> 10 KSAS8101   CSCER047     1     1 1981-10-25 00:00:00 19    … 0.00…     3     2
#> # … with 241 more rows, and 1 more variable: `T#AD` <chr>

Created on 2022-09-23 by the reprex package (v2.0.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant