format_time: Transform the time from hh:mm:ss to hours or minutes

View source: R/format_time.R

format_timeR Documentation

Transform the time from hh:mm:ss to hours or minutes

Description

Process column Time of df_data and transform the time in hh:mm:ss format to hours or minutes.

Usage

format_time(df_data, time_format = NULL)

Arguments

df_data

dataframe

time_format

character value "hours" or "minutes" to indicate whether the the format is in hours or in minutes.

Value

the input dataframe whit the column Time formatted.

Examples

#Load example dataframe
data_file <- system.file("extdata",
"test_spectramax_data_1.txt",
package = "mpxtractor")
df_spectramax_outdata_1 <- mpxtractor::read_spectramax_data(data_file)

# format time
df <- mpxtractor::format_time(df_spectramax_outdata_1)

# Time transformed
df

MartinBanchero/mpxtractor documentation built on March 30, 2022, 10:56 p.m.