--- title: "Dates and Times | r4ds Chapter 16" subtitle: Biostat 203B author: "Dr. Hua Zhou @ UCLA" date: "`r format(Sys.time(), '%d %B, %Y')`" format: html: theme: cosmo number-sections: true toc: true toc-depth: 4 toc-location: left code-fold: false bibliography: "../bib-HZ.bib" csl: "../apa.csl" knitr: opts_chunk: fig.align: 'center' fig.width: 6 fig.height: 4 message: FALSE cache: true --- Display machine information for reproducibility. ::: {.panel-tabset} #### R ```{r} sessionInfo() ``` #### Python ```{python} import IPython print(IPython.sys_info()) ``` #### Julia ```{julia} using InteractiveUtils versioninfo() ``` ::: Load tidyverse and lubridate (R), Pandas (Python), and DataFrames.jl (Julia). ::: {.panel-tabset} #### R ```{r} library(lubridate) library(nycflights13) library(tidyverse) ``` #### Python ```{python} # Load the pandas library import pandas as pd # Load numpy for array manipulation import numpy as np ``` #### Julia ```{julia} using DataFrames, Pipe, StatsBase ``` ::: ## Basics Three types of data/time data: - **date**. Tibbles print it as ``. - **time**. Tibbles print it as `