listClimApply: Extension of "ClimApply" to a list

Description Usage Arguments Note See Also Examples

Description

Function "ClimApply" applied to a list

Usage

1
2
listClimApply(P = NA, Tx = NA, Tm = NA, Tn = NA, month = list(1:12),
  clim_fun = "contin", ...)

Arguments

P

monthly precipitation (list)

Tx

monthly mean daily maximium temparature (list)

Tm

monthly mean daily average temparature (list)

Tn

monthly mean daily minimum temparature (list)

month

a list with a vector or vectors indicating each month. Default is list(1:12).

clim_fun

character string containing the name of the applied "ClimClass" package function

...

further arguments for clim_fun function

Note

'month' can be replecad by 'layer'

See Also

climApply

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
library(ClimClassMap)

data(Trent_climate)
clim <- melt(clima_81_10,id="month")

names(clim)[names(clim)=="L1"] <- "station"

station <- unique(clim$station)[4:6]
names(station) <- station
P <- lapply(X=station,FUN=function(it,df,variable) {
				df$value[df$station==it & df$variable==variable]
},df=clim,variable="P")
Tx <- lapply(X=station,FUN=function(it,df,variable) {
			df$value[df$station==it & df$variable==variable]
	},df=clim,variable="Tx")
Tn <- lapply(X=station,FUN=function(it,df,variable) {
	df$value[df$station==it & df$variable==variable]
	},df=clim,variable="Tn")
Tm <- lapply(X=station,FUN=function(it,df,variable) {
		df$value[df$station==it & df$variable==variable]
		},df=clim,variable="Tm")

c <- listClimApply(P=P,Tx=Tx,Tn=Tn,Tm=Tm,clim_fun="contin",indices=4)

ecor/ClimClassMap documentation built on May 15, 2019, 8 p.m.