D_as.data.tableI-methods | R Documentation |
Convert a Sol
, G0
, Gef
,
ProdGCPV
or ProdPVPS
object into a
data.table
object with daily values.
## S4 method for signature 'Sol'
as.data.tableI(object, complete=FALSE, day=FALSE)
object |
A |
complete |
A logical. |
day |
A logical. |
signature(object = "Sol")
If complete=FALSE
and
day=FALSE
(default) the result includes only the content of the
solI
slot. If complete=TRUE
the contents of the
solD
slots are included.
signature(object = "G0")
If complete=FALSE
and
day=FALSE
(default) the result includes only the columns of
G0
, D0
and B0
of the G0I
slot.
If complete=TRUE
it returns the contents of the slots G0I
and solI
. If day=TRUE
the daily values (slots G0D
and solD
) are also included.)
signature(object = "Gef")
If complete=FALSE
and
day=FALSE
(default) the result includes only the columns of
Gef
, Def
and Bef
of the GefI
slot. If complete=TRUE
it
returns the contents of the slots GefI
, G0I
and
solI
. If day=TRUE
the daily values (slots GefD
, G0D
and solD
) are also included.)
signature(object = "ProdGCPV")
If complete=FALSE
and
day=FALSE
(default) the result includes only the columns of
Pac
and Pdc
of the prodI
slot. If complete=TRUE
it
returns the contents of the slots prodI
, GefI
, G0I
and
solI
. If day=TRUE
the daily values (slots prodD
, GefD
, G0D
and solD
) are also included.)
signature(object = "ProdPVPS")
If complete=FALSE
and
day=FALSE
(default) the result includes only the columns of
Pac
and Q
of the prodI
slot. If complete=TRUE
it
returns the contents of the slots prodI
, GefI
, G0I
and
solI
. If day=TRUE
the daily values (slots prodD
, GefD
, G0D
and solD
) are also included.)
Oscar Perpiñán Lamigueiro, Francisco Delgado López.
library("data.table")
lat = 37.2
BTd = fBTd(mode = 'prom')[1]
sol = calcSol(lat, BTd, keep.night = FALSE)
solI = as.data.tableI(sol)
solI
solI2 = as.data.tableI(sol, day = TRUE)
solI2
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)
prodI = as.data.tableI(prodfixed, complete = TRUE, day = TRUE)
prodI
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.