Learn R Programming

solaR (version 0.46)

C_fBTd: Daily time base

Description

Construction of a daily time base for solar irradiation calculation

Usage

fBTd(mode = "prom",
    year = as.POSIXlt(Sys.Date())$year+1900,
    start = paste('01-01-',year,sep = ''),
    end = paste('31-12-',year,sep = ''),
                   format = '%d-%m-%Y')

Arguments

mode

character, controls the type of time base to be created. With mode = 'serie' the result is a daily time series from start to end. With mode = 'prom' only twelve days, one for each month, are included. During these 'average days' the declination angle is equal to the monthly mean of this angle.

year

which year is to be used for the time base when mode = 'prom'. Its default value is the current year.

start

first day of the time base for mode = 'serie'. Its default value is the first of January of the current year.

end

last day of the time base for mode = 'serie'. Its default value is the last day of December of the current year.

format

format of start and end.

Value

This function returns a POSIXct object.

Details

This function is commonly used inside fSolD.

References

  • Perpi<U+00F1><U+00E1>n, O, Energ<U+00ED>a Solar Fotovoltaica, 2015. (https://oscarperpinan.github.io/esf/)

  • Perpi<U+00F1><U+00E1>n, O. (2012), "solaR: Solar Radiation and Photovoltaic Systems with R", Journal of Statistical Software, 50(9), 1-32, 10.18637/jss.v050.i09

See Also

fSolD, as.POSIXct, seq.POSIXt.

Examples

Run this code
# NOT RUN {
#Average days
fBTd(mode = 'prom')

#The day #100 of the year 2008
BTd = fBTd(mode = 'serie', year = 2008)
BTd[100]
# }

Run the code above in your browser using DataLab