Skip to content
R for the Rest of Us Logo

This lesson is locked

Get access to all lessons in this course.

If the video is not playing correctly, you can watch it in a new window

Transcript

Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.

Your Turn

Complete the crosstabs sections of the data-wrangling-and-analysis-exercises.Rmd file. Make sure that you have the janitor package installed (if not, use the install.packages function) and loaded (use the library function).

Learn More

The janitor package has a great vignette with information about the tabyl and adorn_ functions.

Have any questions? Put them below and we will help you out!

You need to be signed-in to comment on this post. Login.

Daniel Sossa

Daniel Sossa

March 14, 2021

I noticed that the rendered table you get when knitting after adding a third variable is not the same you get when doing only two (it is only text, not the nice table format). Is there a way to get the same type of table rendered?

David Keyes

David Keyes Founder

March 16, 2021

Alright, so this is not my strongest area, but I tried to explain this a bit in this video. Hope it helps!

Jyoni Shuler

Jyoni Shuler

March 26, 2021

To solve the error message and remove the N/As, would we use the 'drop_na' function then?

Tatiana Bustos

Tatiana Bustos

July 28, 2022

For the last coding solution - what do the $ indicate next to the age_decade? Will this show up in the table in the final report (once we convert to word or other)? Is there a way to remove that and just show the actual age_decade labels?

Is there a way to show both column & row percentages using tabyl? Or is there another crosstab function that could do this? (I'm thinking similar to a proc freq in SAS, which has frequency, percent, column percent and row percent for each cell)