compare-methods: Compare G0, Gef and ProdGCPV objects

Description Usage Arguments Methods Author(s) See Also Examples

Description

Compare and plot the yearly values of several objects.

Usage

1
2
## S4 method for signature 'G0'
compare(...)

Arguments

...

A list of objects to be compared.

Methods

The class of the first element of ... is used to determine the suitable method. The result is plotted with dotplot:

signature(... = "G0")

yearly values of G0d, B0d and D0d.

signature(... = "Gef")

yearly values of Gefd, Befd and Defd.

signature(... = "ProdGCPV")

yearly values of Yf, Gefd and G0d.

Author(s)

Oscar Perpi<c3><b1><c3><a1>n Lamigueiro

See Also

dotplot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
lat=37.2;
G0dm=c(2766, 3491, 4494, 5912, 6989, 7742, 7919, 7027, 5369, 3562, 2814,
2179)
Ta=c(10, 14.1, 15.6, 17.2, 19.3, 21.2, 28.4, 29.9, 24.3, 18.2, 17.2, 15.2)
prom=list(G0dm=G0dm, Ta=Ta)

###Comparison of different tracker methods
ProdFixed<-prodGCPV(lat=lat, dataRad=prom, keep.night=FALSE)
Prod2x<-prodGCPV(lat=lat, dataRad=prom, modeTrk='two', keep.night=FALSE)
ProdHoriz<-prodGCPV(lat=lat, dataRad=prom, modeTrk='horiz', keep.night=FALSE)

compare(ProdFixed, Prod2x, ProdHoriz)

##The first element rules the method
GefFixed=as(ProdFixed, 'Gef')
compare(GefFixed, Prod2x, ProdHoriz)

## Not run: 
## Due to changes in SIAR webpage this code no longer works
###compare and do.call
EstMadrid <- subset(RedEstaciones, NomProv=='Madrid')
nEstMadrid <- nrow(EstMadrid)
namesMadrid <- EstMadrid$NomEst

prodMadrid <- lapply(1:nEstMadrid,
                     function(x){try(prodGCPV(lat=41, modeRad='siar',
                                                  dataRad=list(prov=28, est=x,
                                                    start='01/01/2009', end='31/12/2010'))
                                     )})
names(prodMadrid) <- namesMadrid
okMadrid <- lapply(prodMadrid, class)!='try-error'
prodMadrid <- prodMadrid[okMadrid]

do.call(compare, prodMadrid)

## End(Not run)

solaR documentation built on May 2, 2019, 6:07 p.m.

Related to compare-methods in solaR...