Learn R Programming

solaR (version 0.37)

D_window-methods: Methods for extracting a time window

Description

Method for extracting the subset of a solaR object whose daily time index (indexD) is comprised between the times i and j.

Usage

## S3 method for class 'Meteo':
[(x, i, j, ..., drop = TRUE)
## S3 method for class 'Sol':
[(x, i, j, ..., drop = TRUE)
## S3 method for class 'G0':
[(x, i, j, ..., drop = TRUE)
## S3 method for class 'Gef':
[(x, i, j, ..., drop = TRUE)
## S3 method for class 'ProdGCPV':
[(x, i, j, ..., drop = TRUE)
## S3 method for class 'ProdPVPS':
[(x, i, j, ..., drop = TRUE)

Arguments

x
A Meteo, Sol, etc. object.
i
an index/time value (Date or POSIXct classes) defining the start of the time window.
j
an index/time value (Date or POSIXct classes) defining the end of the time window.
..., drop
Additional arguments for window.zoo

See Also

window.zoo indexD

Examples

Run this code
lat=37.2
sol=calcSol(lat, BTd=fBTd(mode='serie'))
range(indexD(sol))

start <- as.Date(indexD(sol)[1])
end <- start + 30

solWindow <- sol[start, end]
range(indexD(solWindow))

Run the code above in your browser using DataLab