setGenericSpct function

Convert an R object into a spectrum object.