Learn R Programming

shide (version 0.2.1)

sh_hour: Get/set the time components of jdatetime objects

Description

Get/set the time components of jdatetime objects

Usage

sh_hour(x)

sh_minute(x)

sh_second(x)

# S3 method for jdatetime sh_hour(x)

# S3 method for jdatetime sh_minute(x)

# S3 method for jdatetime sh_second(x)

sh_hour(x) <- value

sh_minute(x) <- value

sh_second(x) <- value

# S3 method for jdatetime sh_hour(x) <- value

# S3 method for jdatetime sh_minute(x) <- value

# S3 method for jdatetime sh_second(x) <- value

Value

An integer vector representing the hour, minute or second component of x, depending on the function being called.

Arguments

x

A vector of jdatetime objects.

value

A numeric vector.

Details

For assignment, x and value are recycled to their common size using tidyverse recycling rules.

Examples

Run this code
x <- jdatetime("1402-12-14 19:13:31")
sh_second(x)
sh_hour(x) <- 17:18

Run the code above in your browser using DataLab