Import raw data

The package contains a wide range of functions that let the user import raw data from a variety of instruments:

There are two ways to import raw data files into R:

import2RData

Import all raw gas measurement files contained in a folder (and all its sub-folders) using the function import2RData. Adapted to multiple greenhouse gas analyzers and other instruments:

Usage

Note

Code chunks under Usage sections are not part of the demonstration. They are meant to show you how to use the arguments in the function.

import2RData(
  path,
  instrument,
  date.format,
  timezone = "UTC",
  keep_all,
  prec,
  merge,
  ...
)

Arguments

path character string; a folder path containing all files to be imported. Ideally, to avoid any errors, the folder should only contain the files to be imported.
instrument character string; specifies which instrument was used to generate the files contained in the folder path. Choose one of the following: “DX4015”, “EGM5”, “G2201i”, “G2508”, “G4301”, “GAIA”, “GasmetPD”, “GT5000”, “HT8850”, “LI-6400”, “LI-7810”, “LI-7820”, “LI-8100”, “LI-8150”, “LI-8200”, “LI-8250”, “N2OM1”, “N2Oi2”, “skyline”, “uCH4”, “uN2O”, “UGGA”. For more information about an instrument, see the section “See Also” below.
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”.
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summer time and winter time changes.
keep_all logical; if keep_all = TRUE, keep all columns from the raw file. The default is keep_all = FALSE, and columns that are not necessary for gas flux calculation are removed.
prec, prec1, prec2, prec3 numerical vector; the precision of the instrument for each gas. Look at the examples below, or the help for each import function of each instrument, to know what values to use.
merge logical; if TRUE, merge all files as one data frame and return it in the Console, or load it in the Environment if assigned to an object.
proc.data.field numeric value; select the process data field used with the EGM-5. See import.EGM5 for more details.
pivot character string; either “long” or “wide”. If pivot = "long", each column containing information about Tsoil, Tcham, SWC, PAR and operating status (Op.stat) will be saved in a single column per parameter. If pivot = "wide", the default display of one column per chamber per parameter will be used. Used with instrument = "GAIA" only.
active logical; if active = TRUE, preserve data for active chambers only. Used with instrument = "GAIA" only.
flag numeric vector; indicates the operating status that should be used for the flux calculation. Default is flag = c(7,11), where 7 indicates “Chamber Idle Closed Clear” and 11 indicates “Chamber Idle Closed Dark”. Used with instrument = "GAIA" only.
background logical; if background = FALSE, removes all data from opened chambers. Used with instrument = "GAIA" only.
deadband numerical; define a deadband at the start of measurements (seconds). Used with instrument = "skyline" only.
shoulder numerical; include background data points before and after the measurement (seconds). Used with instrument = "skyline" only.
CH.clo.col, Op.stat.col, PAR.col, Tcham.col, Tsoil.col, SWC.col, WTD.col, CH.col character vector; a pattern to match the columns that fit the corresponding parameter. See import.GAIA, import.LI8250, or import.skyline for more details.
sensor1, sensor2 character strings; a pattern to match the columns containing the name of each sensor. By default, sensor1 = "Analog Sensor1", sensor2 = "Analog Sensor2", to match the example data file provided with the package. Set to NULL to ignore these columns. Used with instrument = "skyline" only.
inst, inst1, inst2, inst3 character strings; a pattern to match the columns containing the name of each instrument. See import.GAIA, import.LI8250 or import.skyline for more details.
gas, gas1, gas2, gas3 character vectors; a pattern to match the columns containing each gas measurement. See import.GAIA, import.LI8250, import.GasmetPD or import.skyline for more details.
dry, dry1, dry2, dry3 logical; are the gas measurements compensated for water vapor (dry fraction)? If dryX = TRUE (default), the gases are compensated for water vapor, and will be named accordingly. See import.GAIA, import.LI8250 or import.skyline for more details.
manual logical; indicates if measurements were made manually and there are no records of chamber identification, sequence, etc. If TRUE, the arguments Op.stat.col, CH.col, active, background, flag, and pivot are ignored. Used with instrument = "GAIA" only.
sep character string defining the field separator character. Values on each line of the file are separated by this character. By default, sep = "\t" for tabulation. Used with instrument = "GAIA" only.
skip integer; the number of lines of the data file to skip before beginning to read data. By default, skip = 1. Used with instrument = "GAIA" only.
CH4 character string; which column should be used for CH4 concentration. By default, CH4 = "HP_12CH4_dry". Used with instrument = "G2201i" only.
CO2 character string; which column should be used for CO2 concentration. By default, CO2 = "12CO2_dry".Used with instrument = "G2201i" only.
sum logical; if sum = TRUE (default), the arguments CH4 and CO2 are ignored and, instead, both fractions (carbon isotope 12 and 13) of each gas, are summed after correction for water vapor, to obtain the total gas concentration. See the argument range for the selection between the HP or the HR measurement of CH4 concentration. Used with instrument = "G2201i" only.
range numerical value; at which threshold should the function select between high precision (HP) and high resolution (HR) of CH4 concentration? The default is range = 10. If the methane concentration recorded in the column HP_12CH4_dry is above 10 ppm, the concentration from the columns HR_12CH4_dry and HR_13CH4 are used for the sum instead of HP. Used with instrument = "G2201i" only.

Details

In date.format, the date format refers to a date found in the raw data file, not the date format in the file name. For most instruments, the date is one of the columns in the raw data file:

  • DX4015: column Date
  • EGM5: column Date
  • G2201i: column DATE
  • G2508: column DATE
  • G4301: column DATE
  • GAIA: column Titles:
  • GasmetPD: column Date
  • GT5000: column Date
  • HT8850: column time
  • LI-6400: (see comment below)
  • LI-7810: column DATE
  • LI-7820: column DATE
  • LI-8100: column Date
  • LI-8150: column Date
  • LI-8200: (see comment below)
  • N2OM1: column Time
  • N2Oi2: column Time
  • SkyLine: column Titles:
  • uCH4: column Time Stamp
  • uN2O: column Time Stamp
  • UGGA: column Time

For the instrument LI-6400, the date is found in one of the first lines in a format containing abbreviations, for example “Thr Aug 6 2020”, which would be the date format “mdy”. For the instrument LI-8200, the date is found under one of the measurements, next to ‘“Date”:’. For the instrument LI-8250, the date format is in the file name.

The argument proc.data.field is used with the PP-Sytems EGM-5 instrument only. Look up the EGM-5 Operation Manual at page 90 for more details about the different Process Data Fields (proc.data.field).

The arguments active, pivot, flag, background, CH.col, PAR.col, Tcham.col, WTD.col, Op.stat.col, inst3, gas3, prec3, dry3, sep and skip are used with the function import.GAIA only. The arguments Tsoil.col, SWC.col, inst1, inst2, gas1, gas2, prec1, prec2, dry1, dry2, are used with both the function import.GAIA and the function import.LI8250.

The arguments CH4, CO2, sum and range are used with the function import.G2201i only.

The arguments CH.clo.col, sensor1, sensor2, inst and dry are used with the function import.skyline only.

The argument gas is used with the functions import.GasmetPD and import.skyline.

Examples

All files contained in the folder path specified are saved in a newly created folder “RData” in your working directory.

Important

In all examples, an example file from the package goFlux is retrieved using the function system.file to be used in the example. However, to use the function with your own data, the argument path must be the folder path containing your files:

import2RData(path = "your_raw_data_folder", instrument = "DX4015", 
             date.format = "ymd", prec = c(1.6, 23, 13, 2, 23, 33))
NoteFiles in sub-folders

Note that all files with the right extension (i.e., .dat, .txt, etc.) will be converted to RData when there are sub-folders within the folder specified in the path argument of the function.

For example, the instrument G2201-i from Picarro normally saves raw files with a folder structure like such: year/month/day, with one (or sometimes more) file saved per daily folder. If one specifies in the function the folder path “month”, all raw files from that month will be converted and saved in the RData folder created by the import2RData function, following the same folder structure as in the original folder path containing raw files.

See the example from the instrument G2201-i from Picarro for a demonstration.

TipLoad and merge files after import

If you wish to combine saved RData files after import, use the function list.files to retrieve all files within the RData folder with the pattern “imp.RData”. Indeed, all files converted to RData with the import functions of the goFlux R package contain the pattern “imp” before the .RData extension. The argument full.names = TRUE allows for retrieval of files within sub-folders.

Then use the function map_df to get and load all files and combine them into one data frame:

all.imp <- list.files(path = "RData", pattern = "imp.RData", full.names = TRUE) %>%
  map_df(~ get(load(.x)))

Alternatively, use the argument merge = TRUE in the function import2Rdata to merge all saved files and assign them to an object directly.

Note that data frames can only be merged if they contain the same columns.

Portable Recirculating Multiplexer

Import single raw gas measurement files from the Import function for the eosMX 12-Channel Multiplexer with the function import.eosMX12.

Usage

import.eosMX12(inputfile, timezone = "UTC", save = FALSE)

Arguments

inputfile character string; the name of a file with the extension .log
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summe…
save logical; if save = TRUE , saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE , returns the file in the Console, or load in the Environment if assig…

Details

Note that this function was designed for the following units in the raw files: , ” Epoch (unix) time for “, ,” “,” “, ,” kPa for atmospheric pressure “,” “, ,” Voltage for temperature “,” “, ,” Voltage for other AUX sensors”) If your eosMX instrument uses different units, either convert the units after import, change the settings on your instrument, or contact the maintainer of this package for support.

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "eosMX12/eosMX12.dat", package = "goFlux")

# Import in the environment
imp.eosMX12 <- import.eosMX12(inputfile = file.path)

