R에서 시간을 나타내는 자료형 몇 가지 중 자주 사용되는 POSIXct의 경우
세부 정보를 추출할 때 사용되는 코드는 다음과 같다.
| Code | Meaning | Code | Meaning |
| %a | Abbreviated weekday | %A | Full weekday |
| %b | Abbreviated month | %B | Full month |
| %c | Locale-specific date and time | %d | Decimal date |
| %H | Decimal hours (24 hour) | %I | Decimal hours (12 hour) |
| %j | Decimal day of the year | %m | Decimal month |
| %M | Decimal minute | %p | Locale-specific AM/PM |
| %S | Decimal second | %U | Decimal week of the year (starting on Sunday) |
| %w | Decimal Weekday (0=Sunday) | %W | Decimal week of the year (starting on Monday) |
| %x | Locale-specific Date | %X | Locale-specific Time |
| %y | 2-digit year | %Y | 4-digit year |
| %z | Offset from GMT | %Z | Time zone (character) |
사용법
format(POSIXct값 , format='<변환코드>')
'데이터 분석' 카테고리의 다른 글
| Julia 전용 Pluto 노트북 설치 (0) | 2022.07.21 |
|---|---|
| Julia용 Jupyter Notebook 설치 (0) | 2021.12.06 |
| 과거 기업 재무정보 (0) | 2019.08.28 |
| Jupyter Notebook 셀 분할/병합 단축키 (0) | 2019.08.01 |
| R용 Jupyter 설치 (0) | 2019.07.27 |


