Learn R Programming

⚠️There's a newer version (0.4.6) of this package.Take me there.

editor_options: markdown: wrap: 72

tectonicr

tectonicr is a free and open-source R package for modeling and analyzing the direction of the maximum horizontal stress (SHmax) based on the empirical link between the direction of intraplate stress and the direction of the relative motion of neighboring plates (Wdowinski, 1998; Stephan et al., 2023). The following methods are available:

  • Direction of the plate boundary forces: PoR_shmax() gives the predicted stress field adjacent to a plate boundary, calculated using the relative plate motion of the neighboring plates using the function model_shmax(). The goodness-of-fit can be statistically tested by e.g. norm_chisq(), circular_dispersion() ,rayleigh_test(), and confidence_interval().
  • Distance to plate boundary: distance_from_pb() gives the distance between the stress data point and the plate boundary measured along the stress trajectories.
  • Trajectories of the theoretical stress field eulerpole_paths() generates an sf object containing spatial information that is suitable to plot with, for instance, ggplot().
  • Relative rotations from a given set of plate motion parameters: equivalent_rotation() transfers a set of plate motion parameters into the relative plate motions among the given plates.
  • Average direction and variance of a set of SHmax data using (weighted) statistics and other parameters to statistically estimate the distribution parameters of pi-directional data.
  • Spatial interpolation of of SHmax: PoR_stress2grid() uses distance, method, and quality-weighted mean direction of stress data without being affected by angular distortions.
  • Rose plot rose() shows the frequencies of the orientations in polar coordinates
  • Stress anomaly map: spatial distribution of the dispersion of the observed stress field from the directions of plate boundary forces
  • Download and filter world stress map data using download_WSM2016()

Prerequisites