# Or save in a RData folder in the working directory
import.eosMX12(inputfile = file.path, save = TRUE)

LI-COR

LI-6400

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata/LI6400", package = "goFlux")
import2RData(path = file.path, instrument = "LI-6400",
             date.format = "mdy", prec = c(0.15, 20))

LI-7810

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata/LI7810", package = "goFlux")
import2RData(path = file.path, instrument = "LI-7810",
             date.format = "ymd", prec = c(3.5, 0.6, 45))

LI-7820

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata/LI7820", package = "goFlux")
import2RData(path = file.path, instrument = "LI-7820",
             date.format = "ymd", prec = c(0.4, 45))

LI-8100

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata/LI8100", package = "goFlux")
import2RData(path = file.path, instrument = "LI-8100",
             date.format = "ymd", prec = c(1, 10))

LI-8150 + LI-8100A automated system

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata/LI8150", package = "goFlux")
import2RData(path = file.path, instrument = "LI-8150",
             date.format = "ymd", prec = c(1, 10))

LI-8200 (Smart Chamber)

Note that with this instrument, keep_all and prec are not valid arguments.

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata/LI8200", package = "goFlux")
import2RData(path = file.path, instrument = "LI-8200", date.format = "ymd")

LI-8250 (Multiplexer)

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata/LI8250", package = "goFlux")
import2RData(path = file.path, instrument = "LI-8250", date.format = "ymd",
             inst1 = "LI-7810", gas1 = c("CO2_DRY", "CH4_DRY", "H2O"),
             prec1 = c(3.5, 0.6, 45), SWC.col = "SWC_1", Tsoil.col = "TS_1")

LGR

UGGA (GLA132 series)

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata/UGGA", package = "goFlux")
import2RData(path = file.path, instrument = "UGGA",
             date.format = "dmy", prec = c(0.2, 1.4, 50))

MGGA (GLA131 series)

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata/UGGA", package = "goFlux")
import2RData(path = file.path, instrument = "UGGA",
             date.format = "dmy", prec = c(0.35, 0.9, 200))

N2OM1 (GLA151 series)

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata/N2OM1", package = "goFlux")
import2RData(path = file.path, instrument = "N2OM1",
             date.format = "dmy", prec = c(0.5, 2, 50))

N2Oi2 (GLA451 series)

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata/N2Oi2", package = "goFlux")
import2RData(path = file.path, instrument = "N2Oi2",
             date.format = "dmy", prec = c(0.05, 50))

Los Gatos uN2O

Import single raw gas measurement files from the Import function for the MIRA Ultra list(list(“html”), list(list(“N2O”)), list(list(list(“N[2]O”), list(“ASCII”)))) / list(list(“html”), list(list(“CO2”)), list(list(list(“CO[2]”), list(“ASCII”)))) analyzer from Aeris Technologies with the function import.uN2O.

Usage

import.uN2O(

  inputfile,

  date.format = "mdy",

  timezone = "UTC",

  save = FALSE,

  keep_all = FALSE,

  prec = c(0.2, 0.2, 15)

)

Arguments

inputfile character string; the name of a file with the extension .txt
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “mdy”, as it is the date format from the example data file pr…
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summe…
save logical; if save = TRUE , saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE , returns the file in the Console, or load in the Environment if assig…
keep_all logical; if keep_all = TRUE , keep all columns from the raw file. The default is keep_all = FALSE , and columns that are not necessary for gas flux calculation are removed.
prec numerical vector; the precision of the instrument for each gas, in the following order: “CO2dry_ppm”, “N2O_ppb” and “H2O_ppm”. The default is prec = c(0.2, 0.2, 15) .

Details

In , the date format refers to a date found in the raw data file, not the date format in the file name. For these instruments, the date is found in the column “Time Stamp”. Note that this function was designed for the following units in the raw file: , ” ppm for “, , ), , ))),”, “,” “, , ), , ))),” and “,” “, , ), , ))),” “,” “, ,” mbars for pressure “,” “, ,” Celsius for temperature”) If your Aeris instrument (MIRA Ultra , ), , ))) / , ), , ))) analyzer) uses different units, either convert the units after import, change the settings on your instrument, or contact the maintainer of this package for support. The precision of the instrument is needed to restrict kappa-max ( ) ) in the non-linear flux calculation ( ) ). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm for , ), , ))) and , ), , ))) , or 1 ppb for , ), , ))) ) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. The default values given for instrument precision are the ones found , ) for the latest model of this instrument available at the time of the creation of this function (01-2024). The precision for water vapor is currently unknown, and a default of 1 ppm is used.

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "import.uN2O/import.uN2O.dat", package = "goFlux")

# Import in the environment
imp.import.uN2O <- import.uN2O(inputfile = file.path)

# Or save in a RData folder in the working directory
import.uN2O(inputfile = file.path, save = TRUE)

Gasmet

DX4015

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata/DX4015", package = "goFlux")
import2RData(path = file.path, instrument = "DX4015",
             date.format = "ymd", prec = c(1.6, 23, 13, 2, 23, 33))

GT5000

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata/GT5000", package = "goFlux")
import2RData(path = file.path, instrument = "GT5000",
             date.format = "ymd", prec = c(1.6, 23, 13, 2, 23, 33))

Picarro

G2201-i

The arguments CH4, CO2, sum and range are used with the function import.G2201i only. Look up the Picarro G2201-i instrument under the “Single file import” section for more details.

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata/G2201i", package = "goFlux")
import2RData(path = file.path, instrument = "G2201i",
             date.format = "ymd", prec = c(0.2, 50, 100))

G2508

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata/G2508", package = "goFlux")
import2RData(path = file.path, instrument = "G2508",
             date.format = "ymd", prec = c(0.24, 0.3, 5, 0.16, 500))

G4301

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata/G4301", package = "goFlux")
import2RData(path = file.path, instrument = "G4301",
             date.format = "ymd", prec = c(0.025, 0.1, 10))

PP-Systems

EGM-5

The argument proc.data.field is used with the PP-Sytems EGM-5 instrument only. Look up the EGM-5 Operation Manual at page 90 for more details about the different Process Data Fields (proc.data.field), or the PP-Systems EGM-5 instrument under the “Single file import” section for more details about other arguments used with this instrument.

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata/EGM5", package = "goFlux")
# The argument proc.data.field is used with the PP-System EGM-5 instrument only.
import2RData(path = file.path, instrument = "EGM5",
             date.format = "dmy", prec = c(3, 1, 500), proc.data.field = 2)

Aeris Technologies

MIRA Ultra CH4/ C2H6 analyzer

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata/uCH4", package = "goFlux")
import2RData(path = file.path, instrument = "uCH4",
             date.format = "mdy", prec = c(1, 0.5, 15))

MIRA Ultra N2O/ CO2 analyzer

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata/uN2O", package = "goFlux")
import2RData(path = file.path, instrument = "uN2O",
             date.format = "mdy", prec = c(0.2, 0.2, 15))

Healthy Photon

HT8850 all-in-one GHG analyzer

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata/HT8850", package = "goFlux")
import2RData(path = file.path, instrument = "HT8850",
             date.format = "ymd", prec = c(0.5, 3, 0.5, 10))

Gasmet PD (Custom)

Import single raw gas measurement files from the Import function for the GasmetPD multiplexer from the University of Padova with the function import.GasmetPD.

Usage

import.GasmetPD(

  inputfile,

  date.format = "ymd",

  timezone = "UTC",

  save = FALSE,

  keep_all = FALSE,

  gas = c("CO2_ppm", "CH4_ppm", "N2O_ppm", "NH3_ppm", "H2O_pct"),

  prec = c(1.6, 13, 2, 23, 33)

)

Arguments

inputfile character string; the name of a file with the extension .txt
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “ymd”, as it is the date format from the example data file pr…
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summe…
save logical; if save = TRUE , saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE , returns the file in the Console, or load in the Environment if assig…
keep_all logical; if keep_all = TRUE , keep all columns from the raw file. The default is keep_all = FALSE , and columns that are not necessary for gas flux calculation are removed.
gas character vector; a pattern to match the columns containing each gas measurement. Choose from: “CO2_ppm”, “CH4_ppm”, “N2O_ppm”, “NH3_ppm”, “NO2_ppm”, “NO_ppm” and “H2O_ppm”.
prec numerical vector; the precision of the instrument for each gas. Note that the order in the arguments prec must match the order of the arguments in gas .

Details

In , the date format refers to a date found in the raw data file, not the date format in the file name. For this instrument, the date is found in the column “Date”. Note that this function was designed for the following units in the raw file: , ” ppm for “, , ), , ))),”, “,” “, , ), , ))),”, “,” “, , ), , ))),”, “,” “, , ), , ))),”, NO and “,” “, , ), , ))),” “,” “, ,” percent (%) for “, , ), , ))),” “,” “, ,” mbar for pressure”) The function converts ambient pressure to kPa (Pcham), water vapor to ppm, and , ), , ))) , , ), , ))) , , ), , ))) , NO and , ), , ))) to ppb. If your instrument uses different units, either convert the units after import, change the settings on your instrument, or contact the maintainer of this package for support. The precision of the instrument is needed to restrict kappa-max ( ) ) in the non-linear flux calculation ( ) ). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm for , ), , ))) and , ), , ))) , or 1 ppb for , ), , ))) , , ), , ))) , , ), , ))) , NO and , ), , ))) ) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. The default values given for instrument precision are the ones provided by the manufacturer upon request, for the latest model of this instrument available at the time of the creation of this function (07-2024).

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "import.GasmetPD/import.GasmetPD.dat", package = "goFlux")

