Search code examples
rplotggplot2spectral

Plotting with the R package hyperSpec and creating a hyperSpec basic object


I am currently trying to develop my plotting skills...again-.- Functional data is what I want to plot most of the time. Usually I am doing this just by using ggplot2 and wrangling the data into the correct format. But now I stumbled across the package "hyperSpec" which is obviously designed for people like me. This package is actually using the environment of ggplot2. The problem is that I am struggling with creating the basic object needed to use this package. I do not know how my data should look like, even after reading the manual:frowning: Page 3 explains how to create such an object but I failed to understand that...

Can anyone help me with that?


Solution

    1. Function as.long.df with option rownames = TRUE might be helpful to prepare hyperSpec data for plotting with ggplot2.

    2. Type ?hyperSpec::initialize in R console to get help how to create a new hyperSpec object.