Quarto Basics

Author

Jared Lasley

Font Size

Font Size

Font Size

Font Size

Font Size
Font Size

Font Size

Bullet List

  • Item 1
  • Item 2
  • Item 3

Numeric List

  1. item 1
  2. item 2
  3. item 3

Quarto

Quarto enables you to weave together some code into a finished document. To lean more about Quarto see https://quarto.org

Running Code

Displaying the execution of code

[1] 2
library(tidyverse)
smaller = diamonds |>
    filter(carat <= 2.5)

smaller |>
    ggplot(aes(x=carat)) +
    geom_bar(binwidth=0.001)

Figure

KSU

Interactive Plots

library(plotly)
library(ggplot2)

data(economics)

plot_ly(
    data=economics,
    x= ~date,
    y =~unemploy,
    type="scatter",
    mode="lines"
) |>
    layout(xaxis=list(title="Date"),
    yaxis=list(title="Number of Unemployed")
    )
plot_ly(
    data=economics,
    x= ~unemploy,
    type="histogram"
)
library(leaflet)

leaflet() |>
    addTiles()|>
    addMarkers(
        lng=-84.39,
        lat=33.75,
        popup="Atlanta"
    )
leaflet() |>
    addTiles()|>
    addMarkers(
        lng=-84.52021,
        lat=33.93799,
        popup="KSU Marietta"
    )

Tables

subcars = mtcars[1:5,1:4]

knitr::kable(subcars,
col.names = c("Mile/Gallon","#Cylinders",
"Engine Displacement", "Horsepower"),
row.names=F,
caption="Car Data")
Car Data
Mile/Gallon #Cylinders Engine Displacement Horsepower
21.0 6 160 110
21.0 6 160 110
22.8 4 108 93
21.4 6 258 110
18.7 8 360 175

Interactive Tables

library(DT)
datatable(mpg)

QR Code

library(qrcode)
qr = qr_code("https://rpubs.com/jaredlasley/test")
plot(qr)