Skip to content
R for the Rest of Us Logo

This lesson is locked

Get access to all lessons in this course.

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

Take a look at your data in the following ways:

  1. In the console by typing penguins_data

  2. Using the glimpse() function

  3. With the RStudio viewer (or using the view() function)

  4. With one of the functions I showed from the packages that I demonstrated:

    • skim() from the skimr package

    • tbl_summary() from the gtsummary package

    • makeDataReport() from the dataReporter package

    • scan_data() from the pointblank package

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

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

Ethan Chapman

Ethan Chapman

March 15, 2021

When I type call faketucky I do get an output but it does not give me nearly that much information. It does not display the column types or even the fact that it is a tibble.

Raimo Franke

Raimo Franke

May 27, 2021

Hi Ethan, the problem might be that the tidyverse library was not loaded. Try loading tidyverse with library(tidyverse) and then type faketucky.

David Keyes

David Keyes

March 15, 2021

Can you post a screenshot of what yours looks like? You can post to a site like Imgur and post a link here.

IBRAH SENINDE

IBRAH SENINDE

March 18, 2021

when I type "skim", they suggest "skimr ::" instead and they bring an error (skim doesn't exist). Also the "skimr::" function does not execute. https://imgur.com/rw9OHNM

David Keyes

David Keyes

March 18, 2021

Have you loaded the skimr package? You need a line with the code library(skimr) prior to running the line skim(faketucky).

Atlang Mompe

Atlang Mompe

March 29, 2021

Hi David,

The links of this sentence do not work: If you have issues getting the histograms to display properly and you’re using Windows, there is a known issue. Please see the skimr documentation for potential solutions..

Thanks, Atty

David Keyes

David Keyes

March 29, 2021

Thanks for the heads up! They should be fixed now.

Krystal Robinson

Krystal Robinson

March 31, 2021

Everything else worked until I got to the skim function. > library(tidyverse) > library(slimr) Error in library(slimr) : there is no package called ‘slimr’ > skim(faketucky) Error in skim(faketucky) : could not find function "skim" > skim(faketucky) Error in skim(faketucky) : could not find function "skim"

David Keyes

David Keyes

March 31, 2021

Check the spelling on the package name (you wrote slimr with an L when you need to write skimr with a K). Let me know if that works!

Portia Hunt

Portia Hunt

April 1, 2021

Not sure why I'm getting this error message:

skim(faketucky) Error: 'across' is not an exported object from 'namespace:dplyr'

Googling, unfortunately, hasn't given me an answer ;)

David Keyes

David Keyes

April 1, 2021

You almost certainly need to update your package. Just type: install.packages("tidyverse") and that will give you access to the latest version of dplyr. across() is a new function in the 1.0 (and later) versions of dplyr.

Portia Hunt

Portia Hunt

April 1, 2021

Fabulous! Thanks!

i noticed that in your output from skim(faketucky) the numerical variables were in alphabetical order (act_math, act_reacing). In my output, they are in the order they appear in the View (student_id, male).

I assume there's an ability to manipulate this that we'll learn later, but was surprised that our output was in a different order despite both running the simple skim() function.

That's very strange, as they really should show up in the same order for both of us. The only thing I can think is that the skimr package has changed since I made the videos 2+ years ago. In any case, you'll definitely learn how to change the order of variables!

Sandra Obradovic

Sandra Obradovic

March 17, 2022

Hi, it was the same for me as for Matt - variables were not in alphabetical order.

Charlie Hadley

Charlie Hadley

March 17, 2022

Hey Sandra! The {skimr} package like most widely used R packages is maintained on GitHub and I went through the package Issues and discovered that - yes this was a deliberate change to retain the original order of columns. During R in 3 Months we'll introduce GitHub and how it works. It's a useful resource for figuring out how (and why) packages change over time, and it's also the official means to report bugs in R package. However! The issue I've linked to might not make that much sense at the beginning of your R journey - which is very much okay and expected!

Acarilia Eduardo

Acarilia Eduardo

March 27, 2022

Thanks for checking that out, Charlie! I was also puzzled by the order of the variables. :)

Skarlleth Martinez Prado

Skarlleth Martinez Prado

September 21, 2021

When I type facketucky, it does not give me the information about the tibble and the info below. It just appears in blue in my console, but I don't have the details. Maybe I did something wrong, or I jumped a step. Could you please help me?

Very strange! Could you please share a screenshot using imgur.com or something similar so I can see what you're seeing?

John Franjione

John Franjione

January 14, 2022

Got some weird results, but then I realized (aided by reading some of these questions) that I hadn't installed and loaded the tidyverse and skimr packages. Well, actually I had, but then I quit RStudio, but then re-opened the project thinking it would be in the same state as when I quit. But it was not. So I had to re-execute the install and library functions.

Two questions:

  1. Is there a way to see what packages have been installed and loaded?
  2. Is there a way to execute the entire script (well, besides selecting all lines and hitting the "Run" button)?

Thanks!

David Keyes

David Keyes

January 14, 2022

Thanks for the questions! I recorded a short video with answers. Let me know if you have any other questions!

John Franjione

John Franjione

