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

View source: R/io.R

read.densitiesR Documentation

Read a .csv file with mineral and rock densities

Description

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

Usage

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

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

provenance documentation built on May 29, 2024, 4:23 a.m.