window-methods: Methods for extracting a time window

Description Usage Arguments Author(s) See Also Examples

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## S4 method for signature 'Meteo'
x[i, j, ..., drop = TRUE]
## S4 method for signature 'Sol'
x[i, j, ..., drop = TRUE]
## S4 method for signature 'G0'
x[i, j, ..., drop = TRUE]
## S4 method for signature 'Gef'
x[i, j, ..., drop = TRUE]
## S4 method for signature 'ProdGCPV'
x[i, j, ..., drop = TRUE]
## S4 method for signature '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

Author(s)

Oscar Perpiñán Lamigueiro

See Also

window.zoo indexD

Examples

1
2
3
4
5
6
7
8
9
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))

Example output

Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

Loading required package: lattice
Loading required package: latticeExtra
Loading required package: RColorBrewer
Time Zone set to UTC.

[1] "2020-01-01 UTC" "2020-12-31 UTC"
[1] "2020-01-01 UTC" "2020-01-31 UTC"

solaR documentation built on Oct. 19, 2021, 9:06 a.m.