# Import in the environment
imp.import.GasmetPD <- import.GasmetPD(inputfile = file.path)

# Or save in a RData folder in the working directory
import.GasmetPD(inputfile = file.path, save = TRUE)

LI-COR

Los Gatos uCH4

Import single raw gas measurement files from the Import function for the MIRA Ultra list(list(“html”), list(list(“CH4”)), list(list(list(“CH[4]”), list(“ASCII”)))) / list(list(“html”), list(list(“C2H6”)), list(list(list(“C[2]H[6]”), list(“ASCII”)))) analyzer from Aeris Technologies with the function import.uCH4.

Usage

import.uCH4(

  inputfile,

  date.format = "mdy",

  timezone = "UTC",

  save = FALSE,

  keep_all = FALSE,

  prec = c(1, 0.5, 15)

)

Arguments

inputfile character string; the name of a file with the extension .txt
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “mdy”, as it is the date format from the example data file pr…
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summe…
save logical; if save = TRUE , saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE , returns the file in the Console, or load in the Environment if assig…
keep_all logical; if keep_all = TRUE , keep all columns from the raw file. The default is keep_all = FALSE , and columns that are not necessary for gas flux calculation are removed.
prec numerical vector; the precision of the instrument for each gas, in the following order: “CH4_ppb”, “C2H6dry_ppb” and “H2O_ppm”. The default is prec = c(1, 0.5, 15) . The precision for water vapor i…

Details

In , the date format refers to a date found in the raw data file, not the date format in the file name. For these instruments, the date is found in the column “Time Stamp”. Note that this function was designed for the following units in the raw file: , ” ppm for “, , ), , ))),” and “,” “, , ), , ))),” “,” “, ,” ppb for “, , ), , ))),” “,” “, ,” mbars for pressure “,” “, ,” Celsius for temperature”) If your Aeris instrument (MIRA Ultra , ), , ))) / , ), , ))) analyzer) uses different units, either convert the units after import, change the settings on your instrument, or contact the maintainer of this package for support. The precision of the instrument is needed to restrict kappa-max ( ) ) in the non-linear flux calculation ( ) ). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm for , ), , ))) and , ), , ))) , or 1 ppb for , ), , ))) ) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. The default values given for instrument precision are the ones found , ) for the latest model of this instrument available at the time of the creation of this function (01-2024).

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "import.uCH4/import.uCH4.dat", package = "goFlux")

# Import in the environment
imp.import.uCH4 <- import.uCH4(inputfile = file.path)

# Or save in a RData folder in the working directory
import.uCH4(inputfile = file.path, save = TRUE)

LI-COR LI-7810

Import single raw gas measurement files from the Import function for LI-COR GHG analyzer LI-7810 with the function import.LI7810.

Usage

import.LI7810(

  inputfile,

  date.format = "ymd",

  timezone = "UTC",

  save = FALSE,

  keep_all = FALSE,

  prec = c(3.5, 0.6, 45)

)

Arguments

inputfile character string; the name of a file with the extension .data or .txt
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “ymd”, as it is the date format from the example data file pr…
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summe…
save logical; if save = TRUE , saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE , returns the file in the Console, or load in the Environment if assig…
keep_all logical; if keep_all = TRUE , keep all columns from the raw file. The default is keep_all = FALSE , and columns that are not necessary for gas flux calculation are removed.
prec numerical vector; the precision of the instrument for each gas, in the following order: “CO2dry_ppm”, “CH4dry_ppb” and “H2O_ppm”. The default is prec = c(3.5, 0.6, 45) .

Details

In , the date format refers to a date found in the raw data file, not the date format in the file name. For the instrument LI-7810, the date is found in the column “DATE”. Note that this function was designed for the following units in the raw file: , ” ppm for “, , ), , ))),” and “,” “, , ), , ))),” “,” “, ,” ppb for “, , ), , ))),” “,” “, ,” kPa for pressure “,” “, ,” Celsius for temperature”) If your LI-COR LI-7810 uses different units, either convert the units after import, change the settings on your instrument, or contact the maintainer of this package for support. The precision of the instrument is needed to restrict kappa-max ( ) ) in the non-linear flux calculation ( ) ). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm for , ), , ))) and , ), , ))) , or 1 ppb for , ), , ))) ) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. The default values given for instrument precision are the ones found , ) for the latest model of this instrument available at the time of the creation of this function (11-2023).

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "import.LI7810/import.LI7810.dat", package = "goFlux")

# Import in the environment
imp.import.LI7810 <- import.LI7810(inputfile = file.path)

# Or save in a RData folder in the working directory
import.LI7810(inputfile = file.path, save = TRUE)

LI-COR LI-7820

Import single raw gas measurement files from the Import function for LI-COR GHG analyzer LI-7820 with the function import.LI7820.

Usage

import.LI7820(

  inputfile,

  date.format = "ymd",

  timezone = "UTC",

  save = FALSE,

  keep_all = FALSE,

  prec = c(0.4, 45)

)

Arguments

inputfile character string; the name of a file with the extension .data or .txt
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “ymd”, as it is the date format from the example data file pr…
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summe…
save logical; if save = TRUE , saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE , returns the file in the Console, or load in the Environment if assig…
keep_all logical; if keep_all = TRUE , keep all columns from the raw file. The default is keep_all = FALSE , and columns that are not necessary for gas flux calculation are removed.
prec numerical vector; the precision of the instrument for each gas, in the following order: “N2Odry_ppb” and “H2O_ppm”. The default is prec = c(0.4, 45) .

Details

In , the date format refers to a date found in the raw data file, not the date format in the file name. For the instrument LI-7820, the date is found in the column “DATE”. Note that this function was designed for the following units in the raw file: , ” ppb for “, , ), , ))),” “,” “, ,” ppm for “, , ), , ))),” “,” “, ,” kPa for pressure “,” “, ,” Celsius for temperature”) If your LI-COR LI-7820 uses different units, either convert the units after import, change the settings on your instrument, or contact the maintainer of this package for support. The precision of the instrument is needed to restrict kappa-max ( ) ) in the non-linear flux calculation ( ) ). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm for , ), , ))) , or 1 ppb for , ), , ))) ) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. The default values given for instrument precision are the ones found , ) for the latest model of this instrument available at the time of the creation of this function (11-2023).

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "import.LI7820/import.LI7820.dat", package = "goFlux")

# Import in the environment
imp.import.LI7820 <- import.LI7820(inputfile = file.path)

# Or save in a RData folder in the working directory
import.LI7820(inputfile = file.path, save = TRUE)

LI-COR LI-8100

Import single raw gas measurement files from the Import function for LI-COR GHG analyzer LI-8100 with the function import.LI8100.

Usage

import.LI8100(

  inputfile,

  date.format = "ymd",

  timezone = "UTC",

  save = FALSE,

  keep_all = FALSE,

  prec = c(1, 10)

)

Arguments

inputfile character string; the name of a file with the extension .81x
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “ymd”, as it is the date format from the example data file pr…
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summe…
save logical; if save = TRUE , saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE , returns the file in the Console, or load in the Environment if assig…
keep_all logical; if keep_all = TRUE , keep all columns from the raw file. The default is keep_all = FALSE , and columns that are not necessary for gas flux calculation are removed.
prec numerical vector; the precision of the instrument for each gas, in the following order: “CO2dry_ppm” and “H2O_ppm”. The default is prec = c(1, 10) .

Details

In , the date format refers to a date found in the raw data file, not the date format in the file name. For the instrument LI-8100, the date is found in the column “Date”. Note that this function was designed for the following units in the raw file: , ” ppm for “, , ), , ))),” “,” “, ,” mmol/mol for “, , ), , ))),” “,” “, ,” Celsius for temperature”) If your LI-COR LI-8100 uses different units, either convert the units after import, change the settings on your instrument, or contact the maintainer of this package for support. The precision of the instrument is needed to restrict kappa-max ( ) ) in the non-linear flux calculation ( ) ). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. The default values given for instrument precision are the ones provided by the manufacturer upon request, for the latest model of this instrument available at the time of the creation of this function (11-2023).

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "import.LI8100/import.LI8100.dat", package = "goFlux")

# Import in the environment
imp.import.LI8100 <- import.LI8100(inputfile = file.path)

# Or save in a RData folder in the working directory
import.LI8100(inputfile = file.path, save = TRUE)

PP-Systems EGM-5

Import single raw gas measurement files from the Import function for the PP-Systems EGM-5 Portable list(list(“html”), list(list(“CO2”)), list(list(list(“CO[2]”), list(“ASCII”)))) Gas Analyzer with the function import.EGM5.

Usage

import.EGM5(

  inputfile,

  date.format = "dmy",

  timezone = "UTC",

  save = FALSE,

  keep_all = FALSE,

  prec = c(3, 1, 500),

  proc.data.field = NULL

)

Arguments

inputfile character string; the name of a file with the extension .TXT
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “dmy”, as it is the date format from the example data file pr…
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summe…
save logical; if save = TRUE , saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE , returns the file in the Console, or load in the Environment if assig…
keep_all logical; if keep_all = TRUE , keep all columns from the raw file. The default is keep_all = FALSE , and columns that are not necessary for gas flux calculation are removed.
prec numerical vector; the precision of the instrument for each gas, in the following order: “CO2dry_ppm”, “O2dry_pct” and “H2O_ppm”. The default is prec = c(3, 1, 500) .
proc.data.field numeric value; select the process data field used with the EGM-5. There are 5 different modes available: (1) Measure mode; (2) SRC or Custom mode; (3) CPY mode; (4) Injection mode; or (5) Static mo…

Details

