knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(jeksterslabRdatarepo)
library(knitr)
library(DT)
library(GGally)
library(plotly)
library(psych)

Load Data

data(
  heights,
  package = "jeksterslabRdatarepo"
)

Data Table

datatable(heights)

Plots

Scatter Plot Matrix

p <- ggpairs(
  data = heights,
  mapping = aes(color = gender),
  columns = c(2, 3, 5, 6)
)
ggplotly(p)

Father

plot_ly(
  data = heights,
  type = "scatter",
  mode = "markers",
  x = ~father,
  y = ~height,
  color = ~gender
)

Mother

plot_ly(
  data = heights,
  type = "scatter",
  mode = "markers",
  x = ~mother,
  y = ~height,
  color = ~gender
)

Descritive Statistics

kable(
  x = summary(
    heights
  )
)
kable(
  x = describe(
    heights
  )
)


jeksterslabds/jeksterslabRdatarepo documentation built on Jan. 5, 2021, 3:27 a.m.