Last chance! 50% off unlimited learning
Sale ends in
pageview_timestamps
converts Date
and POSIXlt
and ct
objects to work nicely with the start
and end
parameters in pageviews functions.
pageview_timestamps(timestamps = Sys.Date(), first = TRUE)
a character vector containing timestamps that can be used with article_pageviews
et al.
a vector of character, Date, POSIXlt or POSIXct objects.
whether to, if timestamps
is of date objects, assume the
first hour in a day (TRUE) or the last (FALSE). TRUE by default.
article_pageviews
and project_pageviews
, where you
can make use of this function.
# Using a Date
pageview_timestamps(Sys.Date())
# Using a POSIXct object
pageview_timestamps(Sys.time())
# Validate a character string
pageview_timestamps("2016020800")
Run the code above in your browser using DataLab