Learn R Programming

eseis (version 0.6.0)

spatial_pmax: Get most likely source location

Description

The function identifies the location of a seismic source with the heighest likelihood (P_max).

Usage

spatial_pmax(data)

Value

data.frame, coordinates (x and y) of the most likely s ource location(s).

Arguments

data

raster object, spatial data set with source location estimates.

Author

Michael Dietze

Examples

Run this code

## create example source location likelihood raster
x <- raster::raster(nrows = 10, 
                    ncols = 10, 
                    xmn = 0, 
                    xmx = 10, 
                    ymn = 0, 
                    ymx = 10)
raster::values(x) <- runif(n = 100)

## identify location of highest likelihood
p_max <- spatial_pmax(data = x)

## show result
print(p_max)

Run the code above in your browser using DataLab