Learn R Programming

sandbox (version 0.2.2)

prepare_Sieving: Sieve a Sample

Description

The function removes grains that are not within the provided sieve interval.

Usage

prepare_Sieving(sample, interval)

Value

data.frame with grains that are within the sieve interval.

Arguments

sample

data.frame sample object to be sieved.

interval

numeric vector, sieve interval, in phi units.

Author

Michael Dietze, GFZ Potsdam (Germany)

Examples

Run this code
## load example data set
data(sample, envir = environment())

## sieve sample (in phi units)
sample_sieved <- prepare_Sieving(
  sample = sample,
  interval = c(5, 6))
                                 
## plot results
plot(density(
  x = sample$grainsize, 
  from = -1, 
  to = 11))
lines(density(
  x = sample_sieved$grainsize, 
  from = -1, 
  to = 11), 
  col = 2)

Run the code above in your browser using DataLab