Learn R Programming

PAMscapes (version 0.7.0)

markNA: Mark NA Values by Time and Frequency

Description

Marks values within a soundscape dataframe as NA according to provided time and (optionally) frequency values

Usage

markNA(x, na, by = NULL)

Value

same dataframe as x but with some values replaced with NA

Arguments

x

dataframe of soundscape data to mark NAs in

na

dataframe listing areas to mark NA. Must have columns start and end in UTC listing time ranges. Can also have columns freqMin and freqMax to also have accompanying frequency ranges, otherwise all frequency values within the time range will be set to NA

by

optional column name in both x and na if only certain rows of na should apply to certain rows of x (e.g. if these contain multiple deployments overlapping in time, a "DeploymentName" column can be used to only mark appropriate times)

Author

Taiki Sakai taiki.sakai@noaa.gov

Examples

Run this code
manta <- checkSoundscapeInput(system.file('extdata/MANTAExampleSmall1.csv', package='PAMscapes'))
naDf <- data.frame(start=min(manta$UTC),
                   end=max(manta$UTC),
                   freqMin=100,
                   freqMax=500)
plotHourlyLevel(manta)
plotHourlyLevel(markNA(manta, na=naDf))

Run the code above in your browser using DataLab