January 16, 2022

Thanks! (And, "duh" on me for not looking a little harder before asking :) )

Hanan Perlman

Hanan Perlman

March 17, 2022

Hi David, When trying to skim I got this error message. What should I do? library(tidyverse) Error: package or namespace load failed for ‘tidyverse’: .onAttach failed in attachNamespace() for 'tidyverse', details: call: library.dynam(lib, package, package.lib) error: DLL ‘cli’ not found: maybe not installed for this architecture? > library(skimr) > skim(faketucky) Error in library.dynam(lib, package, package.lib) : DLL ‘cli’ not found: maybe not installed for this architecture? >

Charlie Hadley

Charlie Hadley

March 17, 2022

Hello Hanan! This error message looks like the package cli was not correctly installed. Could you try to run this code and try again?

install.packages(c("tidyverse", "cli"))

Hanan Perlman

Hanan Perlman

March 18, 2022

Hi Charlie, I tried it but keep getting the same error.

Hanan Perlman

Hanan Perlman

March 17, 2022

Hi David and Charlie, This is the error that I got: library(tidyverse) Error: package or namespace load failed for ‘tidyverse’: .onAttach failed in attachNamespace() for 'tidyverse', details: call: library.dynam(lib, package, package.lib) error: DLL ‘cli’ not found: maybe not installed for this architecture?

Vishnu Gunneri

Vishnu Gunneri

April 22, 2022

Hi Team, I have revisited this course and I have updated the skimr package but the histograms doesn't show up Here is the link https://imgur.com/a/uI9epEp to check out the image

Charlie Hadley

Charlie Hadley

April 22, 2022

Hello Vishnu, This is one of those annoying issues that comes down to international character sets on Windows. We'd hope these wouldn't exist anymore but they still do. A potential fix to this is to run this code before using skimr

Sys.setlocale("LC_ALL", 'en_US.UTF-8')

The {skimr} package is very useful for quickly viewing data but that's where its utility ends. If you can't fix this issue I would recommend using {ggplot2} to visualise the histograms of these variables instead of investing lots of time into {skimr}. Thanks, Charlie

Todd Rosenboom

Todd Rosenboom

July 18, 2022

Hi, I was curious why my skim(faketucky) didn't output the histogram correcty?

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist 1 student_id 0 1 55922. 32333. 1 27910. 56070 83872. 111990

Charlie Hadley

Charlie Hadley

July 19, 2022

Hello Todd,

Unfortunately, I think this error is due to the same issue Vishnu described above in the comments. Try to run this code and see if it fixes the issue:

Sys.setlocale("LC_ALL", 'en_US.UTF-8')

If it doesn't work, as I explained to Vishnu the {skimr} package is meant to quickly help view a dataset. It might not be worth the effort of investigating and to instead use {ggplot2} to create exploratory data visualisations.

Hi David, everything works for me but I only see 4 columns instead of what you see. You mention in the video that it is related to how much space is available for R to show the data. How do I adjust my screen/settings to see everything that is shown in your video? Thanks! https://imgur.com/a/Z4TWf0r

I figured it out :)

So we'll have to load the libraries each time we're running our code? I thought it had to be done just once...

You have to install libraries once per computer, but you do need to load the libraries once per RStudio session.

Marcia Dewandel

Marcia Dewandel

March 15, 2023

All well so far, except when attempting skim(faketucky). Got this message:

Error in skim(faketucky) : could not find function "skim:

David Keyes

David Keyes

March 15, 2023

Make sure you run the line library(skimr) before you run that line. You're trying to use a function from the skimr package, but you haven't loaded the package so it doesn't work.

Kiana Robinson

Kiana Robinson

March 22, 2023

> skim(faketucky) Error in skim(faketucky) : could not find function "skim"

David Keyes

David Keyes

March 22, 2023

Make sure you run the line library(skimr) before you run that line. You’re trying to use a function from the skimr package, but you haven’t loaded the package so it doesn’t work.

Kiana Robinson

Kiana Robinson

March 24, 2023

Hi David, went back to the beginning, started from scratch.....everything is running smoothly now. Thanks!!!!!!!!

David Keyes

David Keyes

March 24, 2023

🎉🎉🎉

Muhammed Ahmed Elhadedy

Muhammed Ahmed Elhadedy

May 3, 2023

Hi David. When I use the skim function, everything goes well except the histogram. I don't find a histogram, and I get these instead:

Can you help me with it? Note: I checked that the tidyverse package (including ggplot2) had been loaded as well as skimr package.

David Keyes

David Keyes

May 3, 2023

Please take a look at the response to Vishnu in the comments. Try that suggestion and let us know if it fixes things.

Muhammed Ahmed Elhadedy

Muhammed Ahmed Elhadedy

May 4, 2023

It worked. Thank you so much for your response.

Jessica Smith

Jessica Smith

August 22, 2023

Hi! I am trying to use the skim() function for a dataset that I have imported, and I noticed that it shows up with what it calls "whitespace." Do you know what this is and how I get rid of it?

David Keyes

David Keyes

August 24, 2023

I'm not exactly sure what you mean by whitespace. Can you clarify that, please?