This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(MASS) | |
library(plotrix) | |
library(tidyverse) | |
library(gganimate) | |
#################################### | |
## Example 1 (Data by Group with means and estimated means) | |
#################################### | |
## Number of groups, observations per group |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
library(patchwork) # For composing plots | |
# See https://patchwork.data-imaginist.com/ | |
library(ggtext) # For formatting text using markdown syntax | |
# See https://wilkelab.org/ggtext/ | |
# Make a ggplot histogram from a vector of data | |
gg_hist <- function(x){ | |
data.frame(x) |> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Display data frame as a nicely formatted and interactive GT table | |
display <- function(df){ | |
df |> | |
gt::gt() |> | |
gt::opt_interactive(use_search = TRUE, | |
use_compact_mode = TRUE, | |
use_text_wrapping = TRUE) |> | |
gt::opt_stylize(style = 2) |> | |
gt::cols_width(everything() ~ px(250)) | |
} |
OlderNewer