Learn R Programming

PhyActBedRest (version 1.0)

timestamp: Timestamp

Description

merges a Date m/dd/yyyy or mm/dd/yyyy column with a Time h:mm:ss or hh:mm:ss (24h) column to create a TS (Timestamp) Column (m)m/dd/yyyy h:mm (24h)

Usage

timestamp(dataset, Date, Time)

Arguments

dataset
A dataframe with columns of time of date and time (24hr) information.
Date
[optional, "Date" is the dafault] column that has date information.
Time
[optional, "Time" is the dafault] column that has time information.

Value

Examples

Run this code
data(zPhysActBedRest)

##  Example 1:
##  wa_tp5788 = read.csv("wa_tp5788.csv")
    wa_tp5788_ts = timestamp(wa_tp5788)

##  Example 2:   
##  wr_tp5788_cc = read.csv("wr_tp5788_cc.csv")
    wr_tp5788_ts = timestamp(wr_tp5788_cc, Time="clock", Date="calendar")

Run the code above in your browser using DataLab