README.md

gasexchangeR

gasexchangeR is the interface for data obtained by the photosynthetic measurement systems by LI-COR (LI6400, LI6400XT, LI6800, ...). It has two main goals:

You can install:

# install.packages("devtools") # if not installed
devtools::install_github("KeachMurakami/gasexchangeR")

Reading

gasexchangeR implements the following verb for reading LI6xxx data:

library(gasexchangeR)

sample_single <- "https://raw.githubusercontent.com/KeachMurakami/gasexchangeR/master/R/LI6400.txt"
sample_multi <- c("https://raw.githubusercontent.com/KeachMurakami/gasexchangeR/master/R/LI6400.txt",
                  "https://raw.githubusercontent.com/KeachMurakami/gasexchangeR/master/R/LI6400XT.txt")

# simple read
read_licor(file = sample_single)
#> Parsed with column specification:
#> cols(
#>   X1 = col_character()
#> )
#> Warning: 68 parsing failures.
#> row col           expected actual
#>   3  X1 delimiter or quote       
#>   3  X1 delimiter or quote     P 
#>   4  X1 delimiter or quote       
#>   4  X1 delimiter or quote     / 
#>   5  X1 delimiter or quote       
#> ... ... .................. ......
#> See problems(...) for more details.
#> $data_log
#> # A tibble: 141 × 30
#>      Obs        FTime EBTlf Photo   Cond    Ci Trmmol  VpdL  Area StmRat
#>    <dbl> <S4: Period> <dbl> <dbl>  <dbl> <dbl>  <dbl> <dbl> <dbl>  <dbl>
#> 1      1          81S 24.81  1.25 0.0226  1680  0.232  1.02     6      1
#> 2      2          86S 24.81  1.14 0.0236  1690  0.243  1.02     6      1
#> 3      3          88S 24.81  1.21 0.0241  1690  0.247  1.02     6      1
#> 4      4         268S 24.84  1.82 0.0162  1590  0.169  1.03     6      1
#> 5      5         271S 24.84  1.76 0.0169  1600  0.177  1.04     6      1
#> 6      6         274S 24.82  1.80 0.0169  1600  0.176  1.03     6      1
#> 7      7         458S 24.97  3.09 0.0125  1370  0.134  1.06     6      1
#> 8      8         462S 24.96  3.09 0.0152  1440  0.162  1.06     6      1
#> 9      9         467S 24.98  2.85 0.0135  1430  0.145  1.06     6      1
#> 10    10         726S 24.93  2.77 0.0114  1380  0.123  1.07     6      1
#> # ... with 131 more rows, and 20 more variables: BLCond <dbl>, Tair <dbl>,
#> #   Tleaf <dbl>, TBlk <dbl>, CO2R <dbl>, CO2S <dbl>, H2OR <dbl>,
#> #   H2OS <dbl>, RH_R <dbl>, RH_S <dbl>, Flow <dbl>, PARi <dbl>,
#> #   PARo <dbl>, Press <dbl>, CsMch <dbl>, HsMch <dbl>, Status <dbl>,
#> #   date <dttm>, file <chr>, hms <dbl>

