convert_date: Converts all columns of class POSIXct or POSIXt in a...

View source: R/convert_date.R

convert_dateR Documentation

Converts all columns of class POSIXct or POSIXt in a data.frame to Date class.

Description

Converts all columns of class POSIXct or POSIXt in a data.frame to Date class.

Usage

convert_date(xx)

Arguments

xx

A data.frame containing columns of class POSIXct or POSIXt

Value

data.frame with any columns of class POSIXct or POSIXt converted to Dates

Author(s)

Examples

z <- seq(1472562988, 1472563988, 100)
df1 <- data.frame(col1 = as.POSIXct(z, origin = "1960-01-01"))
df2 <- convert_date(df1)


barrenWuffet/convPkg documentation built on Jan. 25, 2024, 9:59 p.m.