updatePamObject: Update PAMpal S4 Object

View source: R/updatePamObject.R

updatePamObjectR Documentation

Update PAMpal S4 Object

Description

Updates older versions of PAMpal's S4 objects to stop "validOjbect" warning messages

Usage

updatePamObject(x)

Arguments

x

an AcousticStudy, AcousticEvent, or PAMpalSettings object

Details

As of v0.12.0 this updates any previous version's PAMpalSettings objects to have the new "settings" slot, as well as updating any PAMpalSettings objects within an AcousticStudy

Value

the same object as x with any slot changes made

Author(s)

Taiki Sakai taiki.sakai@noaa.gov

Examples


## Not run: 
pps <- new('PAMpalSettings')
# manually breaking this S4 class, don't try this at home
attr(pps, 'settings') <- NULL
# This will now give an error
pps
pps <- updatePamObject(pps)
# Fixed!
pps

## End(Not run)


PAMpal documentation built on Aug. 12, 2023, 1:06 a.m.