library("psych350lab")
data(superman, package = "psych350data")
library(dplyr)
my_data <- superman |>
select(num, year, type, clark_height_in, clark_grp,
height_diff, height_gap) |>
filter(year > 1975)
stats <- univariate_stats_answers(my_data)
# Answer KEY
create_answer_table(
vars = names(my_data), stats_data = stats,
label = "num", binary = "clark_grp",
multi_category = c("type", "height_gap")
)Variable |
Mean |
SD |
SEM |
Interpretable? |
|---|---|---|---|---|
num |
6.000000 |
3.674235 |
1.2247449 |
No - this is a label, not a variable |
year |
2,001.555556 |
16.000868 |
5.3336227 |
Yes - this is a quantitative variable |
type |
No - this is a multiple-category variable |
|||
clark_height_in |
73.446922 |
1.868635 |
0.6228785 |
Yes - this is a quantitative variable |
clark_grp |
Yes - this is a binary variable |
|||
height_diff |
8.211457 |
2.645209 |
0.9997949 |
Yes - this is a quantitative variable |
height_gap |
No - this is a multiple-category variable |
# Blank version
create_answer_table(
vars = names(my_data), stats_data = stats, KEY = FALSE
)Variable |
Mean |
SD |
SEM |
Interpretable? |
|---|---|---|---|---|
num |
||||
year |
||||
type |
||||
clark_height_in |
||||
clark_grp |
||||
height_diff |
||||
height_gap |