Learn R Programming

solaR (version 0.37)

A8_readBD: Daily or intradaily values of global horizontal irradiation and ambient temperature from a local file or a data.frame.

Description

Constructor for the class Meteo with values of daily or intradaily values of global horizontal irradiation and ambient temperature from a local file or a data.frame.

Usage

readBD(file,  lat,
       format='%d/%m/%Y',
       header=TRUE, fill=TRUE, dec='.', sep=';',
       dates.col='date',source=file)

readBDi(file, lat, format='%d/%m/%Y %H:%M:%S', header=TRUE, fill=TRUE, dec='.', sep=';', time.col='time', source=file)

df2Meteo(file, lat, format='%d/%m/%Y', dates.col='date', source='')

dfI2Meteo(file, lat, format='%d/%m/%Y %H:%M:%S', time.col='time', source='')

zoo2Meteo(file, lat, source='')

Arguments

file
The name of the file (readBD and readBDi), data.frame (df2Meteo and dfI2Meteo) or zoo (zoo2Meteo) which the data are to be read from. It should contain
header, fill, dec, sep
format
character string with the format of the dates or time index. (Default for daily time bases:%d/%m/%Y). (Default for intradaily time bases: %d/%m/%Y %H:%M:%S)
lat
numeric, latitude (degrees) of the location.
dates.col
character string with the name of the column wich contains the dates of the time series.
time.col
character string with the name of the column wich contains the time index of the series.
source
character string with information about the source of the values. (Default: the name of the file).

Value

  • A Meteo object.

encoding

UTF-8

See Also

read.table, readSIAR, readG0dm.

Examples

Run this code
data(helios)
names(helios)=c('date', 'G0', 'TempMax', 'TempMin')

bd=df2Meteo(helios, dates.col='date', lat=41, source='helios-IES', format='%Y/%m/%d')

summary(getData(bd))

xyplot(bd)

Run the code above in your browser using DataLab