Skip to contents

reads Li-COR files in a given location

Usage

licoread(
  location,
  file_type = "auto",
  file_type_list = c("82z", "81x", "auto"),
  data_file = "data.csv",
  meta_file = "metadata.json",
  regex_file = "(\\w*-)*\\w*(?=([.]82z$))"
)

Arguments

location

location of the files

file_type

type of file (82z or 81x). If "auto" (default), the function will try to detect it by itself.

file_type_list

list of file types

data_file

name of the file with raw data

meta_file

name of the file with meta data

regex_file

regex expression matching the name of the 82z file. Here in case the user has a different than the default and for easier updates.

Value

a tibble (nested or not depending on raw data) containing all the data from the raw files present at the location provided

Examples

path_81x <- system.file("extdata/81x", package = "licoread")
licoread(path_81x)
#> # A tibble: 25 × 49
#>    `LI-8100`     `File Name` `Instrument Name` `Serial Number` Software Comments
#>    <chr>         <chr>       <chr>             <chr>           <chr>    <lgl>   
#>  1 "1b1\t      … 10-28-2011  81A-0107          81A-0107        4.0.0b   NA      
#>  2 "1c5\t      … 10-28-2011  81A-0107          81A-0107        4.0.0b   NA      
#>  3 "1c5\t      … 10-28-2011  81A-0107          81A-0107        4.0.0b   NA      
#>  4 "1c5\t      … 10-28-2011  81A-0107          81A-0107        4.0.0b   NA      
#>  5 "1c5\t      … 10-28-2011  81A-0107          81A-0107        4.0.0b   NA      
#>  6 "1c5\t      … 10-28-2011  81A-0107          81A-0107        4.0.0b   NA      
#>  7 "1c5\t      … 10-28-2011  81A-0107          81A-0107        4.0.0b   NA      
#>  8 "1c5\t      … 10-28-2011  81A-0107          81A-0107        4.0.0b   NA      
#>  9 "1c5\t      … 10-28-2011  81A-0107          81A-0107        4.0.0b   NA      
#> 10 "1c6\t      … 10-28-2011  81A-0107          81A-0107        4.0.0b   NA      
#> # ℹ 15 more rows
#> # ℹ 43 more variables: `Obs#` <int>, `Port#` <int>, Label <chr>,
#> #   `Observation Length` <chr>, `Pre-purge` <chr>, `Post-purge` <chr>,
#> #   `IRGA Averaging` <int>, Chamber <int>, TSource <chr>, Flow8100 <int>,
#> #   Virga <dbl>, Vext <dbl>, Vcham <dbl>, Offset <dbl>, Area <dbl>,
#> #   Vtotal <dbl>, `V4 Info` <chr>, `T4 Info` <chr>, Labels_01 <int>,
#> #   CrvFitStatus <chr>, Exp_Flux <dbl>, Exp_FluxCV <dbl>, …
path_82z <- system.file("extdata/82z", package = "licoread")
licoread(path_82z)
#> # A tibble: 3 × 38
#>   f_fluxid          data     units    `CHAMBER_AREA_cm+2` CHAMBER_COLLAR_HEIGH…¹
#>   <chr>             <list>   <list>                 <dbl>                  <dbl>
#> 1 82m-0109-2024072… <tibble> <tibble>                318.                      5
#> 2 82m-0109-2024072… <tibble> <tibble>                318.                      5
#> 3 82m-0109-2024072… <tibble> <tibble>                318.                      5
#> # ℹ abbreviated name: ¹​CHAMBER_COLLAR_HEIGHT_cm
#> # ℹ 33 more variables: CHAMBER_LATITUDE_degrees <dbl>,
#> #   CHAMBER_LONGITUDE_degrees <dbl>, CHAMBER_PARK_POSITION_degrees <dbl>,
#> #   CHAMBER_TUBE_LENGTH_cm <dbl>, `CHAMBER_VOLUME_cm+3` <dbl>,
#> #   `LI-7810_TUBE_LENGTH_cm` <dbl>, `LI-7810_VOLUME_cm+3` <dbl>,
#> #   `LI-7820_TUBE_LENGTH_cm` <dbl>, `LI-7820_VOLUME_cm+3` <dbl>,
#> #   `LI-7825_TUBE_LENGTH_cm` <dbl>, `LI-7825_VOLUME_cm+3` <dbl>, …