View source: R/parseTimeSeries_elab.R
parseTimeSeries.elab | R Documentation |
This function processes tables generated by the GET.elabftw functions. This function turns a table with references to spectra measured under different conditions into a single data.frame containing the time series. Two columns must be present in the original table: A column with a time variable (some variable describing the changing measurement conditions between the spectra) and a column containing the file names of the measured spectra. All other columns will be ignored. The return value will be a data.frame containing the spectra: The first column contains the wavenumber axis, the other columns contain the measured intensities. The time variable will be used as label for the columns. The function can process spectra with different wavenumber axis.
parseTimeSeries.elab( parseableTables, col.time = 1, col.spectra = 2, col.wavenumber = 1, col.signal = 2, extension = ".Data-1.txt", api.key = Sys.getenv("READ_ELABFTW_TOKEN"), url = Sys.getenv("ELABFTW_API_URL"), ... )
parseableTables |
A list generated by GET.elabftw functions with outputHTTP=TRUE. The list contains a list of data.frames with file references and the HTTP response from the API request. |
col.time |
The column number of the time variable in the original table |
col.spectra |
The column number of the file references to the spectra (given in the original table) |
col.wavenumber |
The column number of the wavenumber axis in the referenced files |
col.signal |
The column number of the measured intensities in the referenced files |
extension |
One string or a vector of strings with file extensions that will be recognised by the function. Any other file type will cause the function to stop and report an error. |
api.key |
The eLabFT API-key. See the eLabFTW documentation for details. The default settings retrieve this value from the enviourmental variable READ_ELABFTW_TOKEN. This variable can be set in the ~/.Renviron file. |
url |
The url to the eLabFTW API. See the eLabFTW documentation for details. The default settings retrieve this value from the enviourmental variable ELABFTW_API_URL. This variable can be set in the ~/.Renviron file. |
... |
Parameters that will be passed to read.csv(). |
Keep in mind: This functions needs the original HTTP API response. Therefore set the parameter outputHTTP to TRUE when calling a GET.elabftw function.
A List of data.frames. Every input table will result in one data.frame. The data.frames contain the measured spectra with a shared wavenumber axis and the time variable labeles the spectra.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.