D_as.data.tableD-methods {solaR2} | R Documentation |
Methods for Function as.data.tableD
Description
Convert a Sol
, G0
, Gef
,
ProdGCPV
or ProdPVPS
object into a
data.table
object with daily values.
Usage
## S4 method for signature 'Sol'
as.data.tableD(object, complete=FALSE, day=FALSE)
Arguments
object |
A |
complete |
A logical. |
day |
A logical. |
Methods
signature(object = "Sol")
Conversion to a
data.table
object with the content of thesolD
slot. Ifday=TRUE
(default isFALSE
), the result includes three columns namedmonth
,day
(day of the year) andyear
.signature(object = "G0")
If
complete=FALSE
(default) the result includes only the columns ofG0d
,D0d
andB0d
from theG0D
slot. Ifcomplete=TRUE
it returns the contents of the slotssolD
andG0D
.signature(object = "Gef")
If
complete=FALSE
(default) the result includes only the columns ofGefd
,Defd
andBefd
from theGefD
slot. Ifcomplete=TRUE
it returns the contents of the slotssolD
,G0D
andGefD
signature(object = "ProdGCPV")
If
complete=FALSE
(default) the result includes only the columns ofEac
,Edc
andYf
from theprodD
slot. Ifcomplete=TRUE
it returns the contents of the slotssolD
,G0D
,GefD
andprodD
.signature(object = "ProdPVPS")
If
complete=FALSE
(default) the result includes only the columns ofEac
,Qd
andYf
from theprodD
slot. Ifcomplete=TRUE
it returns the contents of the slotssolD
,G0D
,GefD
andprodD
.
Author(s)
Oscar Perpiñán Lamigueiro, Francisco Delgado López.
Examples
lat = 37.2
BTd = fBTd(mode = 'prom')
sol = calcSol(lat, BTd)
solD = as.data.tableD(sol)
solD
solD2 = as.data.tableD(sol, day = TRUE)
solD2
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)
prodfixed = prodGCPV(lat, dataRad = prom)
prodD = as.data.tableD(prodfixed, complete = TRUE, day = TRUE)
prodD