as.datcli | R Documentation |
Tranforms a data frame (see example dataset) into a data frame format like 'datcli
' in 'climatol
' package
as.datcli(
df,
station,
MonthField = "month",
PrecField = "P",
MinTempField = "Tn",
MaxTempField = "Tx",
MeanTempField = "Tm",
AbsMinTempField = "AbsTn",
AbsMinTempOffset = 4,
StationField = "station"
)
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 |
Emanuele Cordano
### Not Run!!
# Install 'climatol' from 'https://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 'https://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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.