In , the date format refers to a date found in the raw data file, not the date format in the file name. For the instrument EGM5, the date is found in the column “Date”. Note that this function was designed for the following units in the raw file: , ” ppm for “, , ), , ))),” “,” “, ,” % for “, , ), , ))),” (pct) “,” “, ,” mb for “, , ), , ))),” “,” “, ,” mb for pressure “,” “, ,” Celsius for temperature”) If your PP-Systems EGM-5 uses different units, either convert the units after import, change the settings on your instrument, or contact the maintainer of this package for support. Note that this instrument measures the “wet” fraction of , ), , ))) and , ), , ))) . If water vapor is measured, the dry fraction of the gases is calculated automatically. If not, it is important to measure the ambient water vapor concentration to convert gases into their dry fraction and use those in the following steps of this package. For example, “) . The precision of the instrument is needed to restrict kappa-max ( ) ) in the non-linear flux calculation ( ) ). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm for , ), , ))) and , ), , ))) , or 1% for , ), , ))) ) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. The default values given for instrument precision are the ones provided by the manufacturer upon request, for the latest model of this instrument available at the time of the creation of this function (11-2023). Look up the , ) at page 90 for more details about the different Process Data Fields ( ). Note that the default file extension for this instrument is .TXT, however, it is also possible to use with a .csv file format.

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "import.EGM5/import.EGM5.dat", package = "goFlux")

# Import in the environment
imp.import.EGM5 <- import.EGM5(inputfile = file.path)

# Or save in a RData folder in the working directory
import.EGM5(inputfile = file.path, save = TRUE)

LI-COR LI-8200

Import single raw gas measurement files from the Import function for LI-COR smart chamber (LI-8200) with the function import.LI8200.

Usage

import.LI8200(inputfile, date.format = "ymd", timezone = "UTC", save = FALSE)

Arguments

inputfile character string; the name of a file with the extension .json
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “ymd”, as it is the date format from the example data file pr…
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summe…
save logical; if save = TRUE , saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE , returns the file in the Console, or load in the Environment if assig…

Details

In , the date format refers to a date found in the raw data file, not the date format in the file name. For the instrument LI-8200, the date is found under one of the measurements, next to ‘“Date”:’. Note that this function was designed for the following units in the raw file: , ” seconds for DeadBand “,” “, ,” cm for Offset (collar height) “,” “, ,” “, ,”)), “), ))),” for Area “,” “, ,” “, ,”)), “), ))),” for volumes “,” “, ,” mmol/mol for “, , ), , ))),” “,” “, ,” kPa for pressure “,” “, ,” Celsius for temperature”) If your Smart Chamber uses different units, either convert the units after import, change the settings on your instrument, or contact the maintainer of this package for support. Important note about the total volume: it is calculated from the addition of the Area x Offset and the Chamber Volume. If a chamber volume is specified (“ChamVolume” in the raw file), that value is used, otherwise, the default value is 4244.1 , “)),”), ))) . For more precise results, remember to add the volume inside your GHG analyzer (IRGA volume; e.g., 6.4 , “)),”), ))) for the LI-7810 and the LI-7820), plus the volume inside the tubing connecting your instruments. For more details about volume estimation, download the example auxiliary file from , ) . In addition, soil temperature and moisture are read with a HydraProbe connected to the Smart Chamber. If you are using a different setup, please contact the maintainer of this package for support. As opposed to the other import functions, there is no option to “keep_all” with the Smart Chamber. If you would like to import additional data using this function, please contact the maintainer of this package for support.

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "import.LI8200/import.LI8200.dat", package = "goFlux")

# Import in the environment
imp.import.LI8200 <- import.LI8200(inputfile = file.path)

# Or save in a RData folder in the working directory
import.LI8200(inputfile = file.path, save = TRUE)

LI-COR LI-8250

Import single raw gas measurement files from the Import function for LI-COR Multiplexer (LI-8250) with the function import.LI8250.

Usage

import.LI8250(

  inputfile,

  date.format = "ymd",

  timezone = "UTC",

  save = FALSE,

  keep_all = FALSE,

  inst1,

  inst2 = NULL,

  gas1,

  gas2 = NULL,

  prec1,

  prec2 = NULL,

  dry1 = T,

  dry2 = T,

  SWC.col = NULL,

  Tsoil.col = NULL

)

Arguments

inputfile character string; the name of a file with the extension .82z
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “ymd”, as it is the date format from the example data file pr…
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summe…
save logical; if save = TRUE , saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE , returns the file in the Console, or load in the Environment if assig…
keep_all logical; if keep_all = TRUE , keep all columns from the raw file. The default is keep_all = FALSE , and columns that are not necessary for gas flux calculation are removed.
inst1, inst2 character strings; a pattern to match the columns containing the name of each instrument. For example, with a LI-COR LI-7810, inst1 = “LI-7810” and inst2 = NULL , which matches the example data fil…
gas1, gas2 character vectors; a pattern to match the columns containing each gas measurement. For example, with a LI-COR LI-7810 gas1 = c(“CO2_DRY”, “CH4_DRY”, “H2O”) and gas2 = NULL , which matches the examp…
prec1, prec2 numerical vectors; the precision of the instrument for each gas mentioned in gas1 and gas2 . For example, with a LI-COR LI-7810, prec1 = c(3.5, 0.6, 45) and prec2 = NULL , which matches the example…
dry1, dry2 logical; are the gas measurements compensated for water vapor (dry fraction)? If dryX = TRUE (default), the gases are compensated for water vapor, and will be named accordingly. For example, the co…
Tsoil.col, SWC.col character string; a pattern to match the columns that fit the corresponding parameter.

Details

Files with the format .82z are zip archives that include all measurements that occurred at a given port for one observation. Each .82z file includes two files: a data.csv file and a metadata.json file. Raw files names for .82z files are formatted with the instrument serial number and a time stamp (serial-number-YYYYMMDDHHMMSS.82z). In , the date format refers to the date format in the file name. Alternatively, the date format can be found in the data.csv file extracted from the .82z file, under the column “Date”. Note that this function was designed for the following units in the raw file, according to the data dictionary of the LI-8250 Multiplexer , ) . , ” % v/v for soil water content (SWC) “,” “, ,” litters for volumes “,” “, ,” kPa for pressure “,” “, ,” Celsius for temperature”) For each gas, the units are taken from the third row in the data.csv file. Currently, the function is adapted for use with LI-COR instruments (LI-870 , ), , ))) / , ), , ))) Analyzer or LI-78xx Trace Gas Analyzers). If you are using the function with a non-LI-COR instrument, please contact the maintainer of this package for support. Regarding the parameters , in case of uncertainty, either contact your technical support or assume that gases are compensated for water vapor, which is normally the case. The precision of the instrument is needed to restrict kappa-max ( ) ) in the non-linear flux calculation ( ) ). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm for , ), , ))) , or 1 ppb for , ), , ))) ) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. According to the data dictionary of the LI-8250 Multiplexer , ) , the column STATE indicates the chamber state, where, for example, 1 = closing and 5 = closed.

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "import.LI8250/import.LI8250.dat", package = "goFlux")

# Import in the environment
imp.import.LI8250 <- import.LI8250(inputfile = file.path)

# Or save in a RData folder in the working directory
import.LI8250(inputfile = file.path, save = TRUE)

LGR

Los Gatos UGGA

Import single raw gas measurement files from the Import function for the Los Gatos Research GHG analyzers UGGA and MGGA with the function import.UGGA.

Usage

import.UGGA(

  inputfile,

  date.format = "dmy",

  timezone = "UTC",

  save = FALSE,

  keep_all = FALSE,

  prec = c(0.2, 1.4, 50)

)

Arguments

inputfile character string; the name of a file with the extension .txt
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “dmy”, as it is the date format from the example data file pr…
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summe…
save logical; if save = TRUE , saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE , returns the file in the Console, or load in the Environment if assig…
keep_all logical; if keep_all = TRUE , keep all columns from the raw file. The default is keep_all = FALSE , and columns that are not necessary for gas flux calculation are removed.
prec numerical vector; the precision of the instrument for each gas, in the following order: “CO2dry_ppm”, “CH4dry_ppb” and “H2O_ppm”. The default is prec = c(0.2, 1.4, 50) , which corresponds to the ul…

Details

In , the date format refers to a date found in the raw data file, not the date format in the file name. For these instruments, the date is found in the column “Time”. Note that this function was designed for the following units in the raw file: , ” ppm for “, , ), , ))),”, “,” “, , ), , ))),” and “,” “, , ), , ))),” “,” “, ,” Torr for pressure “,” “, ,” Celsius for temperature”) If your LGR instrument (UGGA or MGGA) uses different units, either convert the units after import, change the settings on your instrument, or contact the maintainer of this package for support. The precision of the instrument is needed to restrict kappa-max ( ) ) in the non-linear flux calculation ( ) ). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm for , ), , ))) and , ), , ))) , or 1 ppb for , ), , ))) ) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. The default values given for instrument precision are the ones found , ) for the latest model of this instrument available at the time of the creation of this function (11-2023).

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "import.UGGA/import.UGGA.dat", package = "goFlux")

# Import in the environment
imp.import.UGGA <- import.UGGA(inputfile = file.path)

# Or save in a RData folder in the working directory
import.UGGA(inputfile = file.path, save = TRUE)

Los Gatos N2OM1

Import single raw gas measurement files from the Import function for the Los Gatos Research GHG analyzer N2OM1 with the function import.N2OM1.

Usage

import.N2OM1(

  inputfile,

  date.format = "dmy",

  timezone = "UTC",

  save = FALSE,

  keep_all = FALSE,

  prec = c(0.5, 2, 50)

)

