photobiologyInOut (version 0.4.19)

read_fmi2mspct: Read multiple solar spectra from a data file.

Description

Read spectral irradiance file as output by Anders Lindors' model based on libRadTrans for hourly simulation.

Usage

read_fmi2mspct(file, geocode = NULL, label = NULL, tz = NULL,
  locale = readr::default_locale(), .skip = 3, .n_max = -1)

Arguments

file

Either a path to a file, a connection, or literal data (either a single string or a raw vector).

geocode

A data frame with columns lon and lat used to set attribute "where.measured".

label

character string, but if NULL the value of file is used, and if NA the "what.measured" attribute is not set.

tz

character Time zone used for interpreting times saved in the file header.

locale

The locale controls defaults that vary from place to place. The default locale is US-centric (like R), but you can use locale to create your own locale that controls things like the default time zone, encoding, decimal mark, big mark, and day/month names.

.skip

Number of lines to skip before reading data.

.n_max

Maximum number of records to read.

Value

read_fmi2mspct() returns a source_mspct object containing source_spct objects as members, time.unit attribute set to "second" and when.measured attribute set to the date-time values extracted from the file body.