Get access to all lessons in this course.
Getting Started with R
Examine our Data
This lesson is locked
This lesson is called Examine our Data, part of the Getting Started with R course. This lesson is called Examine our Data, part of the Getting Started with R 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:
In the console by typing
penguins_data
Using the
glimpse()
functionWith the RStudio viewer (or using the
view()
function)With one of the functions I showed from the packages that I demonstrated:
skim()
from theskimr
packagetbl_summary() from the gtsummary package
makeDataReport()
from thedataReporter
packagescan_data()
from thepointblank
package
You need to be signed-in to comment on this post. Login.
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
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
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
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
March 18, 2021
Have you loaded the skimr package? You need a line with the code
library(skimr)
prior to running the lineskim(faketucky)
.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
March 29, 2021
Thanks for the heads up! They should be fixed now.
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
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
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
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 ofdplyr
.across()
is a new function in the 1.0 (and later) versions ofdplyr
.Portia Hunt
April 1, 2021
Fabulous! Thanks!
Matt M
September 12, 2021
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.
David Keyes
September 13, 2021
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
March 17, 2022
Hi, it was the same for me as for Matt - variables were not in alphabetical order.
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
March 27, 2022
Thanks for checking that out, Charlie! I was also puzzled by the order of the variables. :)
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?
David Keyes
September 22, 2021
Very strange! Could you please share a screenshot using imgur.com or something similar so I can see what you're seeing?
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:
Thanks!
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
January 16, 2022
Thanks! (And, "duh" on me for not looking a little harder before asking :) )
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
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
March 18, 2022
Hi Charlie, I tried it but keep getting the same error.
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
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
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
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
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
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:
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.
Manraj Kaur
September 29, 2022
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
Manraj Kaur
September 29, 2022
I figured it out :)
Jaime Perez
November 25, 2022
So we'll have to load the libraries each time we're running our code? I thought it had to be done just once...
David Keyes
November 26, 2022
You have to install libraries once per computer, but you do need to load the libraries once per RStudio session.
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
March 15, 2023
Make sure you run the line
library(skimr)
before you run that line. You're trying to use a function from theskimr
package, but you haven't loaded the package so it doesn't work.Kiana Robinson
March 22, 2023
> skim(faketucky) Error in skim(faketucky) : could not find function "skim"
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
March 24, 2023
Hi David, went back to the beginning, started from scratch.....everything is running smoothly now. Thanks!!!!!!!!
David Keyes
March 24, 2023
🎉🎉🎉
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
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
May 4, 2023
It worked. Thank you so much for your response.
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
August 24, 2023
I'm not exactly sure what you mean by whitespace. Can you clarify that, please?