Learn R Programming

bioRad (version 0.9.1)

Math.scan: Mathematical and arithmetic operations on param's, scan's and pvol's

Description

Mathematical and arithmetic operations on param's, scan's and pvol's

Usage

# S3 method for scan
Math(x, ...)

# S3 method for pvol Math(x, ...)

# S3 method for param Ops(e1, e2)

# S3 method for scan Ops(e1, e2)

# S3 method for pvol Ops(e1, e2)

Value

an object of the input class

Arguments

x

object of class scan, or pvol

...

objects passed on to the Math functions

e1

object of class param, scan, pvol or a number

e2

object of class param, scan, pvol or a number

Details

Use caution when applying these manipulations, as there are no consistency checks if the operations lead to interpretable outcomes. For example, when averaging scans with logarithmic values (e.g. DBZ), it might be required to first exponentiate the data before summing.

Attributes are taken from the first object in the operation.

When a pvol is multiplied by a list, in which case arguments are taken from the list per scan. this requires the list to have the same length as the number of scans.

See Also

  • calculate_param()

Examples

Run this code
# Locate and read the polar volume example file
scan1 <- example_scan

#add a value of 1 to all scan parameters:
scan2 <- example_scan + 1

# average the scan parameters of two scans:
# NB: requires identical scan parameter names and order!
(scan1 + scan2)/2

Run the code above in your browser using DataLab