time_converter: Convert time units in a dataframe column

View source: R/local_functions.R

time_converterR Documentation

Convert time units in a dataframe column

Description

Convert the time units in plots

Usage

time_converter(
  dataframe,
  time_colname,
  conv_timecolname,
  former_unit,
  new_unit
)

Arguments

dataframe

dataframe for which a column with numerical time values should be converted.

time_colname

name of column with time (numerical) values to be converted to a different time unit.
(character string)

conv_timecolname

name of the column after time units conversion.
Can be identical to time_colname.
(character string)

former_unit

former time unit. Character string among the following:
micros, ms, s, min, h, d, wk, mo, yr, kyr, Myr, Gyr

new_unit

new time unit. Character string among the following:
micros, ms, s, min, h, d, wk, mo, yr, kyr, Myr, Gyr

Value

a dataframe with values converted to new time unit.


isobxr documentation built on Aug. 23, 2023, 5:06 p.m.