read.GLCdata {Rglimclim}R Documentation

Read an Rglimclim data file

Description

To read a daily data file of response variables in Rglimclim format (see the help for the data.file argument of the GLCfit routine). This can also be used to read daily output files from simulations produced by GLCsim.

Usage

read.GLCdata(file, missval = -99.99)

Arguments

file

Character string giving the name of the data file

missval

The number used to denote missing values in the data file

Details

Although Rglimclim data files are in fixed-width format, the use of read.fwf to read them can be extremely slow. The present command is much faster.

Value

The function returns a data frame, with named columns Year, Month, Day, Site and Var1 to VarN, where N is the number of variables present in file. Values of missval will be replaced with NA.

Note

Daily weather datasets can be extremely large. Indiscriminate use of this routine may cause slow running or memory problems, therefore.

Author(s)

Richard Chandler (richard@stats.ucl.ac.uk)

See Also

write.GLCdata, GLCfit


[Package Rglimclim version 1.3-2 Index]