-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
Type: enhancement 🎈asking for a new feature.asking for a new feature.Type: proposal 💡Proposed ideas for all to consider.Proposed ideas for all to consider.
Description
Wouldn't it be more reasonable to create a new column in @data with quantiles instead of adding this info to row names, which is not so intuitive? Especially as the values in @data are set to NA.
Data in a column would be easier to access for plotting, etc.
suppressPackageStartupMessages(library(hyperSpec))
flu
#> hyperSpec object
#> 6 spectra
#> 3 data columns
#> 181 data points / spectrum
#> wavelength: lambda/nm [numeric] 405.0 405.5 ... 495
#> data: (6 rows x 3 columns)
#> 1. spc: I[fl]/"a.u." [matrix, array181] 27.15000 66.80133 ... 294.6495
#> 2. filename: filename [character] rawdata/flu1.txt rawdata/flu2.txt ... rawdata/flu6.txt
#> 3. c: c / (mg / l) [numeric] 0.05 0.10 ... 0.3
flu_pretty_quantiles <- quantile(flu, names = "pretty")
rownames(flu_pretty_quantiles)
#> [1] " 0 %" " 50 %" "100 %"
flu_pretty_quantiles$..
#> filename c
#> 0 % <NA> NA
#> 50 % <NA> NA
#> 100 % <NA> NACreated on 2020-07-26 by the reprex package (v0.3.0)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type: enhancement 🎈asking for a new feature.asking for a new feature.Type: proposal 💡Proposed ideas for all to consider.Proposed ideas for all to consider.