data(mscdata)
This procedure shows how to extract the data using -t cdrom
option).
To extract data from the CD-ROM:
Multiple stations can be imported and combined before or after
importing into R. Multiple files can be concatenated into one from
the system shell (e.g. DOS: COPY *.ALL new.dly
, or UNIX:
cat *.ALL > new.dly
). This cleans up the Rworkspace by only
using one object to refer to several stations. Stations can be
referred to functions in
library(seas)
dat <- read.msc("/temp/C1161661.ALL")
(note thatRuses forward slashes for directories, but you could
alternatively type "C:\\\\TEMP\\\\C1161661.ALL" on a Microsoft-based
platform to To export the data from Rin a more convenient format for other programs,
use write.csv(dat,"out.csv")
; MS Excel users may want to turn
NA
values into the format recognised by Excel, so modify the
expression to write.csv(dat,"out.csv",na="#N/A")
.
read.msc
.
This file was created using the instructions below, with the addition
of renaming the file extension from
read.msc
file <- system.file("data/A1128551.DLY",package="seas")
print(file)
dat <- read.msc(file)
print(head(dat))
plot.seas.temp(dat)
plot.year(dat)
Run the code above in your browser using DataLab