load.ts: Load timeseries from properly formatted text file.

Description Usage Arguments Value See Also Examples

Description

A convenience function to load timeseries data into R based on the standardized format used by Lake Analyzer.

Timeseries files must follow a common format. The first column must have the label 'datetime' and be of the format yyyy-mm-dd HH:MM:SS (ISO 8601 without the "T" delimiter). The second can be skipped if not using sub-minute data.

Usage

1
load.ts(fPath, tz = "GMT")

Arguments

fPath

The file path as a string.

tz

Timezone string to be supplied to as.POSIXct. Defaults to GMT (UTC-0). This often can be left to the default unless timezone support is specifically required.

Value

A data frame in the required format for use with other rLakeAnalyzer timeseries functions.

See Also

For dataloading ts.meta.depths,
For analyzing timeseries data, see ts.meta.depths, ts.thermo.depth, ts.schmidt.stability, ts.lake.number.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
	#Get the path for the package example file included
	exampleFilePath <- system.file('extdata', 'Sparkling.wtr', package="rLakeAnalyzer")
	
	#Load
	sparkling.temp = load.ts(exampleFilePath)
	
	#calculate and plot the thermocline depth
	t.d = ts.thermo.depth(sparkling.temp)
	
	plot(t.d$datetime, t.d$thermo.depth, type='l', ylab='Thermocline Depth (m)', xlab='Date')

rLakeAnalyzer documentation built on June 10, 2019, 1:02 a.m.