# include logs for changes in conditions
read_licor(file = sample_single, info_log = T)
#> Parsed with column specification:
#> cols(
#>   X1 = col_character()
#> )
#> Warning: 68 parsing failures.
#> row col           expected actual
#>   3  X1 delimiter or quote       
#>   3  X1 delimiter or quote     P 
#>   4  X1 delimiter or quote       
#>   4  X1 delimiter or quote     / 
#>   5  X1 delimiter or quote       
#> ... ... .................. ......
#> See problems(...) for more details.
#> $data_log
#> # A tibble: 141 × 30
#>      Obs        FTime EBTlf Photo   Cond    Ci Trmmol  VpdL  Area StmRat
#>    <dbl> <S4: Period> <dbl> <dbl>  <dbl> <dbl>  <dbl> <dbl> <dbl>  <dbl>
#> 1      1          81S 24.81  1.25 0.0226  1680  0.232  1.02     6      1
#> 2      2          86S 24.81  1.14 0.0236  1690  0.243  1.02     6      1
#> 3      3          88S 24.81  1.21 0.0241  1690  0.247  1.02     6      1
#> 4      4         268S 24.84  1.82 0.0162  1590  0.169  1.03     6      1
#> 5      5         271S 24.84  1.76 0.0169  1600  0.177  1.04     6      1
#> 6      6         274S 24.82  1.80 0.0169  1600  0.176  1.03     6      1
#> 7      7         458S 24.97  3.09 0.0125  1370  0.134  1.06     6      1
#> 8      8         462S 24.96  3.09 0.0152  1440  0.162  1.06     6      1
#> 9      9         467S 24.98  2.85 0.0135  1430  0.145  1.06     6      1
#> 10    10         726S 24.93  2.77 0.0114  1380  0.123  1.07     6      1
#> # ... with 131 more rows, and 20 more variables: BLCond <dbl>, Tair <dbl>,
#> #   Tleaf <dbl>, TBlk <dbl>, CO2R <dbl>, CO2S <dbl>, H2OR <dbl>,
#> #   H2OS <dbl>, RH_R <dbl>, RH_S <dbl>, Flow <dbl>, PARi <dbl>,
#> #   PARo <dbl>, Press <dbl>, CsMch <dbl>, HsMch <dbl>, Status <dbl>,
#> #   date <dttm>, file <chr>, hms <dbl>
#> 
#> $change_log
#> # A tibble: 1 × 5
#>        hms                date        FTime       file   log
#>      <dbl>              <dttm> <S4: Period>      <chr> <chr>
#> 1 13.54806 2013-06-06 13:32:53          81S LI6400.txt

# read multiple files into a data frame
read_licor(file = sample_multi)
#> Parsed with column specification:
#> cols(
#>   X1 = col_character()
#> )
#> Warning: 68 parsing failures.
#> row col           expected actual
#>   3  X1 delimiter or quote       
#>   3  X1 delimiter or quote     P 
#>   4  X1 delimiter or quote       
#>   4  X1 delimiter or quote     / 
#>   5  X1 delimiter or quote       
#> ... ... .................. ......
#> See problems(...) for more details.
#> Parsed with column specification:
#> cols(
#>   X1 = col_character()
#> )
#> Warning: 70 parsing failures.
#> row col           expected actual
#>  17  X1 delimiter or quote       
#>  17  X1 delimiter or quote     H 
#>  17  X1 delimiter or quote       
#>  17  X1 delimiter or quote     F 
#>  17  X1 delimiter or quote       
#> ... ... .................. ......
#> See problems(...) for more details.
#> Warning in eval(substitute(expr), envir, enclos): NAs introduced by
#> coercion
#> $data_log
#> # A tibble: 1,168 × 40
#>      Obs FTime EBTlf Photo   Cond    Ci Trmmol  VpdL  Area StmRat BLCond
#>    <dbl> <dbl> <dbl> <dbl>  <dbl> <dbl>  <dbl> <dbl> <dbl>  <dbl>  <dbl>
#> 1      1    81 24.81  1.25 0.0226  1680  0.232  1.02     6      1   2.84
#> 2      2    86 24.81  1.14 0.0236  1690  0.243  1.02     6      1   2.84
#> 3      3    88 24.81  1.21 0.0241  1690  0.247  1.02     6      1   2.84
#> 4      4   268 24.84  1.82 0.0162  1590  0.169  1.03     6      1   2.84
#> 5      5   271 24.84  1.76 0.0169  1600  0.177  1.04     6      1   2.84
#> 6      6   274 24.82  1.80 0.0169  1600  0.176  1.03     6      1   2.84
#> 7      7   458 24.97  3.09 0.0125  1370  0.134  1.06     6      1   2.84
#> 8      8   462 24.96  3.09 0.0152  1440  0.162  1.06     6      1   2.84
#> 9      9   467 24.98  2.85 0.0135  1430  0.145  1.06     6      1   2.84
#> 10    10   726 24.93  2.77 0.0114  1380  0.123  1.07     6      1   2.84
#> # ... with 1,158 more rows, and 29 more variables: Tair <dbl>,
#> #   Tleaf <dbl>, TBlk <dbl>, CO2R <dbl>, CO2S <dbl>, H2OR <dbl>,
#> #   H2OS <dbl>, RH_R <dbl>, RH_S <dbl>, Flow <dbl>, PARi <dbl>,
#> #   PARo <dbl>, Press <dbl>, CsMch <dbl>, HsMch <dbl>, Status <dbl>,
#> #   date <dttm>, file <chr>, hms <dbl>, HHMMSS <dbl>, EBal <dbl>,
#> #   CTleaf <dbl>, BLC_1 <dbl>, StableF <dbl>, BLCslope <dbl>,
#> #   BLCoffst <dbl>, f_parin <dbl>, f_parout <dbl>, alphaK <dbl>