Arguments

inputfile character string; the name of a file with the extension .txt
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “dmy”, as it is the date format from the example data file pr…
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summe…
save logical; if save = TRUE , saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE , returns the file in the Console, or load in the Environment if assig…
keep_all logical; if keep_all = TRUE , keep all columns from the raw file. The default is keep_all = FALSE , and columns that are not necessary for gas flux calculation are removed.
prec numerical vector; the precision of the instrument for each gas, in the following order: “N2Odry_ppb”, “CH4dry_ppb” and “H2O_ppm”. The default is prec = c(0.5, 2, 50) .

Details

In , the date format refers to a date found in the raw data file, not the date format in the file name. For the instrument N2OM1, the date is found in the column “Time”. Note that this function was designed for the following units in the raw file: , ” ppm for “, , ), , ))),”, “,” “, , ), , ))),” and “,” “, , ), , ))),” “,” “, ,” Torr for pressure “,” “, ,” Celsius for temperature”) If your LGR N2OM1 instrument uses different units, either convert the units after import, change the settings on your instrument, or contact the maintainer of this package for support. The precision of the instrument is needed to restrict kappa-max ( ) ) in the non-linear flux calculation ( ) ). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm for , ), , ))) , or 1 ppb for , ), , ))) and , ), , ))) ) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. The default values given for instrument precision are the ones found , ) for the latest model of this instrument available at the time of the creation of this function (12-2023).

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "import.N2OM1/import.N2OM1.dat", package = "goFlux")

# Import in the environment
imp.import.N2OM1 <- import.N2OM1(inputfile = file.path)

# Or save in a RData folder in the working directory
import.N2OM1(inputfile = file.path, save = TRUE)

Los Gatos N2Oi2

Import single raw gas measurement files from the Import function for the Los Gatos Research GLA451-N2Oi2 with the function import.N2Oi2.

Usage

import.N2Oi2(

  inputfile,

  date.format = "dmy",

  timezone = "UTC",

  save = FALSE,

  keep_all = FALSE,

  prec = c(0.05, 50)

)

Arguments

inputfile character string; the name of a file with the extension .txt
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “dmy”, as it is the date format from the example data file pr…
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summe…
save logical; if save = TRUE , saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE , returns the file in the Console, or load in the Environment if assig…
keep_all logical; if keep_all = TRUE , keep all columns from the raw file. The default is keep_all = FALSE , and columns that are not necessary for gas flux calculation are removed.
prec numerical vector; the precision of the instrument for each gas, in the following order: “N2Odry_ppb” and “H2O_ppm”. The default is prec = c(0.05, 50) .

Details

In , the date format refers to a date found in the raw data file, not the date format in the file name. For the instrument N2Oi2, the date is found in the column “Time”. Note that this function was designed for the following units in the raw file: , ” ppm for “, , ), , ))),”, “,” “, , ), , ))),” “,” “, ,” Torr for pressure “,” “, ,” Celsius for temperature”) If your LGR N2Oi2 instrument uses different units, either convert the units after import, change the settings on your instrument, or contact the maintainer of this package for support. The precision of the instrument is needed to restrict kappa-max ( ) ) in the non-linear flux calculation ( ) ). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm for , ), , ))) or 1 ppb for , ), , ))) ) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. The default values given for instrument precision are the ones found , ) for the latest model of this instrument available at the time of the creation of this function (06-2025).

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "import.N2Oi2/import.N2Oi2.dat", package = "goFlux")

# Import in the environment
imp.import.N2Oi2 <- import.N2Oi2(inputfile = file.path)

# Or save in a RData folder in the working directory
import.N2Oi2(inputfile = file.path, save = TRUE)

GAIA2TECH

Automated chamber ECOFlux

With the function import.GAIA, import single raw gas measurement files from the automated chamber ECOFlux (GAIA2TECH) linked with up to three gas analyzers. Default settings are set for two LI-COR instruments: LI-7810 (CO2, CH4 and H2O) and LI7820 (N2O and H2O), to match the example data file provided with the package.

Usage

import.GAIA(
  inputfile,
  date.format = "ymd",
  timezone = "UTC",
  pivot = "long",
  active = TRUE,
  flag = c(7, 11),
  background = FALSE,
  save = FALSE,
  CH.col = "COM5A0",
  SWC.col = "1C08_Soil Moisture",
  Tsoil.col = "1C07_Soil Temperature",
  Tcham.col = "2C07_Chamber Temperature",
  PAR.col = "3C07_Sunlight",
  WTD.col = NULL,
  Op.stat.col = "0C06_OperatingStatus",
  inst1 = "XT2C00_Instrument",
  inst2 = "XT3C00_Instrument",
  inst3 = NULL,
  gas1 = c("XT2C04_CH4", "XT2C05_CO2", "XT2C06_H2O"),
  gas2 = c("XT3C04_N2O", "XT3C05_H2O"),
  gas3 = NULL,
  prec1 = c(0.6, 3.5, 45),
  prec2 = c(0.4, 45),
  prec3 = NULL,
  dry1 = T,
  dry2 = T,
  dry3 = NULL,
  manual = FALSE,
  sep = "\t",
  skip = 1
)

Arguments

inputfile character string; the name of a file with the extension .csv
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “ymd”, as it is the date format from the example data file provided.
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summer time and winter time changes.
pivot character string; either “long” or “wide”. If pivot = "long", each column containing information about Tsoil, Tcham, SWC, PAR and operating status (Op.stat) will be saved in a single column per parameter. If pivot = "wide", the default display of one column per chamber per parameter will be used.
active logical; if active = TRUE, preserve data for active chambers only.
flag numeric vector; indicates the operating status that should be used for the flux calculation. Default is flag = c(7,11), where 7 indicates “Chamber Idle Closed Clear” and 11 indicates “Chamber Idle Closed Dark”.
background logical; if background = FALSE, removes all data from activ.cham == "Background".
save logical; if save = TRUE, saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE, returns the file in the Console, or load in the Environment if assigned to an object.
PAR.col, Tcham.col, Tsoil.col, SWC.col, WTD.col character vector; a vector of patterns to match all columns that fit the corresponding parameters. See details below for more information.
Op.stat.col, CH.col character string; a pattern to match columns that fit the corresponding parameters: see details below.
inst1, inst2, inst3 character strings; a pattern to match the columns containing the name of each instrument. By default, inst1 = "XT2C00_Instrument", inst2 = "XT3C00_Instrument", and inst3 = NULL, to match the example data file provided with the package.
gas1, gas2, gas3 character vectors; a pattern to match the columns containing each gas measurement. By default, gas1 = c("XT2C04_CH4", "XT2C05_CO2", "XT2C06_H2O"), gas2 = c("XT3C04_N2O", "XT3C05_H2O"), and gas3 = NULL, to match the example data file provided with the package.
prec1, prec2, prec3 numerical vectors; the precision of the instrument for each gas mentioned in gas1, gas2 and gas3. By default, prec1 = c(0.6, 3.5, 45), prec2 = c(0.4, 45), and prec3 = NULL, to match the example data file provided with the package. Note that the order in the arguments precX must match the order of the arguments in gasX.
dry1, dry2, dry3 logical; are the gas measurements compensated for water vapor (dry fraction)? If dryX = TRUE (default), the gases are compensated for water vapor, and will be named accordingly. For example, the column “XT2C05_CO2” will become “CO2dry_ppm”.
manual logical; indicates if measurements were made manually and there are no records of chamber identification, sequence, etc. If TRUE, the arguments Op.stat.col, CH.col, active, background, flag, and pivot are ignored.
sep character string defining the field separator character. Values on each line of the file are separated by this character. By default, sep = "\t" for tabulation.
skip integer; the number of lines of the data file to skip before beginning to read data. By default, skip = 1.

Details

This function has been designed for the automated chamber ECOFlux (GAIA2TECH) synced with up to 9 chambers and two GHG analyzers from LI-COR (LI-7810: CO2, CH4 and H2O / LI7820: N2O and H2O). If this function could be useful for you, but does not meet your needs, please contact the maintainer of this package for potential adaptations.

In date.format, the date format refers to a date found in the raw data file, not the date format in the file name. For the instrument GAIA the date is found in the column “Titles:”.

The arguments PAR.col, Tcham.col, Tsoil.col, SWC.col, and WTD.col correspond to different types of probes linked to the ECOFlux chamber: PAR (sunlight), chamber temperature, soil temperature, soil water content and water table depth, respectively. All columns containing the patterns specified in these arguments will be selected and renamed with the corresponding argument. For example, if PAR = "3C07_Sunlight", all columns containing the pattern “3C07_Sunlight” will be renamed with the pattern “_PAR”. Then, if pivot = "long", all columns with the pattern “_PAR” will be merged together. If PAR = c("3C07_Sunlight1", "3C07_Sunlight2"), these patterns will be renamed to PAR1 and PAR2.

The argument Op.stat.col corresponds to the columns Operating Status of each chamber. The argument CH.col indicates a character string preceding the chamber number for each column of the raw data. For example, the column “COM5A010C06_OperatingStatus” in the raw data file contains the Operating Status for the chamber 1 if CH.col = "COM5A0" and Op.stat.col = "0C06_OperatingStatus". If these columns are absent from the raw data, set arguments to NULL.

Note that this function was designed for the following units in the raw file:

  • kPa for pressure
  • volumetric water content (%) for soil moisture
  • Celsius for air temperature
  • µmol photons m-2s-1 for PAR

For each gas, the units are taken from the second row in the raw file (Units:). If your instruments use different units, either convert the units after import, change the settings on your instruments, or contact the maintainer of this package for support.

