# example R script, copy and modify to your needs
# changes made to tis file will be overwritten with the next update

output <- "output.csv"

write.table(paste("Sample name =", samplename), output, append=TRUE, row.names=FALSE, col.names=FALSE, quote = FALSE)
write.table(paste("Model name =", modelname), output, append=TRUE, row.names=FALSE, col.names=FALSE, quote = FALSE)
write.table(paste("Date =", datetime), output, append=TRUE, row.names=FALSE, col.names=FALSE, quote = FALSE)
write.table(paste("Code =", productcode), output, append=TRUE, row.names=FALSE, col.names=FALSE, quote = FALSE)
write.table(paste("Data points =", range[3]), output, append=TRUE, row.names=FALSE, col.names=FALSE, quote = FALSE)
write.table(paste("Range =", range[1], "-", range[2], xunit), output, append=TRUE, row.names=FALSE, col.names=FALSE, quote = FALSE)
write.table(t(spectrum), output, append=TRUE, row.names=FALSE, col.names=FALSE)
write.table("\n", output, append=TRUE, row.names=FALSE, col.names=FALSE, quote = FALSE)
