Function to read raw gas exchange files and "clean" data

Issue #48 new
Kevin Wolz
created an issue

Have you considering including a function that reads raw (some are now ".xlsx" files) gas exchange files and "cleans" them up a bit? Functionality could include:

1) Read in .xlsx or .csv files as directly output from the gas exchange units including all the header lines, etc.

2) Remove header lines, lines with units, etc.

3) Read in a full directory of such files, rbind them together, and automatically create an ID column (for use with fitacis) based on file name or some other user-defined sequence/columns

4) Remove blatantly poor data (e.g. negative Ci, etc.)

5) Print an output that says something like the following, which would tie directly into any additional documentation of varnames. "These are the variable input columns that you have available to use as model inputs: RH: "RH_S", "RH_R", "RHsfc" CO2: "CO_S", "CO2_R" "

I might have some old code that could help with this I could dig up if it were helpful.

Comments (3)

  1. Remko Duursma repo owner

    I have attached two old files, I wrote these in 2008. At the time, LI-6400 did not spit out XLSX files, only plain text (but with identical headers and interspersed comments).

    It did: - remove headers, clean up columns, make dataframe - option to recalculate gas exchange parameters if a new leaf area or BLCond is provided by user - average data in between 'Comment' fields (that annoyingly sit between rows of data) - move comment to data following the comment as a new column

    Note this is very old code, I would write this very differently now! Maybe some bits can be useful.

  2. Log in to comment