as.datcli: as.datcli

Description Usage Arguments Author(s) See Also Examples

View source: R/as.datcli.R

Description

Tranforms a data frame (see example dataset) into a data frame format like 'datcli' in 'climatol' package

Usage

1
2
3
4
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 df. Default is "month".

PrecField

character string for Mean Precipitation field in df. Default is "P".

MinTempField

character string for Mean Daily Minimum Temperature field in df. Default is "Tn".

MaxTempField

character string for Mean Daily Maximum Temperature field in df. Default is "Tx".

MeanTempField

character string for Mean Daily Maximum Temperature field in df. Default is "Tm".

AbsMinTempField

character string for Absolute Monthly Minimum Temperature field in df. Default is "AbsTn".

AbsMinTempOffset

estimated offset between Average Min Temperature and Absolute Min Temperature.

StationField

character string for Station field in df. Default is "station".

Author(s)

Emanuele Cordano

See Also

www.climatol.eu, http://www.zoolex.org/walter.html

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
### 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

ClimClass documentation built on May 2, 2019, 2:20 p.m.