## S3 method for class 'Date': print(x, ...)## S3 method for class 'Date': [(x, ..., drop = TRUE) ## S3 method for class 'Date': [(x, ...) <- value ## S3 method for class 'Date': [[(x, ..., drop = TRUE)
x | a Date object. |
value | any S object that can be converted to the Date class with as.Date(value), representing the replacement value for the relevant piece of the object. |
drop | a logical flag passed to the operators [ and [[, respectively. If TRUE (the default), specifies that the dimensions of length 0 or 1 should be dropped from the return object. |
... | additional arguments. |
returns the original object x, with the invisible flag set to prevent reprinting. | |
[, [[, [<- | returns a Date object formed by extracting or replacing the relevant subset. |
## show the internal representation of the Date class dput(Sys.Date())## print some dates around the Unix epoch (x <- structure(-2:2, class = "Date"))
## replace the Unix epoch with the date ## triggering the Unix Millennium Bug x[3] <- "2038-01-19 03:14:08" x[2:4]
## subscripting x <- structure(matrix(1:6, 2), class = "Date") dput(x[1, ]) dput(x[1, , drop = FALSE])