D_as.data.tableM-methods | R Documentation |
Convert a G0
, Gef
,
ProdGCPV
or ProdPVPS
object into a
as.data.table
object with monthly average of daily values.
## S4 method for signature 'G0'
as.data.tableM(object, complete=FALSE, day=FALSE)
object |
A |
complete |
A logical. |
day |
A logical |
signature(object = "G0")
The result is the G0dm
slot. If day=TRUE
(default is FALSE
), the result
includes two columns names month
and year
.
signature(object = "Gef")
If complete=FALSE
(default) the result is the slot Gefdm
. If
complete=TRUE
it returns the slot G0dm
.
signature(object = "ProdGCPV")
If complete=FALSE
(default) the result is the prodDm
slot. If
complete=TRUE
the result includes the slots G0dm
and Gefdm
.
signature(object = "ProdPVPS")
If complete=FALSE
(default) the result is the prodDm
slot. If
complete=TRUE
the result includes the slots G0dm
and Gefdm
.
Oscar Perpiñán Lamigueiro, Francisco Delgado López.
library("data.table")
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)
prodfixed <- prodGCPV(lat, dataRad = prom)
prodM <- as.data.tableM(prodfixed, complete = TRUE, day = TRUE)
prodM
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.