as.datcli {ClimClass} | R Documentation |
as.datcli
Description
Tranforms a data frame (see example dataset) into a data frame format like 'datcli
' in 'climatol
' package
Usage
as.datcli(df, station, MonthField = "month", PrecField = "P",
MinTempField = "Tn", MaxTempField = "Tx", MeanTempField = "Tm",
AbsMinTempField = "AbsTn", AbsMinTempOffset = 4,
StationField = "station")
Arguments
df |
data frame or list |
station |
name |
MonthField |
character string for month field in |
PrecField |
character string for Mean Precipitation field in |
MinTempField |
character string for Mean Daily Minimum Temperature field in |
MaxTempField |
character string for Mean Daily Maximum Temperature field in |
MeanTempField |
character string for Mean Daily Maximum Temperature field in |
AbsMinTempField |
character string for Absolute Monthly Minimum Temperature field in |
AbsMinTempOffset |
estimated offset between Average Min Temperature and Absolute Min Temperature. |
StationField |
character string for Station field in |
Author(s)
Emanuele Cordano
See Also
www.climatol.eu, http://www.zoolex.org/walter.html
Examples
### Not Run!!
# Install 'climatol' from 'http://www.climatol.eu/' first
### Then load the package, uncomment and run the following line
# library(climatol)
library(stringr)
data(Trent_climate)
TrentinoClimateDf <- do.call(rbind,clima_81_10)
names <- rownames(TrentinoClimateDf)
TrentinoClimateDf$station <-
unlist(lapply(X=str_split(names,pattern="[.]"),FUN=function(x) {x[1]}))
station <- "T0129"
datcli <- as.datcli(TrentinoClimateDf,station=station)
### Not Run!!
# Install 'climatol' from 'http://www.climatol.eu/' first
### Then load the package, uncomment and run the following line
# diagwl(datcli,est=station,alt=100,per="Period",mlab="en") ## plots a Walter-Lieth's climograph