Lab 1G
Directions: Follow along with the slides, completing
the questions in blue on your
computer, and answering the questions in red in your
journal.
Space, Click, Right Arrow or swipe left to move to
the next slide.
data()
function to load the atu_clean
data file to use in this
lab.sex
seem to have a higher occurrence of
physical challenges than the other?bargraph
helps us get an idea of the answer
to the question, but we need to provide precise values.tally
of the number of people with
physical challenges and their sex.
format = "percent"
as an
option to the code you used to make your 2-way frequency table.
sex
seem to have a higher
occurrence of physical challenges than the other? If so, which one and
explain your reasoning.margin = TRUE
as an option in
the tally
function.sex | phys_challenge
and
phys_challenge | sex
!## phys_challenge
## sex No difficulty Has difficulty
## Male 4140 530
## Female 5048 775
## Total 9188 1305
## sex
## phys_challenge Male Female
## No difficulty 4140 5048
## Has difficulty 530 775
## Total 4670 5823
margin
option is excluded). Notice,
however, that the totals are different.R
calculates conditional
frequencies by column!No difficulty
and Has difficulty
on the distribution of sex.Male
and Female
on the distribution of
physical challenges.format = "percent"
to the
first tally
function. How were the percents calculated?
Interpret what they mean.sex
has a higher rate of part
time employment?