Learn R Programming

exams.forge (version 1.0.10)

now: Current Time

Description

Returns a time stamp based on the current time. now basically calls gsub('.', '', sprintf('%.20f', as.numeric(Sys.time())), fixed=TRUE). To ensure that at each call a different time stamp is delivered now may call gsub(...) several times until two different results are delivered. The last one is then returned.

Usage

now(last = 35)

Value

A character.

Arguments

last

integer: the amount of digits that should be returned (default: 35)

Examples

Run this code
now()   # returns all digits
now(3)  # returns only the first three digits

Run the code above in your browser using DataLab