Dates and Times Flashcards Preview

R > Dates and Times > Flashcards

Flashcards in Dates and Times Deck (18)
Loading flashcards...
1

as.Date(s) and as.POSIXct(s)

as.Date(s) and as.POSIXct(s) convert to the respective class; format(dt) converts to a string representation. The default string format is “2001-02-21”.

2

%a, %A

Abbreviated and full weekday name.

3

%b, %B

Abbreviated and full month name.

4

%d

Day of the month (01–31).

5

%H

Hours (00–23).

6

%I

Hours (01–12).

7

%j

Day of year (001–366).

8

%m

Month (01–12).

9

%M

Minute (00–59).

10

%p

AM/PM indicator.

11

%S

Second as decimal number (00–61).

12

%U

Week (00–53); the first Sunday as day 1 of week 1.

13

%w

Weekday (0–6, Sunday is 0).

14

%W

Week (00–53); the first Monday as day 1 of week 1.

15

%y

Year without century (00–99). Don’t use.

16

%Y

Year with century.

17

%z

(output only.) Offset from Greenwich; -0800 is 8 hours west of.

18

%Z

(output only.) Time zone as a character string (empty if not available).