Regarding the parameters dryX, in case of uncertainty, either contact your technical support or assume that gases are compensated for water vapor, which is normally the case.

As opposed to the other import functions, there is no option to “keep_all” with this instrument. If you would like to import additional data using this function, please contact the maintainer of this package for support.

The precision of the instrument is needed to restrict kappa-max (k.max) in the non-linear flux calculation (HM.flux). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm for CO2 and H2O, or 1 ppb for CH4 and N2O) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. The default values given for instrument precision are the ones found online for the latest models of the LI-7810 and LI-7820, available at the time of the creation of this function (11-2023).

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "GAIA/GAIA.csv", package = "goFlux")

# Import in the environment
imp.GAIA <- import.GAIA(inputfile = file.path)

# Or save in a RData folder in the working directory
import.GAIA(inputfile = file.path, save = TRUE)

Skyline2D

Import single raw gas measurement files from the Import function for the SkyLine2D system linked to one GHG analyzer with the function import.skyline.

Usage

import.skyline(

  inputfile,

  date.format = "ymd",

  timezone = "UTC",

  save = FALSE,

  keep_all = FALSE,

  deadband = 0,

  shoulder = 20,

  CH.col = "CH ID",

  CH.clo.col = "Chamber closed",

  sensor1 = "Analog Sensor1",

  sensor2 = "Analog Sensor2",

  inst = "Instrument",

  gas = c("CO2", "CH4 Dry", "N2O Dry", "H2O"),

  prec = c(0.24, 0.3, 5, 500),

  dry = T

)

Arguments

inputfile character string; the name of a file with the extension .csv
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “ymd”, as it is the date format from the example data file pr…
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summe…
save logical; if save = TRUE , saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE , returns the file in the Console, or load in the Environment if assig…
keep_all logical; if keep_all = TRUE , keep all columns from the raw file. The default is keep_all = FALSE , and columns that are not necessary for gas flux calculation are removed.
deadband numerical; define a deadband at the start of measurements (seconds).
shoulder numerical; include background data points before and after the measurement (seconds).
CH.clo.col, CH.col character string; a pattern to match columns that fit the corresponding parameters: CH.col = “CH ID” and CH.clo.col = “Chamber closed” .
sensor1, sensor2 character strings; a pattern to match the columns containing the name of each sensor. By default, sensor1 = “Analog Sensor1” , sensor2 = “Analog Sensor2” , to match the example data file provided w…
inst character string; a pattern to match the column containing the name of the GHG analyzer: inst = “Instrument” .
gas character vector; a pattern to match the columns containing each gas measurement. By default, gas = c(“CO2”, “CH4 Dry”, “N2O Dry”, “H2O”) , to match the example data file provided with the package.
prec numerical vector; the precision of the instrument for each gas mentioned in gas . By default, prec = c(0.24, 0.3, 5, 500) , to match the example data file provided with the package. Note that the o…
dry logical; are the gas measurements compensated for water vapor (dry fraction)? If dry = TRUE (default), the gases are already compensated for water vapor. Otherwise, the gases will be converted to a…

Details

This function has been designed for the SkyLine2D system file generated by GAIA2TECH synced with the Picarro G2508 ( , ), , ))) , , ), , ))) , , ), , ))) and , ), , ))) )). If this function could be useful for you, but does not meet your needs, please contact the maintainer of this package for potential adaptations. In , the date format refers to a date found in the raw data file, not the date format in the file name. For the SkyLine2D system, the date is found in the column “Titles:”. Be mindful that when you open a .csv file in Excel, the software often changes date formats. To avoid any discrepancy, open the file in a text file. The argument corresponds to the column “Chamber closed”. Any number above 0 in that column indicate that the chamber is closed. The argument corresponds to the column “CH ID” indicating which chamber is active. For each gas, the units are taken from the second row in the raw file (Units:). If your instrument uses different units, either convert the units after import, change the settings on your instruments, or contact the maintainer of this package for support. Regarding the parameters , in case of uncertainty, either contact your technical support or assume that gases are compensated for water vapor, which is normally the case. As opposed to the other import functions, there is no option to “keep_all” with this instrument. If you would like to import additional data using this function, please contact the maintainer of this package for support. The precision of the instrument is needed to restrict kappa-max ( ) ) in the non-linear flux calculation ( ) ). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm for , ), , ))) and , ), , ))) , or 1 ppb for , ), , ))) and , ), , ))) ) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. The default values given for instrument precision are the ones found online for the latest models of the , ) , available at the time of the creation of this function (10-2025).

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "import.skyline/import.skyline.dat", package = "goFlux")

# Import in the environment
imp.import.skyline <- import.skyline(inputfile = file.path)

# Or save in a RData folder in the working directory
import.skyline(inputfile = file.path, save = TRUE)

Gasmet

Gasmet DX4015

Import single raw gas measurement files from the Import function for the Gasmet DX4015 portable FTIR gas analyzer for humid conditions with the function import.DX4015.

Usage

import.DX4015(

  inputfile,

  date.format = "ymd",

  timezone = "UTC",

  save = FALSE,

  keep_all = FALSE,

  prec = c(1.6, 23, 13, 2, 23, 33)

)

Arguments

inputfile character string; the name of a file with the extension .TXT
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “ymd”, as it is the date format from the example data file pr…
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summe…
save logical; if save = TRUE , saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE , returns the file in the Console, or load in the Environment if assig…
keep_all logical; if keep_all = TRUE , keep all columns from the raw file. The default is keep_all = FALSE , and columns that are not necessary for gas flux calculation are removed.
prec numerical vector; the precision of the instrument for each gas, in the following order: “CO2dry_ppm”, “COdry_ppb”, “CH4dry_ppb”, “N2Odry_ppb”, “NH3dry_ppb” and “H2O_ppm”. The default is prec = c(1….

Details

In , the date format refers to a date found in the raw data file, not the date format in the file name. For the instrument DX4015, the date is found in the column “Date”. Note that this function was designed for the following units in the raw file: , ” ppm for “, , ), , ))),”, “,” CO, “, , ), , ))),”, “,” “, , ), , ))),” and “,” “, , ), , ))),” “,” “, ,” vol-% for “, , ), , ))),” “,” “, ,” mbar for pressure “,” “, ,” Celsius for temperature”) If your Gasmet DX4015 uses different units, either convert the units after import, change the settings on your instrument, or contact the maintainer of this package for support. The precision of the instrument is needed to restrict kappa-max ( ) ) in the non-linear flux calculation ( ) ). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm for , ), , ))) and , ), , ))) , or 1 ppb for , ), , ))) , CO , ), , ))) and , ), , ))) ) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. The default values given for instrument precision are the ones provided by the manufacturer upon request, for the latest model of this instrument available at the time of the creation of this function (11-2023).

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "import.DX4015/import.DX4015.dat", package = "goFlux")

# Import in the environment
imp.import.DX4015 <- import.DX4015(inputfile = file.path)

# Or save in a RData folder in the working directory
import.DX4015(inputfile = file.path, save = TRUE)

Gasmet GT5000

Import single raw gas measurement files from the Import function for the Gasmet GT5000 Terra - Splashproof multigas FTIR analyzer with the function import.GT5000.

Usage

import.GT5000(

  inputfile,

  date.format = "ymd",

  timezone = "UTC",

  save = FALSE,

  keep_all = FALSE,

  prec = c(1.6, 23, 13, 2, 23, 33)

)

Arguments

inputfile character string; the name of a file with the extension .TXT
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “ymd”, as it is the date format from the example data file pr…
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summe…
save logical; if save = TRUE , saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE , returns the file in the Console, or load in the Environment if assig…
keep_all logical; if keep_all = TRUE , keep all columns from the raw file. The default is keep_all = FALSE , and columns that are not necessary for gas flux calculation are removed.
prec numerical vector; the precision of the instrument for each gas, in the following order: “CO2dry_ppm”, “COdry_ppb”, “CH4dry_ppb”, “N2Odry_ppb”, “NH3dry_ppb” and “H2O_ppm”. The default is prec = c(1….

Details

In , the date format refers to a date found in the raw data file, not the date format in the file name. For the instrument GT5000, the date is found in the column “Date”. Note that this function was designed for the following units in the raw file: , ” ppm for “, , ), , ))),”, “,” CO, “, , ), , ))),”, “,” “, , ), , ))),” and “,” “, , ), , ))),” “,” “, ,” vol-% for “, , ), , ))),” “,” “, ,” mbar for pressure “,” “, ,” Celsius for temperature”) If your Gasmet GT5000 uses different units, either convert the units after import, change the settings on your instrument, or contact the maintainer of this package for support. The precision of the instrument is needed to restrict kappa-max ( ) ) in the non-linear flux calculation ( ) ). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm for , ), , ))) and , ), , ))) , or 1 ppb for , ), , ))) , CO , ), , ))) and , ), , ))) ) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. The default values given for instrument precision are the ones provided by the manufacturer upon request, for the latest model of this instrument available at the time of the creation of this function (08-2024).

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "import.GT5000/import.GT5000.dat", package = "goFlux")

# Import in the environment
imp.import.GT5000 <- import.GT5000(inputfile = file.path)

# Or save in a RData folder in the working directory
import.GT5000(inputfile = file.path, save = TRUE)

Picarro

Picarro G2201-i

Import single raw gas measurement files from the Import function for the Picarro G2201-i Isotopic Analyzer with the function import.G2201i.

Usage

import.G2201i(

  inputfile,

  date.format = "ymd",

  timezone = "UTC",

  save = FALSE,

  keep_all = FALSE,

  prec = c(0.2, 50, 100),

  CH4 = "HP_12CH4_dry",

  CO2 = "12CO2_dry",

  sum = TRUE,

  range = 10

)

