hyperSpec objects can have row- and column names like data.frames. The "names" of the wavelengths are treated separately: see wl().

# S4 method for hyperSpec
dimnames(x)

# S4 method for hyperSpec
rownames(x, do.NULL = TRUE, prefix = "row")

# S4 method for hyperSpec
rownames(x) <- value

# S4 method for hyperSpec
colnames(x, do.NULL = TRUE, prefix = "col")

# S4 method for hyperSpec
colnames(x) <- value

Arguments

x

the hyperSpec object

do.NULL

handed to base::rownames() or base::colnames(): logical. Should this create names if they are NULL?

prefix

handed to base::rownames() or base::colnames()

value

the new names

See also

Author

C. Beleites

Examples

dimnames(flu)
#> $row
#> [1] "1" "2" "3" "4" "5" "6"
#> 
#> $data
#> [1] "spc"      "filename" "c"       
#> 
#> $wl
#>   [1] "405"   "405.5" "406"   "406.5" "407"   "407.5" "408"   "408.5" "409"  
#>  [10] "409.5" "410"   "410.5" "411"   "411.5" "412"   "412.5" "413"   "413.5"
#>  [19] "414"   "414.5" "415"   "415.5" "416"   "416.5" "417"   "417.5" "418"  
#>  [28] "418.5" "419"   "419.5" "420"   "420.5" "421"   "421.5" "422"   "422.5"
#>  [37] "423"   "423.5" "424"   "424.5" "425"   "425.5" "426"   "426.5" "427"  
#>  [46] "427.5" "428"   "428.5" "429"   "429.5" "430"   "430.5" "431"   "431.5"
#>  [55] "432"   "432.5" "433"   "433.5" "434"   "434.5" "435"   "435.5" "436"  
#>  [64] "436.5" "437"   "437.5" "438"   "438.5" "439"   "439.5" "440"   "440.5"
#>  [73] "441"   "441.5" "442"   "442.5" "443"   "443.5" "444"   "444.5" "445"  
#>  [82] "445.5" "446"   "446.5" "447"   "447.5" "448"   "448.5" "449"   "449.5"
#>  [91] "450"   "450.5" "451"   "451.5" "452"   "452.5" "453"   "453.5" "454"  
#> [100] "454.5" "455"   "455.5" "456"   "456.5" "457"   "457.5" "458"   "458.5"
#> [109] "459"   "459.5" "460"   "460.5" "461"   "461.5" "462"   "462.5" "463"  
#> [118] "463.5" "464"   "464.5" "465"   "465.5" "466"   "466.5" "467"   "467.5"
#> [127] "468"   "468.5" "469"   "469.5" "470"   "470.5" "471"   "471.5" "472"  
#> [136] "472.5" "473"   "473.5" "474"   "474.5" "475"   "475.5" "476"   "476.5"
#> [145] "477"   "477.5" "478"   "478.5" "479"   "479.5" "480"   "480.5" "481"  
#> [154] "481.5" "482"   "482.5" "483"   "483.5" "484"   "484.5" "485"   "485.5"
#> [163] "486"   "486.5" "487"   "487.5" "488"   "488.5" "489"   "489.5" "490"  
#> [172] "490.5" "491"   "491.5" "492"   "492.5" "493"   "493.5" "494"   "494.5"
#> [181] "495"  
#> 
rownames(flu)
#> [1] "1" "2" "3" "4" "5" "6"
colnames(faux_cell)
#> [1] "x"      "y"      "region" "spc"