Learn R Programming

solaR (version 0.37)

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. D
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.

encoding

UTF-8

Details

This function is commonly used inside fSolD.

References

  • Perpiñán, O, Energía Solar Fotovoltaica, 2012. (http://procomun.wordpress.com/documentos/libroesf/)
  • Perpiñán, O. (2012), "solaR: Solar Radiation and Photovoltaic Systems with R", Journal of Statistical Software, 50(9), 1-32,http://www.jstatsoft.org/v50/i09/

See Also

fSolD, as.POSIXct, seq.POSIXt.

Examples

Run this code
#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