ImportRawFlux: Flux data import function. Also has options to pre-process...

Description Usage Arguments Details See Also Examples

Description

Imports flux data from multiple files, processes according to optional input parameters, and ouputs an R object according to additional optional parameters.

See 'details' for detailed notes on parameter use, supported file and datatypes, and function operation.

Usage

1
2
3
ImportRawFlux(files = "all", datatypes = "voltages",
  time_format = "%Y-%m-%d %H:%M:%S", data_structures = "CampbellSci",
  minimum_interval = 120)

Arguments

files

Character vector of filenames.

time_format

Format of timestamp. See 'details'.

data_structures

Data format. See 'details'.

minimum_interval

Minimum file length, in minutes, to import.

file_extensions

Format of imported data file. See 'details'.

Details

files:

A list of filenames, in the current working directory. Timestamp vector must be present in each file, and must be the only non-numeric column.

The default, 'all', will search the current working directory for all files that have supported file extensions (.txt, .csv, and .dat) and import all appropriate files. While useful for bulk file input, it's recommended to list the files out individually if there are not too many to help sanitize data inputs.

datatypes:

Type of sapflux data, one per file. If length 1, is recycled for each file in the input list. Otherwise, its length must match the 'files' length exactly, and it is assumed that datatypes are ordered to match the input file list as it would appear to list.files().

time_format: Same as 'datatypes', but for timestamp format to be fed to 'strptime()' and 'as.POSIXct()'.

file_extensions: Works the same as time_format, but for imported file extensions.

dat_structures: Same as time_format and datatypes, but for more specific datatypes. Not all 'dat_structures' values work for all 'file_extensions', if the order is off or you've provided a bad input it will return an error. Value doesn't matter for .csv files.

Currently accepted data structures: "campbell" and "tab_delimited".

Additional notes:

Campbell CR1000 files have additional metadata associated with them along with the data of interest. Usually, this metadata isn't especially relevant. FluxImport will discard additional metadata and return only a matrix of data values and associated timestamps.

See Also

Other preprocess: AutoDropOutliers, BindRawFlux, ConsoleDropOutliers, DropRainyDays, GenerateMetaTemplate, ImportMeta, MetaDataImport, oldBindRawFlux, oldImportRawFlux

Examples

1
2
3
# If logger applied a multiplier for you, use 'datatype = 'temperatures''
ImportRawFlux(files = c(myfil1.dat, myfile2.dat),
           dat_structures = "campbell", datatypes = "temperatures")

bmcnellis/sapflux documentation built on May 12, 2019, 10:27 p.m.