read.densities: Read a .csv file with mineral and rock densities

Description Usage Arguments Value Examples

View source: R/io.R

Description

Reads a data table containing densities to be used for hydraulic sorting corrections (minsorting and srd functions)

Usage

1
2
3
4
5
6
7
8
read.densities(
  fname,
  sep = ",",
  dec = ".",
  header = TRUE,
  check.names = FALSE,
  ...
)

Arguments

fname

a string with the path to the .csv file

sep

the field separator character. Values on each line of the file are separated by this character.

dec

the character used in the file for decimal points.

header

a logical value indicating whether the file contains the names of the variables as its first line.

check.names

logical. If TRUE then the names of the variables in the frame are checked to ensure that they are syntactically variable names.

...

optional arguments to the built-in read.table function

Value

a vector with mineral and rock densities

Examples

1
2
3
4
data(Namib,densities)
N8 <- subset(Namib$HM,select="N8")
distribution <- minsorting(N8,densities,phi=2,sigmaphi=1,medium="air",by=0.05)
plot(distribution)

Example output



provenance documentation built on May 5, 2021, 1:06 a.m.