Learn R Programming

LightFitR (version 1.0.0)

write.helioSchedule: Write the schedule to file that Heliospectra can parse

Description

Writes to json or csv format

Usage

write.helioSchedule(regime_matrix, filename, format = c("csv", "json"))

Value

Heliospectra schedule file in either the csv or json format

Arguments

regime_matrix

Matrix containing light regime, as generated by makeRegime

filename

Character. Filename to export to

format

Character. Which format to export to? csv or json. Use extensions '.csv' or '.txt'

Examples

Run this code
tempcsv_name = tempfile(fileext='.csv')
write.helioSchedule(LightFitR::example_regime, tempcsv_name, format='csv')

temptxt_name = tempfile(fileext='.txt')
write.helioSchedule(LightFitR::example_regime, temptxt_name, format='json')

Run the code above in your browser using DataLab