Description Usage Arguments Details Value Note Author(s) Examples
The daily and hourly files conatin many data elements
Typically one works with a single variable at time. This function
allows you to create subsets of data that have one and only one variable
in the file. The monolithic file, of course, can be read with
read.table
. This function uses read.table, but skips the columns
not requested and writes out the subset of data
1 | writeDataset(filename, cnames = colnamesDaily, varname = "T_DAILY_MEAN")
|
filename |
Filename of the monolithic file. for example:
CRN_Hourly_2011-09-19.dat or CRN_Daily_2011-09-19.dat.
The function |
cnames |
The column names either colnamesDaily or colnamesHourly It must match the file you are reading: hourly for hourly; daily for daily |
varname |
the variable you want to extract. It must be quoted exactly as it appears in the colnames constant |
The function masks off all unnecessaru columns and writes a dataset. The station ID ( WBANNO) and date and time are also saved. one variable and one variable only is added to these base variables and output to the file
Side effect is a file containing all stations and the variable requested.
This only works for numeric variables and not flag data
Steven Mosher
1 2 3 4 5 6 | ## Not run:
writeDataset(filename=CRN_Daily_2011-09-19.dat,
cnames = colnamesDaily, varname = "T_DAILY_MEAN")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.