Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

load.ts

Load timeseries from properly formatted text file.


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

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

#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

Lake Physics Tools

v1.11.4.1
GPL (>= 2)
Authors
Luke Winslow, Jordan Read, Richard Woolway, Jennifer Brentrup, Taylor Leach, Jake Zwart, Sam Albers, Doug Collinge
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.