Arguments

inputfile character string; the name of a file with the extension .dat
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “ymd”, as it is the date format from the example data file pr…
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summe…
save logical; if save = TRUE , saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE , returns the file in the Console, or load in the Environment if assig…
keep_all logical; if keep_all = TRUE , keep all columns from the raw file. The default is keep_all = FALSE , and columns that are not necessary for gas flux calculation are removed.
prec numerical vector; the precision of the instrument for each gas, in the following order: “CO2dry_ppm”, “CH4dry_ppb” and “H2O_ppm”. The default is prec = c(0.2, 50, 100) .
CH4 character string; which column should be used for html CH4 CH[4] ASCII concentration. By default, CH4 = “HP_12CH4_dry” .
CO2 character string; which column should be used for html CO2 CO[2] ASCII concentration. By default, CO2 = “12CO2_dry” .
sum logical; if sum = TRUE (default), the arguments CH4 and CO2 are ignored and, instead, both fractions (carbon isotope 12 and 13) of each gas, are summed after correction for water vapor, to obtain t…
range numerical value; at which threshold should the function select between high precision (HP) and high resolution (HR) of html CH4 CH[4] ASCII concentration? The default is range = 10 . If …

Details

In , the date format refers to a date found in the raw data file, not the date format in the file name. For the instrument G2201-i, the date is found in the column “DATE”. The arguments and require the user to specify which columns contain the two gases of interest among the following for : , ” HP_12CH4 “,” “, ,” HP_12CH4_dry “,” “, ,” HP_13CH4 “,” “, ,” HR_12CH4 “,” “, ,” HR_12CH4_dry “,” “, ,” HR_13CH4”) And among the following for : , ” 12CO2 “,” “, ,” 12CO2_dry “,” “, ,” 13CO2 “,” “, ,” 13CO2_dry”) Note that, HP stands for , ), , ))) concentration measured with strong line for high precision but limited range and HR stands for , ), , ))) concentration measured with high range (between 10 and 1000 ppm). In addition, _dry stands for dry mole fraction of gases, corrected for water vapor. Finally, 12 and 13 indicate each carbon isotope contained in each gas. If one selects one of the non-dry mole fraction, it will be corrected for water vapor during the import process. Note that this function was designed for the following units in the raw file: , ” ppm for “, , ), , ))),” and “,” “, , ), , ))),” “,” “, ,” percent (%) for “, , ), , ))),” “,” “, ,” Torr for pressure “,” “, ,” Celsius for temperature”) If your Picarro G2201-i uses different units, either convert the units after import, change the settings on your instrument, or contact the maintainer of this package for support. The precision of the instrument is needed to restrict kappa-max ( ) ) in the non-linear flux calculation ( ) ). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. The default values given for instrument precision are the ones found , ) for the latest model of this instrument, available at the time of the creation of this function (05-2025).

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "import.G2201i/import.G2201i.dat", package = "goFlux")

# Import in the environment
imp.import.G2201i <- import.G2201i(inputfile = file.path)

# Or save in a RData folder in the working directory
import.G2201i(inputfile = file.path, save = TRUE)

Picarro G2508

Import single raw gas measurement files from the Import function for Picarro G2508 GHG analyzer with the function import.G2508.

Usage

import.G2508(

  inputfile,

  date.format = "ymd",

  timezone = "UTC",

  save = FALSE,

  keep_all = FALSE,

  prec = c(0.24, 0.3, 5, 0.16, 500)

)

Arguments

inputfile character string; the name of a file with the extension .dat
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “ymd”, as it is the date format from the example data file pr…
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summe…
save logical; if save = TRUE , saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE , returns the file in the Console, or load in the Environment if assig…
keep_all logical; if keep_all = TRUE , keep all columns from the raw file. The default is keep_all = FALSE , and columns that are not necessary for gas flux calculation are removed.
prec numerical vector; the precision of the instrument for each gas, in the following order: “CO2dry_ppm”, “CH4dry_ppb”, “N2Odry_ppb”, “NH3dry_ppb” and “H2O_ppm”. The default is prec = c(0.24, 0.3, 5, 0…

Details

In , the date format refers to a date found in the raw data file, not the date format in the file name. For the instrument G2508, the date is found in the column “DATE”. Note that this function was designed for the following units in the raw file: , ” ppm for “, , ), , ))),” “,” “, ,” ppb for “, , ), , ))),”, “,” “, , ), , ))),” and “,” “, , ), , ))),” “,” “, ,” mmol/mol for “, , ), , ))),” “,” “, ,” Torr for pressure “,” “, ,” Celsius for temperature”) If your Picarro G2508 uses different units, either convert the units after import, change the settings on your instrument, or contact the maintainer of this package for support. The precision of the instrument is needed to restrict kappa-max ( ) ) in the non-linear flux calculation ( ) ). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm for , ), , ))) and , ), , ))) , or 1 ppb for , ), , ))) , , ), , ))) and , ), , ))) ) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. The default values given for instrument precision are the ones found , ) for the latest model of this instrument, available at the time of the creation of this function (11-2023).

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "import.G2508/import.G2508.dat", package = "goFlux")

# Import in the environment
imp.import.G2508 <- import.G2508(inputfile = file.path)

# Or save in a RData folder in the working directory
import.G2508(inputfile = file.path, save = TRUE)

Picarro G4301

Import single raw gas measurement files from the Import function for the Picarro list(list(“html”), list(list(“GasScouterTM”)), list(list(list(“GasScouter^{TM}”), list(“ASCII”)))) G4301 Mobile Gas Concentration Analyzer with the function import.G4301.

Usage

import.G4301(

  inputfile,

  date.format = "ymd",

  timezone = "UTC",

  save = FALSE,

  keep_all = FALSE,

  prec = c(0.025, 0.1, 10)

)

Arguments

inputfile character string; the name of a file with the extension .dat
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “ymd”, as it is the date format from the example data file pr…
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summe…
save logical; if save = TRUE , saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE , returns the file in the Console, or load in the Environment if assig…
keep_all logical; if keep_all = TRUE , keep all columns from the raw file. The default is keep_all = FALSE , and columns that are not necessary for gas flux calculation are removed.
prec numerical vector; the precision of the instrument for each gas, in the following order: “CO2dry_ppm”, “CH4dry_ppb” and “H2O_ppm”. The default is prec = c(0.025, 0.1, 10) .

Details

In , the date format refers to a date found in the raw data file, not the date format in the file name. For the instrument G4301, the date is found in the column “DATE”. Note that this function was designed for the following units in the raw file: , ” ppm for “, , ), , ))),” “,” “, ,” ppb for “, , ), , ))),” “,” “, ,” mmol/mol for “, , ), , ))),” “,” “, ,” Torr for pressure “,” “, ,” Celsius for temperature”) If your Picarro G4301 uses different units, either convert the units after import, change the settings on your instrument, or contact the maintainer of this package for support. The precision of the instrument is needed to restrict kappa-max ( ) ) in the non-linear flux calculation ( ) ). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm for , ), , ))) and , ), , ))) , or 1 ppb for , ), , ))) ) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. The default values given for instrument precision are the ones found , ) for the latest model of this instrument, available at the time of the creation of this function (11-2023).

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "import.G4301/import.G4301.dat", package = "goFlux")

# Import in the environment
imp.import.G4301 <- import.G4301(inputfile = file.path)

# Or save in a RData folder in the working directory
import.G4301(inputfile = file.path, save = TRUE)

PP-Systems

EGM-5

Import single raw gas measurement files from the PP-Systems EGM-5 Portable CO2 Gas Analyzer, with the function import.EGM5.

Usage

import.EGM5(
  inputfile,
  date.format = "dmy",
  timezone = "UTC",
  save = FALSE,
  keep_all = FALSE,
  prec = c(3, 1, 500),
  proc.data.field = NULL
)

Arguments

inputfile character string; the name of a file with the extension .TXT
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “dmy”, as it is the date format from the example data file provided.
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summer time and winter time changes.
save logical; if save = TRUE, saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE, returns the file in the Console, or load in the Environment if assigned to an object.
keep_all logical; if keep_all = TRUE, keep all columns from the raw file. The default is keep_all = FALSE, and columns that are not necessary for gas flux calculation are removed.
prec numerical vector; the precision of the instrument for each gas, in the following order: “CO2dry_ppm”, “O2dry_pct” and H2O_ppm”. The default is prec = c(3, 1, 500).
proc.data.field numeric value; select the process data field used with the EGM-5. There are 5 different modes available: (1) Measure mode; (2) SRC or Custom mode; (3) CPY mode; (4) Injection mode; or (5) Static mode. If no value is specified, the parameters will be named “param1”, “param2”, “param3”, “param4” and “param5”.

Details

In date.format, the date format refers to a date found in the raw data file, not the date format in the file name. For the instrument EGM5, the date is found in the column “Date”.

Note that this function was designed for the following units in the raw file:

  • ppm for CO2
  • % for O2 (pct)
  • mb for H2O
  • mb for pressure
  • Celsius for temperature

If your PP-Systems EGM-5 uses different units, either convert the units after import, change the settings on your instrument, or contact the maintainer of this package for support.

The precision of the instrument is needed to restrict kappa-max (k.max) in the non-linear flux calculation (HM.flux). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm for CO2 and H2O, or 1% for O2) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. The default values given for instrument precision are the ones provided by the manufacturer upon request, for the latest model of this instrument available at the time of the creation of this function (11-2023).

Look up the EGM-5 Operation Manual at page 90 for more details about the different Process Data Fields (proc.data.field).

