what is %A here?

all$date <- as.Date(all$started_at)
all$month <- format(as.Date(all$date), "%m")
all$day <-format(as.Date(all$date), "%d")
all$year <- format(as.Date(all$date), "%Y")
all$days_of_week <- format(as.date(all$date), "%A")

These are codes used for parsing date and times into R.

%A is for "full weekday". For example, Monday.

I like the cheatsheet here Quick-R: Date Values.

Full details here
https://www.stat.berkeley.edu/~s133/dates.html

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.