Description Usage Arguments Value Examples
Given a data.frame
object with a column of dates in 'character' format,
it generates a new data.frame
object with the dates transformed into
"Date" R format.
1 | formatDate(input, dateColumn, dateFormat = "%y/%m/%d", verbose = FALSE)
|
input |
A |
dateColumn |
The name of the column containing the date. |
dateFormat |
By default |
verbose |
By default |
An object of class data.frame
with the date column transform into 'Date' R class.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | dataset <- read.csv2(system.file("extdata",
"nhdsSubset.csv",
package="EHRtemporalVariability"),
sep = ",",
header = TRUE,
na.strings = "",
colClasses = c( "character", "numeric", "factor",
"numeric" , rep( "factor", 22 ) ) )
datasetFormatted <- formatDate(
input = dataset,
dateColumn = "date",
dateFormat = "%y/%m",
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.