decibel: Conversion to decibels

Description Usage Arguments Value See Also Examples

Description

Convert numeric input into decibels.

Usage

1
decibel(x, type=1, na.zero=TRUE)

Arguments

x

a real positive numeric value.

na.zero

logical value controlling the handing of zeros in the data. If TRUE, the zero values are replaced with NAs prior to converting to decibels, avoiding an error when attempting to take the logarithm of zero.

type

an integer signifying the decible form to use in the conversion. If type=1 10 * log10(x) is used to convert the input and 20 * log10(x) isued for type=2.

Value

the decibel equivalent of the input x.

See Also

nextDyadic, isVectorAtomic.

Examples

1
2
decibel(c(1,10,100,1000), type=1)
decibel(c(1,10,100,1000), type=2)

Example output

[1]  0 10 20 30
[1]  0 20 40 60

ifultools documentation built on May 2, 2019, 4:48 p.m.

Related to decibel in ifultools...