Visualizations

gasexchangeR implements the following verbs useful for visualizations:

li_scat(file = sample_multi, color = "VpdL")
#> Parsed with column specification:
#> cols(
#>   X1 = col_character()
#> )
#> Warning: 68 parsing failures.
#> row col           expected actual
#>   3  X1 delimiter or quote       
#>   3  X1 delimiter or quote     P 
#>   4  X1 delimiter or quote       
#>   4  X1 delimiter or quote     / 
#>   5  X1 delimiter or quote       
#> ... ... .................. ......
#> See problems(...) for more details.
#> Parsed with column specification:
#> cols(
#>   X1 = col_character()
#> )
#> Warning: 70 parsing failures.
#> row col           expected actual
#>  17  X1 delimiter or quote       
#>  17  X1 delimiter or quote     H 
#>  17  X1 delimiter or quote       
#>  17  X1 delimiter or quote     F 
#>  17  X1 delimiter or quote       
#> ... ... .................. ......
#> See problems(...) for more details.
#> Warning in eval(substitute(expr), envir, enclos): NAs introduced by
#> coercion

li_course(file = sample_multi, color = "Ci")
#> Parsed with column specification:
#> cols(
#>   X1 = col_character()
#> )
#> Warning: 68 parsing failures.
#> row col           expected actual
#>   3  X1 delimiter or quote       
#>   3  X1 delimiter or quote     P 
#>   4  X1 delimiter or quote       
#>   4  X1 delimiter or quote     / 
#>   5  X1 delimiter or quote       
#> ... ... .................. ......
#> See problems(...) for more details.
#> Parsed with column specification:
#> cols(
#>   X1 = col_character()
#> )
#> Warning: 70 parsing failures.
#> row col           expected actual
#>  17  X1 delimiter or quote       
#>  17  X1 delimiter or quote     H 
#>  17  X1 delimiter or quote       
#>  17  X1 delimiter or quote     F 
#>  17  X1 delimiter or quote       
#> ... ... .................. ......
#> See problems(...) for more details.

#> Warning: NAs introduced by coercion
#> Parsed with column specification:
#> cols(
#>   X1 = col_character()
#> )
#> Warning: 68 parsing failures.
#> row col           expected actual
#>   3  X1 delimiter or quote       
#>   3  X1 delimiter or quote     P 
#>   4  X1 delimiter or quote       
#>   4  X1 delimiter or quote     / 
#>   5  X1 delimiter or quote       
#> ... ... .................. ......
#> See problems(...) for more details.
#> Parsed with column specification:
#> cols(
#>   X1 = col_character()
#> )
#> Warning: 70 parsing failures.
#> row col           expected actual
#>  17  X1 delimiter or quote       
#>  17  X1 delimiter or quote     H 
#>  17  X1 delimiter or quote       
#>  17  X1 delimiter or quote     F 
#>  17  X1 delimiter or quote       
#> ... ... .................. ......
#> See problems(...) for more details.

#> Warning: NAs introduced by coercion

Session information

