Learn R Programming

PAMpal (version 1.4.4)

updatePamObject: Update PAMpal S4 Object

Description

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

Usage

updatePamObject(x)

Value

the same object as x with any slot changes made

Arguments

x

an AcousticStudy, AcousticEvent, or PAMpalSettings object

Author

Taiki Sakai taiki.sakai@noaa.gov

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

Examples

Run this code

if (FALSE) {
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
}

Run the code above in your browser using DataLab