read.data {precintcon} | R Documentation |
Load a precipitation series
Description
Load a file with a daily or monthly precipitation series.
Usage
read.data(file, sep = ",", dec = ".", header = TRUE, na.value = NA)
Arguments
file |
a string containing the file path. |
sep |
the character applied for delimited columns. (Default value: ",") |
dec |
the character applied for defined decimal point. (Default value: ".") |
header |
a logical value defining whether the first line of the file refers to column names. (Default value: TRUE) |
na.value |
the value used for representing missing values. (Default value: NA) |
Value
A data frame
containing a representation of the
data in the file
. The file
is addressed as precintcon.daily or
precintcon.monthly depending of its structure.
The file should contains three columns when loading monthly series and thirty three columns when loading daily series.
The first columns refers to years and the second one refers to months. When dealing with daily datasets, the thirty one remaining columns refers to the amount of precipitation in the days of the months. Otherwise, the remaining column refers to the amount of precipitation in each month.
Author(s)
Lucas Venezian Povoa lucasvenez@gmail.com
See Also
daily
monthly
read.table
read.csv
read.csv2
Examples
##
# Loading a serie on Windows
## Not run: d1 <- read.data("C:\PRECINTCON\203040.csv", sep = ";", dec = ".", header = TRUE)
##
# Loading a serie on Unix-like
## Not run: d1 <- read.data("/home/precintcon/203040.csv", sep = ";", dec = ".", header = TRUE)