Use read.csv to load the file specified by the input file_name (file_name can also be the full path to the file). The inputs phi_m_col, sig_m_col, trc_m_col, and sig_trc_m_col specify which columns contain the radiocarbon data. All are optional, but only three patterns of inputs are valid:

(1) If none of the column specifiers are given, it is assumed that the first column in the .csv file contains trc_m and the second column contains sig_trc_m. (2) If trc_m_col and sig_trc_m_col are given, phi_m_col and sig_m_col must not be given. (3) If phi_m_col and sig_m_col are given, trc_m_col and sig_trc_m_col must not be given.

import_rc_data(
  file_name,
  trc_m_col = NA,
  sig_trc_m_col = NA,
  phi_m_col = NA,
  sig_m_col = NA,
  ...
)

Arguments

file_name

The file name of the input .csv file (or full path to the file if not located in the current directory)

trc_m_col

The column containing the radiocarbon years values (optional, but see details).

phi_m_col

The column containing the fraction modern values (optional, but see details).

sig_m_col

The column containing the error for the radiocarbon year values (optional, but see details)

...

Additional arguments to pass to read.csv (e.g., skip=2 would skip the first two lines when reading the .csv file)

Value

A list with four named entries, each a vector equal to the number of samples: phi_m, the fraction modern values; sig_m, the error for phi_m; trc_m, a vector of uncalibrated radiocarbon years; and sig_trc_m, the error for trc_m.