Note that the default file extension for this instrument is .TXT, however, it is also possible to use with a .csv file format.

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "EGM5/EGM5.TXT", package = "goFlux")

# Import in the environment
imp.EGM5 <- import.EGM5(inputfile = file.path)

# Or save in a RData folder in the working directory
import.EGM5(inputfile = file.path, save = TRUE)

Aeris Technologies

MIRA Ultra CH4/ C2H6 analyzer

Import single raw data files from the MIRA Ultra CH4/ C2H6 Natural Gas Leak Detection System (with GPS) from Aeris Technologies with the function import.uCH4.

Usage

import.uCH4(
  inputfile,
  date.format = "mdy",
  timezone = "UTC",
  save = FALSE,
  keep_all = FALSE,
  prec = c(1, 0.5, 15)
)

Arguments

inputfile character string; the name of a file with the extension .txt
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “mdy”, as it is the date format from the example data file provided.
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summer time and winter time changes.
save logical; if save = TRUE, saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE, returns the file in the Console, or load in the Environment if assigned to an object.
keep_all logical; if keep_all = TRUE, keep all columns from the raw file. The default is keep_all = FALSE, and columns that are not necessary for gas flux calculation are removed.
prec numerical vector; the precision of the instrument for each gas, in the following order: “CH4_ppb”, “C2H6dry_ppb” and “H2O_ppm”. The default is prec = c(1, 0.5, 15). The precision for water vapor is currently unknown, and a default of 1 ppm is used.

Details

In date.format, the date format refers to a date found in the raw data file, not the date format in the file name. For these instruments, the date is found in the column “Time Stamp”.

Note that this function was designed for the following units in the raw file:

  • ppm for CH4 and H2O
  • ppb for C2H6
  • mbars for pressure
  • Celsius for temperature

If your Aeris instrument (MIRA Ultra CH4/ C2H6 analyzer) uses different units, either convert the units after import, change the settings on your instrument, or contact the maintainer of this package for support.

The precision of the instrument is needed to restrict kappa-max (k.max) in the non-linear flux calculation (HM.flux). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm for C2H6 and CH4, or 1 ppb for H2O) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. The default values given for instrument precision are the ones found online for the latest model of this instrument available at the time of the creation of this function (01-2024). The precision for water vapor is currently unknown, and a default of 1 ppm is used.

Examples

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "uCH4/uCH4.txt", package = "goFlux")

# Import in the environment
imp.uCH4 <- import.uCH4(inputfile = file.path)

# Or save in a RData folder in the working directory
import.uCH4(inputfile = file.path, save = TRUE)

MIRA Ultra N2O/ CO2 analyzer

Import single raw data files from the MIRA Ultra N2O/ CO2 High Accuracy Analyzer (with GPS) from Aeris Technologies with the function import.uN2O.

Usage

import.uN2O(
  inputfile,
  date.format = "mdy",
  timezone = "UTC",
  save = FALSE,
  keep_all = FALSE,
  prec = c(0.2, 0.2, 15)
)

Arguments

inputfile character string; the name of a file with the extension .txt
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “mdy”, as it is the date format from the example data file provided.
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summer time and winter time changes.
save logical; if save = TRUE, saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE, returns the file in the Console, or load in the Environment if assigned to an object.
keep_all logical; if keep_all = TRUE, keep all columns from the raw file. The default is keep_all = FALSE, and columns that are not necessary for gas flux calculation are removed.
prec numerical vector; the precision of the instrument for each gas, in the following order: “CO2dry_ppm”, “N2O_ppb” and “H2O_ppm”. The default is prec = c(0.2, 0.2, 15).

Details

In date.format, the date format refers to a date found in the raw data file, not the date format in the file name. For these instruments, the date is found in the column “Time Stamp”.

Note that this function was designed for the following units in the raw file:

  • ppm for CO2, N2O and H2O
  • mbars for pressure
  • Celsius for temperature

If your Aeris instrument (MIRA Ultra N2O/ CO2 analyzer) uses different units, either convert the units after import, change the settings on your instrument, or contact the maintainer of this package for support.

The precision of the instrument is needed to restrict kappa-max (k.max) in the non-linear flux calculation (HM.flux). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm for CO2 and N2O, or 1 ppb for H2O) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. The default values given for instrument precision are the ones found online for the latest model of this instrument available at the time of the creation of this function (01-2024). The precision for water vapor is currently unknown, and a default of 1 ppm is used.

Examples

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "uN2O/uN2O.txt", package = "goFlux")

# Import in the environment
imp.uN2O <- import.uN2O(inputfile = file.path)

# Or save in a RData folder in the working directory
import.uN2O(inputfile = file.path, save = TRUE)

Healthy Photon

Healthy Photon HT8850

Import single raw gas measurement files from the Import function for the all-in-one GHG analyzer HT8850 from Healthy Photon with the function import.HT8850.

Usage

import.HT8850(

  inputfile,

  date.format = "ymd",

  timezone = "UTC",

  save = FALSE,

  prec = c(0.5, 3, 0.5, 10)

)

Arguments

inputfile character string; the name of a file with the extension .txt
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “ymd”, as it is the date format from the example data file pr…
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summe…
save logical; if save = TRUE , saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE , returns the file in the Console, or load in the Environment if assig…
prec numerical vector; the precision of the instrument for each gas, in the following order: “CO2dry_ppm”, “CH4dry_ppb”, “N2O_ppb” and “H2O_ppm”. The default is prec = c(0.5, 3, 0.5, 10) .

Details

In , the date format refers to a date found in the raw data file, not the date format in the file name. For these instruments, the date is found in the column “time”. Note that this function was designed for the following units in the raw file: , ” ppm for “, , ), , ))),”, “,” “, , ), , ))),” and “,” “, , ), , ))),” “,” “, ,” ppb for “, , ), , )))) If your instrument uses different units, either convert the units after import, change the settings on your instrument, or contact the maintainer of this package for support. The precision of the instrument is needed to restrict kappa-max ( ) ) in the non-linear flux calculation ( ) ). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm for , ), , ))) and , ), , ))) , or 1 ppb for , ), , ))) and , ), , ))) ) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. The default values given for instrument precision are the ones found , ) for the latest model of this instrument available at the time of the creation of this function (01-2026).

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "import.HT8850/import.HT8850.dat", package = "goFlux")

# Import in the environment
imp.import.HT8850 <- import.HT8850(inputfile = file.path)

# Or save in a RData folder in the working directory
import.HT8850(inputfile = file.path, save = TRUE)

GasmetPD

Custom made multiplexer linked with the Gasmet DX4015

Imports single raw gas measurement files from the GasmetPD, a custom made multiplexer linked with the Gasmet DX4015 (CO2, CH4, N2O, NO2, NO, NH3 and H2O)

Usage

import.GasmetPD(
  inputfile,
  date.format = "ymd",
  timezone = "UTC",
  save = FALSE,
  keep_all = FALSE,
  gas = c("CO2_ppm", "CH4_ppm", "N2O_ppm", "NH3_ppm", "H2O_pct"),
  prec = c(1.6, 13, 2, 23, 33)
)

Arguments

inputfile character string; the name of a file with the extension .txt
date.format character string; specifies the date format found in the raw data file. Choose one of the following: “dmy”, “ymd”, or “mdy”. Default is “ymd”, as it is the date format from the example data file provided.
timezone character string; a time zone in which to import the data to POSIXct format. Default is “UTC”. Note about time zone: it is recommended to use the time zone “UTC” to avoid any issue related to summer time and winter time changes.
save logical; if save = TRUE, saves the file as an .RData file in a RData folder in the current working directory. If save = FALSE, returns the file in the Console, or load in the Environment if assigned to an object.
keep_all logical; if keep_all = TRUE, keep all columns from the raw file. The default is keep_all = FALSE, and columns that are not necessary for gas flux calculation are removed.
gas character vector; a pattern to match the columns containing each gas measurement. Choose from: “CO2dry_ppm”, “CH4dry_ppb”, “N2Odry_ppb”, “NH3dry_ppb”, “NO2_ppm”, “NO_ppm” and “H2O_ppm”.
prec numerical vector; the precision of the instrument for each gas. Note that the order in the arguments prec must match the order of the arguments in gas.

Details

In date.format, the date format refers to a date found in the raw data file, not the date format in the file name. For this instrument, the date is found in the column “Date”.

Note that this function was designed for the following units in the raw file:

  • ppm for CO2, CH4, N2O and NH3
  • percent (%) for H2O
  • mbar for pressure

The function converts ambient pressure to kPa (Pcham), water vapor to ppm, and CH4, N2O and NH3 to ppb. If your instrument uses different units, either convert the units after import, change the settings on your instrument, or contact the maintainer of this package for support.

The precision of the instrument is needed to restrict kappa-max (k.max) in the non-linear flux calculation (HM.flux). Kappa-max is inversely proportional to instrument precision. If the precision of your instrument is unknown, it is better to use a low value (e.g. 1 ppm for CO2 and H2O, or 1 ppb for CH4, N2O and NH3) to allow for more curvature, especially for water vapor fluxes, or very long measurements, that are normally curved. The default values given for instrument precision are the ones provided by the manufacturer upon request, for the latest model of this instrument available at the time of the creation of this function (07-2024).

Example

# Retrieve file path from example file in the goFlux package
# using the function system.file
file.path <- system.file("extdata", "GasmetPD/GasmetPD.txt", package = "goFlux")

# Import in the environment
imp.GasmetPD <- import.GasmetPD(inputfile = file.path, prec = c(1.6, 13, 2, 23, 33))

# Or save in a RData folder in the working directory
import.GasmetPD(inputfile = file.path, prec = c(1.6, 13, 2, 23, 33), save = TRUE)