Examine our Data
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 thegtsummary
package
makeDataReport()
from thedataReporter
packagescan_data()
from thepointblank
package
Have any questions? Put them below and we will help you out!
Course Content
12 Lessons
You need to be signed-in to comment on this post. Login.
Brittany Ripper • September 14, 2023
This is the text that was generated after I identified the library and typed the "makeDataReport" function. A word file was generated instead of a pdf as shown in the video. Was there a problem with my code?
David Keyes Founder • September 14, 2023
Nothing wrong with your code! I don't know why it generated a Word document for you (to be honest, I never personally use the
dataReporter
package). However, it looks like there is anoutput
argument you can use to change the output format. This will produce a PDF:Let me know if that helps!
Ishaan Kumar • September 14, 2023
I had the same issue, and inserted output = "pdf" and got this error. Perhaps it's because I don't have a LaTex viewer on my computer?
Is dataReporter_penguins_data.pdf open on your computer? Please close it as fast as possible to avoid problems!
Error: LaTeX failed to compile dataReporter_penguins_data.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. In addition: Warning message: In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) : '"pdflatex"' not found
David Keyes Founder • September 14, 2023
Yes, I think that's right.
Konul Karimova • February 21, 2024
Hi! I had the same problem. How did you solve it?
David Keyes Founder • February 21, 2024
I've never looked into this very deeply because I don't use the
dataReporter
package in my own work. However, if you want to make it work, I'd recommend checking out the tips on this page.Jessica France • September 14, 2023
Hello David. After using the scan_data function, I get this message
This seems to imply that I install the
ggforce
package first. Since you did not mention anything about a ggforce package, I do no know if this poses as a problem. Thanks.David Keyes Founder • September 14, 2023
Sorry, I didn't realize you would need to install another package. Yes, you can install it safely!
Jessica France • September 18, 2023
Thank you!
Eric Walcott • September 29, 2023
When I ran the scan with pointblank, I got an error message saying the "interactions" and "correlations" requires the ggforce package. I installed that, so I was able to move forward, but not sure if that signifies a wrong step somewhere else, or something else going on. Here's the output:
install.packages("ggforce")
.David Keyes Founder • September 29, 2023
I didn't realize this when I made the video, but it seems like you need to also install the
ggforce
package to usepointblank
. You can do that by runninginstall.packages("ggforce")
in the console. Let me know if that solves your problem!Samreen Chhabra • October 13, 2023
Hi David! My DataReporter code doesn't seem to be running the right way, I'm getting this- could not find function "makeDataReport"
David Keyes Founder • October 13, 2023
You almost certainly forgot to run
library(dataReporter)
first.Samreen Chhabra • October 13, 2023
Also, for the scan_data command, I'm getting this-
install.packages("ggforce")
.Samreen Chhabra • October 13, 2023
Okay this might work with ggforce, I seem to have run into a bigger problem- My RStudio software abruptly aborted R, and now says, "The object no longer exists" for penguins_data.
David Keyes Founder • October 13, 2023
Yes, it does seem that you need the
ggforce
package. Please install it withinstall.packages("ggforce")
.David Keyes Founder • October 13, 2023
I'm not sure what's happening, but please send a screen recording and I can take a look.
Charles Obiorah • February 28, 2024
I have tried to install the packages. Why does the report come back to me WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
All the packages I tried installing failed. ie skimr,, gtsummary, dataReporter, and makeDataRport. I must note that whhen the first packaged failed, i got the following message: Warning in install.packages : download of package ‘gtsummary’ failed package ‘Rcpp’ successfully unpacked and MD5 sums checked package ‘V8’ successfully unpacked and MD5 sums checked package ‘reactR’ successfully unpacked and MD5 sums checked package ‘labelled’ successfully unpacked and MD5 sums checked package ‘bigD’ successfully unpacked and MD5 sums checked package ‘bitops’ successfully unpacked and MD5 sums checked package ‘commonmark’ successfully unpacked and MD5 sums checked package ‘htmlwidgets’ successfully unpacked and MD5 sums checked package ‘juicyjuice’ successfully unpacked and MD5 sums checked package ‘markdown’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in C:\Users\Obiorah\AppData\Local\Temp\RtmpOIxcZ1\downloaded_packages
David Keyes Founder • February 28, 2024
Despite all of this, I actually think your packages installed successfully. R tends to be very verbose and tells you what is happening, even if it is just warnings. Here you have received several warnings, but those are not the same as things not working. I'd say just try to continue with the lessons, which you should be able to do. If not, let me know.
Charles Obiorah • March 2, 2024
Thank you, David. I think I will just go ahead and see what comes up
Charles Obiorah • March 2, 2024
Hello David, I'm glad the packages downloaded after all. I also encountered the same challenges as others, while trying to run tblsummary and make dataReport. i then observed your corrections. It's okay
Shubhra Murarka • March 1, 2024
I keep getting this error message when i do library(dataReporter): Error: package or namespace load failed for ‘dataReporter’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘robustbase’
& after downloading ggforce, it's telling me there is no package called 'ggforce' when I try to load the library for pointblank.
David Keyes Founder • March 1, 2024
That's very strange. Can you try to run it again and see if that changes anything?
Kim Phillips • March 13, 2024
Can you save what comes up in the viewer from the scan_data?
David Keyes Founder • March 14, 2024
Yes, check out this video, which shows how to do this.
Patricia A Spencer • March 14, 2024
David, when I tried running library (pointblank) I got this message: > library(pointblank) Error: package or namespace load failed for ‘pointblank’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): namespace ‘htmltools’ 0.5.5 is already loaded, but >= 0.5.7 is required
David Keyes Founder • March 14, 2024
Please try running this in the console:
Then try running
pointblank
again. Let me know if that works and, if so, I'll explain what happened.Patricia A Spencer • March 15, 2024
Thank you! That worked perfectly.
Jorge Eduardo Baquero • March 19, 2024
When installing the
pointblank
package, the following message does appear:This is the version of R on Mac:
What to do in such cases?
David Keyes Founder • March 19, 2024
You've got a couple options:
Let me know if this helps!
Jorge Eduardo Baquero • March 20, 2024
It worked with the dev version of the package. Thanks.
David Keyes Founder • March 21, 2024
Also, I wanted to mention that I think you misspelled
pointblank
, which could also explain why it wasn't working the first time. You wrotepointblack
instead ofpointblank
. Try doinginstall.packages("pointblank")
and that should work (hopefully).Lilly Kennedy • March 20, 2024
I am getting errors like: > skim(penguins_data) Error in skim(penguins_data) : could not find function "skim" even though I downloaded the skimr package, why is this?
Libby Heeren Coach • March 20, 2024
Hi, Lilly! Did you run
library(skimr)
before trying to run theskim()
function on your data? After you've installed a package, you need to load that package into your R session using a library call. Let me know if that helps!Lilly Kennedy • March 20, 2024
Yes I did and it still said it couldn't find that function
Libby Heeren Coach • March 20, 2024
Can you run
find.package("skimr")
for me and tell me what the result is? If the result is a file path, then you do have the package installed successfully, and if the result isError in find.package("skimr") : there is no package called ‘skimr’
then you'll need to try runninginstall.packages("skimr")
again and making sure it successfully installs. We can tackle this in a zoom call!Lilly Kennedy • March 20, 2024
This is what I get when I run that: find.package("skimr") [1] "C:/Users/Kenned22/AppData/Local/Programs/R/R-4.3.1/library/skimr"
Denny Lu • July 8, 2024
Hello! I am having the same question, but encountering Error in find.package("skimr") : there is no package called ‘skimr’.
Libby Heeren Coach • March 20, 2024
It looks like it's downloaded successfully! As long as you're running R version 4.3.1, it should be ok. You can quickly check your R version by running
R.Version()$version.string
but we can get together on zoom and try to figure it out if you can't get it working. I'd restart your R session and retry everything. Go to Session > Restart R. Then, run your code again: load all packages using library calls, import the data set and save it aspenguins_data
, and then runskim(penguins_data)
Libby Heeren Coach • March 20, 2024
It sounds like it's installed. We can get together and work on it on zoom if we need to, but it would be good to restart R and try again. Go to Session > Restart R. Then, run all your code again:
David Keyes Founder • July 8, 2024
It seems like
skimr
didn't get installed successfully. Please runinstall.packages("skimr")
in the console again and then it should work.Stephanie Scott • March 20, 2024
Did anyone else get the following? I did not put the hashtag , but that's what came up for me when I ran that code (I have no issue with this, just thought it was interesting).
David Keyes Founder • March 21, 2024
Yes, developers can put messages that show up when you load a package. This is a good example of that.
Valliappan Muthu • March 27, 2024
Hi dataReporter generated *.doc file instead of PDF. ANy possible reasons? although it does not matter much, I wanted to know why it was different for me
Valliappan Muthu • March 27, 2024
hi sorry, Partly got the answers in the comments section - I deleted the previously saved files and tried saving PDF and i got the following messages for the command "makeDataReport (penguins_data, output = "pdf")
Data report generation is finished. Please wait while your output file is being rendered.
Is dataReporter_penguins_data.pdf open on your computer? Please close it as fast as possible to avoid problems!
Error: LaTeX failed to compile dataReporter_penguins_data.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. In addition: Warning message: In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) : '"pdflatex"' not found
Libby Heeren Coach • March 27, 2024
Hey, Valli! I think you might be missing an installation of TinyTeX or MikTeX. You can try running
install.packages("tinytex")
and thentinytex::install_tinytex()
. Then, restart your R session (Session > Restart R) and try again. I'm not super familiar with the dataReporter package, unfortunately!David Keyes Founder • March 28, 2024
I'm having trouble. Why does this code not work?
penguins <- read_csv("penguins.csv")
David Keyes Founder • March 28, 2024
I can't get this working!
Denny Lu • July 8, 2024
Hello! I am getting this message when I run > scan_data("penguins_data.csv").
Error: The
interactions
andcorrelations
sections require the ggforce package:Thank you so much for your help!
David Keyes Founder • July 8, 2024
Please install the
ggforce
package withinstall.packages("ggforce")
and then try again.