"specnames"(x)
specnames(x) <- value
"numSpectra"(x)x.specnames returns a character vector with the names of the spectra.numSpectra(x) is the same as length(specnames(x)) but much more efficient.
organization of x is "vector" then x is a vector
and value is a single string, which is stored as attr(x,'specname'). If the organization of x is "matrix", then x is a matrix
and value is stored as colnames(x).
If the organization of x is "df.col", then x is a data.frame
with n+1 columns, where n is the number of spectra.
value is stored as colnames(x)[2:(n+1)].
If the organization of x is "df.row", then x is a data.frame
and value is stored as row.names(x).
rownames, colnames