read_fmi_cum: Read daily cummulated solar spectrum data file(s).

View source: R/read-fmi-cum.R

read_fmi_cumR Documentation

Read daily cummulated solar spectrum data file(s).


Read one or more cumulated daily spectral irradiance file as output by Anders Lindors' model based on libRadTrans. Dates are read from the file header and parsed with the function suplied as date.f.


  date = NULL,
  geocode = NULL,
  label = NULL,
  tz = "UTC",
  locale = readr::default_locale(),
  .skip = 3,
  .n_max = -1,
  .date.f = lubridate::ymd

  date = NULL,
  geocode = NULL,
  label = NULL,
  tz = "UTC",
  .skip = 3,
  .n_max = -1,
  .date.f = lubridate::ymd



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


a POSIXct object to use to set the "when.measured" attribute. If NULL, the default, the date is extracted from the file header.


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


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


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


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.


Number of lines to skip before reading data—i.e. the number of rows in the header.


Maximum number of records to read.


A function for extracting a date-time from the file header passed as charecter sring to its first argument and which returns a POSIXct object.


list or vector of paths each one with the same requirements as described for argument file.


read_fmi_cum() returns a source_spct object with time.unit attribute set to "day" and when.measured attribute set to the date-time extracted from the header at the top of the read file.

read_m_fmi_cum returns a source_mspct containing one source_spct object for each one of the multiple files read.


See read_table for details of acceptable values for file.

Examples <- system.file("extdata", "2014-08-21_cum.hel", 
                         package = "photobiologyInOut", mustWork = TRUE)
fmi.spct <- read_fmi_cum(file =

photobiologyInOut documentation built on Aug. 15, 2022, 9:09 a.m.