Description Usage Arguments Details Value Examples
contact_data generates data from domain-coded drillhole data suitable
for plotting contact analysis plots. For each possible pairing of categorical
domain codes it reports the distance and grade of drillhole samples from each
contact of the domain pairing. The distance for the first domain in the
pairing ('left' side) is reported as a negative distance for plotting
purposes.
1 2 | contact_data(df, grade, bhid = bhid, from = from, to = to, x = x,
y = y, z = z, domain = domain, max_dist = 15, min_samp = 5)
|
df |
Data frame with columns defined in the following arguments. |
grade |
Name of column in |
bhid |
Name of column in |
from, to |
Name of numeric columns of |
x, y, z |
Name of numeric columns of |
domain |
Name of the column in |
max_dist |
Positive numeric scalar for the maximum contact distance to
be calculated (default |
min_samp |
Positive integer scalar for the minimum number of samples on
each side of the contact (default |
Uses nested for loops, which is not ideal for speed. I am sure that more can be done by vecorizing one or more loops, but, for now, it works and is fast enought to be practical. For example: the dataset 'dholes' contains 24,673 records in 371 drillholes with 13 valid domain contact pairings. This dataset takes <50 seconds to process on a fast laptop (2018 i9 CPU).
A list of two data frames 'detail' and 'summary'. 'detail' contains all data points while 'summary' contains mean grade by binned distances.
1 2 3 4 5 6 | # Smaller dataset for speed.
dholes_sub <- dholes[dholes$domain < 4000,]
ca <- contact_data(dholes_sub, grade, max_dist = 20)
# Extract only certain contacts from contact data.
ca_1100 <- purrr::map(ca, ~dplyr::filter(.x, grepl("1100", contact)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.