devtools::session_info()
#> Session info --------------------------------------------------------------
#>  setting  value                       
#>  version  R version 3.3.1 (2016-06-21)
#>  system   x86_64, darwin13.4.0        
#>  ui       X11                         
#>  language (EN)                        
#>  collate  en_US.UTF-8                 
#>  tz       Asia/Tokyo                  
#>  date     2017-03-03
#> Packages ------------------------------------------------------------------
#>  package      * version  date       source                        
#>  assertthat     0.1      2013-12-06 CRAN (R 3.3.1)                
#>  backports      1.0.4    2016-10-24 cran (@1.0.4)                 
#>  codetools      0.2-14   2015-07-15 CRAN (R 3.3.1)                
#>  colorspace     1.2-6    2015-03-11 CRAN (R 3.3.1)                
#>  curl           0.9.7    2016-04-10 CRAN (R 3.3.1)                
#>  DBI            0.4-1    2016-05-08 CRAN (R 3.3.1)                
#>  devtools       1.12.0   2016-06-24 CRAN (R 3.3.0)                
#>  digest         0.6.11   2017-01-03 cran (@0.6.11)                
#>  dplyr          0.5.0    2016-06-24 CRAN (R 3.3.1)                
#>  evaluate       0.10     2016-10-11 cran (@0.10)                  
#>  foreach        1.4.3    2015-10-13 CRAN (R 3.3.0)                
#>  gasexchangeR * 0.1.0    2017-03-03 local                         
#>  ggplot2        2.1.0    2016-03-01 url                           
#>  gtable         0.2.0    2016-02-26 CRAN (R 3.3.1)                
#>  htmltools      0.3.5    2016-03-21 CRAN (R 3.3.1)                
#>  iterators      1.0.8    2015-10-13 CRAN (R 3.3.0)                
#>  knitr          1.15.1   2016-11-22 cran (@1.15.1)                
#>  labeling       0.3      2014-08-23 CRAN (R 3.3.1)                
#>  lattice        0.20-33  2015-07-14 CRAN (R 3.3.1)                
#>  lazyeval       0.2.0    2016-06-12 CRAN (R 3.3.1)                
#>  lubridate      1.6.0    2016-09-13 CRAN (R 3.3.0)                
#>  magrittr       1.5      2014-11-22 CRAN (R 3.3.1)                
#>  Matrix         1.2-6    2016-05-02 CRAN (R 3.3.1)                
#>  memoise        1.0.0    2016-01-29 CRAN (R 3.3.1)                
#>  mgcv           1.8-12   2016-03-03 CRAN (R 3.3.1)                
#>  munsell        0.4.3    2016-02-13 CRAN (R 3.3.1)                
#>  nlme           3.1-128  2016-05-10 CRAN (R 3.3.1)                
#>  plyr           1.8.4    2016-06-08 CRAN (R 3.3.1)                
#>  R6             2.2.0    2016-10-05 cran (@2.2.0)                 
#>  Rcpp           0.12.9.4 2017-03-03 Github (RcppCore/Rcpp@0566d7c)
#>  readr          1.0.0    2016-08-03 CRAN (R 3.3.0)                
#>  reshape2       1.4.2    2016-10-22 cran (@1.4.2)                 
#>  rmarkdown      1.3      2016-12-21 cran (@1.3)                   
#>  rprojroot      1.2      2017-01-16 cran (@1.2)                   
#>  scales         0.4.1    2016-11-09 CRAN (R 3.3.2)                
#>  stringi        1.1.2    2016-10-01 cran (@1.1.2)                 
#>  stringr        1.2.0    2017-02-18 cran (@1.2.0)                 
#>  tibble         1.2      2016-08-26 CRAN (R 3.3.0)                
#>  tidyr          0.6.1    2017-01-10 cran (@0.6.1)                 
#>  withr          1.0.2    2016-06-20 CRAN (R 3.3.1)                
#>  yaml           2.1.14   2016-11-12 cran (@2.1.14)


KeachMurakami/gasexchangeR documentation built on May 8, 2019, 4:47 p.m.