splitGcData: Split the geochemical data

View source: R/GcClusterFunctions.R

splitGcDataR Documentation

Split the geochemical data

Description

The geochemical data, which have been clustered, are split into two groups based on their conditional probabilities.

Usage

splitGcData(gcData, condProbs1, threshold = 0.1)

Arguments

gcData

List containing the geochemical and related data. This container is described in the package documentation.

condProbs1

A matrix containing the Monte Carlo samples of the conditional probabilites. This matrix is returned by function calcCondProbs1, for which the documentation includes a complete description of container condProbs1.

threshold

The threshold used to split the data into two groups. (See details.)

Details

For each field sample, the median of the Monte Carlo samples of conditional probability is calculated. If this median is between 1-threshold and 1, then the field sample is associated with pdf 1 in the finite mixture model. However, if this median is between 0 and threshold, then the field sample is associated with pdf 2 in the finite mixture model. This criterion is used to split the field samples into two groups.

Argment threshold must be greater than 0 and less than 0.5.

Value

A list with four components is returned.

gcData1

List containing the geochemical and related data that are associated with pdf 1. The format of this container is the same as the format of gcData and is described in the package documentation.

analysisData1

Dataframe containing data that are helpful in analyzing the samples associated with pdf 1. The data are the sample number, the conditional probability associated with the sample, the longitude, and the latitude.

gcData2

List containing the geochemical and related data that are associated with pdf 2. The format of this container is the same as the format of gcData and is described in the package documentation.

analysisData2

Dataframe containing data that are helpful in analyzing the samples associated with pdf 2. The data are the sample number, the conditional probability associated with the sample, the longitude, and the latitude.

The information in components analysisData1 and analysisData2 is also in components gcData1 and gcData2, except for the conditional probabilities. The reason for generating these containers with redundant information is that their format is simple, so that the containers can be passed to other programs for further analysis.

Examples

## Not run: 
theSplits <- splitGcData(gcData, condProb1, threshold = 0.10 )

## End(Not run)


USGS-R/GcClust documentation built on April 17, 2023, 8:08 p.m.