You must have R installed on your system (see https://www.r-project.org/). To install tectonicr from CRAN, type the following code at the R command line prompt:

install.packages("tectonicr")

Installation

The most recent development version of tectonicr is available from Github and can be installed on your system as follows:

# install.packages("remotes") # install if needed
remotes::install_github('tobiste/tectonicr')
library('tectonicr')

Using the stress measurements from the San Andreas Fault - Gulf of California example, a quick analysis and test against the right-lateral transform plate boundary can be achieved by:

# load example data
data(san_andreas)
data(nuvel1)
data(plates)

stress_analysis(
san_andreas, 
PoR = equivalent_rotation(nuvel1, "na", "pa"), 
type = "right", 
pb = subset(plates, pair == "na-pa")
)

The code produces the underlying results for Fig. 7 from Stephan et al. (2023)

Documentation

The detailed documentation can be found at https://tobiste.github.io/tectonicr/articles/A_tectonicr.html

GUI

There is a graphical user interface that provides some (limited) tectonicr functionalities. No need to install, just click on the link and you can run tectonicr on your browser:

https://tobiste.shinyapps.io/tectonicr-app/

Author

Tobias Stephan (tstephan@lakeheadu.ca{.email})

Feedback, issues, and contributions

I welcome feedback, suggestions, issues, and contributions! If you have found a bug, please file it here with minimal code to reproduce the issue.

How to cite tectonicr

When referencing this package, please cite

Stephan, T., Enkelmann, E., and Kroner, U. (2023). Analyzing the horizontal orientation of the crustal stress adjacent to plate boundaries. Scientific Reports, 13(1). DOI: 10.1038/s41598-023-42433-2.

and the package DOI: 10.32614/CRAN.package.tectonicr.

License

GPL-3.0 License

Copy Link

Version

Install

install.packages('tectonicr')

Monthly Downloads

383

Version

0.4.4

License

GPL (>= 3)

Maintainer

Tobias Stephan

Last Published

December 11th, 2024

Functions in tectonicr (0.4.4)

circular_plot

Circular plot
circular_mode

Circular Mode
circle_stats

Summary Statistics of Circular Data
circular_dispersion_boot

Bootstrapped Estimates for Circular Dispersion
circular_sd_error

Standard Error of Mean Direction of Circular Data
cpm_models

Global model of current plate motions
coordinates2

Coordinate Transformations
confidence_interval_fisher

Confidence Interval around the Mean Direction of Circular Data after Fisher (1993)
conjugate_Q4

Conjugation of a Quaternion
est.kappa

Concentration parameter of von Mises distribution
distance_mod

Normalize angular distance on a sphere distance
circular_summary

Circular Summary Statistics
distance_from_pb

Distance from plate boundary
equivalent_rotation

Equivalent rotation
dispersion

Circular Distance and Dispersion
dist_greatcircle

Distance between points
circular_qqplot

Quantile-Quantile Linearised Plot for Circular Distributions
coordinates

Coordinate Transformations
deviation_norm

Normalize Angle Between Two Directions
get_distance

Helper function to Distance from plate boundary
get_relrot

Helper function to Equivalent rotation
is.Q4

Check if object is quaternion
coordinate_mod

Coordinate Correction
circular_range

Circular Range
normalize_Q4

Quaternion normalization
model_shmax

Theoretical Direction of Maximum Horizontal Stress in the geographical reference system.
get_projected_pb_strike

Helper function to get Distance from plate boundary
get_azimuth

Azimuth Between two Points
mean_SC

Mean Cosine and Sine
import_WSM2016

World Stress Map Database (WSM) Release 2016
norm_chisq

Normalized Chi-Squared Test for Circular Data
plot_density

Circular Density Plot
compact-grid

Compact smoothed stress field
plot_points

Add Points to a Circular Plot
pb2002

Global model of current plate motions
mean_resultant_length

Mean Resultant Length
confidence

Confidence Interval around the Mean Direction of Circular Data
dummy

Plate Stress Dummy Grid
plates

Plate Boundaries on the Earth
projected_pb_strike

Strike of the plate boundary projected on data point
product_Q4

Product of quaternions
nuvel1

NUVEL-1 Global model of current plate motions
deviation_shmax

Deviation of Observed and Predicted Directions of Maximum Horizontal Stress
quick_plot

Plotting Stress Analysis Results
rayleigh_test

Rayleigh Test of Circular Uniformity
second_central_moment

Second Central Momentum
is.euler

Check if object is euler.pole
kernel_dispersion

Adaptive Kernel Dispersion
spec_atan

Quadrant-specific inverse of the tangent
earth_radius

Earth's radius in km
kuiper_test

Kuiper Test of Circular Uniformity
raster_transformation

Conversion between PoR to geographical coordinate reference system of raster data
rose

Rose Diagram
rolling_test_dist

Apply Rolling Functions using Circular Statistics
spherical_angle

Angle along great circle on spherical surface
stress2grid

Spatial interpolation of SHmax
euler_pole

Euler pole object
euler_to_Q4

Quaternion from Euler angle-axis representation for rotations
nuvel1_plates

Plate Boundaries on the Earth
por_transformation_sf

Conversion between PoR to geographical coordinates of spatial data
parse_wsm

Numerical values to World Stress Map Quality Ranking
roll_circstats

Apply Rolling Functions using Circular Statistics
prd_err

Error of Model's Prediction
superimposed_shmax

SHmax direction resulting from multiple plate boundaries
relative_rotation

Relative rotation between two rotations
stress_colors

Color palette for stress regime
stress_analysis

Quick analysis of a stress data set
superimposed_shmax_PB

SHmax direction resulting from multiple plate boundaries considering distance to plate boundaries
sample_median

Circular Sample Median and Deviation
rotation_Q4

Rotation of a vector by a quaternion
rolling_test

Apply Rolling Functions using Circular Statistical Tests for Uniformity
trigon

Trigonometric Functions in Degrees
vcross

Vector cross product
line_azimuth

Extract azimuths of line segments
por_transformation_df

Conversion between spherical PoR to geographical coordinate system
rose_geom

Direction Lines and Fans in Circular Diagram
rose_stats

Show Average Direction and Spread in Rose Diagram
rotate_lines

Rotate Lines
por_transformation_quat

Conversion between PoR to geographical coordinate system using quaternions
vm_qqplot

von Mises Quantile-Quantile Plot
rose_bw

Selecting optimal number of bins and width for rose diagrams
watson_test

Watson's \(U^2\) Test of Circular Uniformity
tectonicr

library(tectonicr)
stress_paths

Theoretical Plate Tectonic Stress Paths
vonmises

The von Mises Distribution
stress_data

Example crustal stress dataset
weighted_rayleigh

Weighted Goodness-of-fit Test for Circular Data
tectonicr.colors

Colors for input variables
PoR_coordinates

Coordinates of the Pole of Rotation Reference System
PoR_crs

PoR coordinate reference system
PoR2Geo_azimuth

Azimuth conversion from PoR to geographical coordinate reference system
PositionCenterSpoke

Centrically aligned geom_spoke marker
PoR_shmax

Direction of Maximum Horizontal Stress in PoR reference system
PoR_distance

Distance to Pole of Rotation
Q4_to_euler

Euler angle/axis from quaternion
abs_vel

Absolute Plate Velocity
PoR_map

Plot Data in PoR Map
PoR_stress2grid

Spatial interpolation of SHmax in PoR coordinate reference system
angle-conversion

Degrees to Radians
axes

Plot axes
angle_vectors

Angle Between Two Vectors
circle_mean_diff

Circular Mean Difference