Learn R Programming

RSurvey (version 0.4.5)

mergeData: Merge Time-stamped Data

Description

This function merges temporal data with the current time-stamped survey data.

Usage

mergeData(file = NULL)

Arguments

file
either a character string naming a file or a connection.

Value

  • The cols and data.raw components of srvy.dat are replaced by the merged data set.

format

The tab delineated temporal file, *.txt, contains the following variables: lll{ [,1] character date/time [,2:] numeric state variables } The first [1,] and second [2,] rows are reserved for column descriptors and units, respectively. Units associated with date/time values are based on format character strings described in strptime.

See Also

approx

Examples

Run this code
f <- system.file("RSurvey-ex/river.txt", package = "RSurvey")
con <- file(f, open = "r", encoding = "latin1")
d <- readFile(con)
srvy.dat("cols", d$cols)
srvy.dat("vars", d$vars)
srvy.dat("data.raw", d$dat)

f <- system.file("RSurvey-ex/river-temperature.txt", package = "RSurvey")
con <- file(f, open = "r", encoding = "latin1")
mergeData(con)
srvy.dat("cols")
srvy.dat("data.raw")

Run the code above in your browser using DataLab