Learn R Programming

descsuppR (version 1.2)

length.tod: Basic Functions on time-of-day Vectors

Description

These shoud just do whatever the same function does for character vectors

Usage

# S3 method for tod
length(x)

# S3 method for tod [(x, i, ...)

# S3 method for tod [(x, i, ...) <- value

# S3 method for tod [[(x, i, ...)

# S3 method for tod [[(x, i, ...) <- value

# S3 method for tod c(...)

Value

as expected

Arguments

x

vector of class tod

i

integer of indices

...

to match the generics' arguments

value

of type tod. to be inserted

Author

Dr. Andreas Leha

Examples

Run this code
times <- c("8:53", NA, "22:30")
times <- as.tod(times)

length(times)
times[1]
times[1] <- "07:00"
c(times, times)

Run the code above in your browser using DataLab