Learn R Programming

geoSpectral (version 0.17.5)

$,SpcList-method: Extract or replace parts of a SpcList object

Description

Operators acting on Spectra objects to extract or replace parts

Usage

# S4 method for SpcList
$(x, name)

Arguments

x

A Spectra object from which to extract element(s) or in which to replace element(s)

name

A character (column name)

Examples

Run this code
# NOT RUN {
  sp<-spc.example_spectra()
  BL = spc.makeSpcList(sp,"STATION")
  
  #Extract station 394 (returns Spectra object)
  BL$`394`
  
  BL@by="CRUISE"
  BL[[1]]$CRUISE="Cruise1"
  BL[[2]]$CRUISE="Cruise2"
  BL[[3]]$CRUISE="Cruise3"
  BL[[4]]$CRUISE="Cruise4"
  names(BL)
  BL$Cruise4

# }

Run the code above in your browser using DataLab