Back to Course

R for Busy People (Cohort-0)

0% Complete
0/0 Steps
  1. Installing R and RStudio
    1 Lesson
    |
    2 Quizzes
  2. The RStudio IDE
    1 Lesson
    |
    2 Quizzes
  3. Coding Basics
    1 Lesson
    |
    2 Quizzes
  4. Assignment | Workshop 1
    1 Quiz
  5. Data dive: Ebola in Sierra Leone
    1 Lesson
    |
    2 Quizzes
  6. RStudio Projects
    1 Lesson
    |
    2 Quizzes
  7. Workshop 2
    1 Lesson
    |
    1 Quiz
  8. Using R Markdown
    1 Lesson
    |
    2 Quizzes
  9. Data classes & structures (deprec)
    2 Lessons
  10. Workshop 3
    1 Lesson
    |
    1 Quiz
  11. Select & rename
    1 Lesson
    |
    3 Quizzes
  12. Filter
    1 Lesson
    |
    3 Quizzes
  13. Workshop 4
    1 Quiz
  14. Mutate
    1 Lesson
    |
    3 Quizzes
  15. Workshop 5
    1 Lesson
    |
    1 Quiz
  16. Conditional mutate
    1 Lesson
    |
    3 Quizzes
  17. Group by and summarize
    1 Lesson
    |
    2 Quizzes
  18. Workshop 6
    1 Lesson
    |
    1 Quiz
  19. Other grouped operations
    1 Lesson
    |
    2 Quizzes
  20. Workshop 7
    1 Lesson
    |
    1 Quiz
  21. Intro to ggplot2
    1 Lesson
    |
    2 Quizzes
  22. Scatter plots and smoothing
    1 Lesson
    |
    2 Quizzes
  23. Workshop 8
    1 Lesson
    |
    1 Quiz
  24. Lines, scales, and labels
    1 Lesson
    |
    2 Quizzes
  25. Overview of the EpiGraphHub web platform
  26. Data exploration on EpiGraphHub
    1 Quiz
  27. Workshop 9
    1 Lesson
    |
    1 Quiz
  28. Workshop 10
    1 Lesson
    |
    1 Quiz
  29. Final project
    1 Lesson
    |
    1 Quiz
  30. Getting help
    1 Lesson
    |
    1 Quiz
  31. Quiz contributions
    16 Lessons
Topic Progress
0% Complete

This lesson can be followed by watching the lesson video below, or reading through the lesson manuscript further down. Choose whichever mode works best for you!

Lesson video


Lesson notes

The written guide below is an accompaniment to the lesson video. You may read through it if you prefer written tutorials to video content.

Subscribe
Notify of
guest

28 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Tobias

Ebola in Sierra Leone has assisted me in how to synthesize data especially in outbreak settings and have a meaningful interpretation

Emneteab (Emnet)

Hi Colleagues,
what would be the problem the following warning had appeared as

esquisser(ebola_sierra_leone)
Loading required package: shiny

Listening on http://127.0.0.1:3405
Warning: Removed 4 rows containing non-finite values (stat_bin()).
Warning: Removed 4 rows containing non-finite values (stat_bin()).
Warning: Removed 4 rows containing non-finite values (stat_boxplot()).

Thank you !!!

Kene David

You can ignore these! They are not much of a problem.

Emneteab (Emnet)

Well copied, thank you Kene!

Emneteab (Emnet)

Another error poped as below:-

cat_summary_plot <- show_plot(inspect_cat(ebola_sierra_leone))

ggplotly(cat_summary_plot)

In the console, it says ” ( cat_summary_plot ) ” not found ?

Joy

Hi Emnet, it is possible that you may have forgotten to run the line

cat_summary_plot <- show_plot(inspect_cat(ebola_sierra_leone)) 

before ggplotly. Can you try that? Make sure cat_summary_plot shows up in your environment as an object before running ggplotly.

Emneteab (Emnet)

Thank you, Joy. It worked now.

Emneteab (Emnet)

Thank you for the excellent presentations. However, i am struggling due to the following error Restarting R session... > # Ebola sierra leone analysis > # Emneteab Gezahegn Belayneh > # 2023-05-22 > > # Load Pakages ---- > > if(!require(pacman))install.packages("pacman") Loading required package: pacman > pacman::p_load( + tidyverse, #meta-package + inspectdf, +… Read more »

Kene David

Hello! Did you use the option

“File > Import Dataset”

to import your data?

Emneteab (Emnet)

Hello Kene ,

I did the File > Import dataset> readar....route it was downloaded at first but when i tried the reproducibilty play after the Restart session , the above error poped. I do use the  R version 4.3.0

with Window 11. What can u advise?
Thanks

Kene David

Ah I see. You want a relative path. For this, you will need to set up an RStudio Project, which is covered in the next lesson. (If you’ve already done this lesson, and it’s still not working then it may be easier to diagnose your problem during our live help session on Tuesday).… Read more »

Emneteab (Emnet)

Thank you, David. It is resolved now.

Anna

Hi! I am using R version 4.1.3 (2022-03-10) and it looks like inspect_df package is not available for this version

inspect_df.PNG
Kene David

Ah the package name does not have an underscore. So just “inspectdf”.
Thanks for including your error message.

Last edited 11 months ago by Kene David
Tyson

This was a really intriguing one to watch.

Azeez

Good explanation

Ramazani

Dear Colleagues, thank you for your useful comments ,I am stuck on the lesson : Data dive : Ebola in Sierra Leone : this script refuse to run : inspect_cat(ebola_sierra_leone) ,
It says that : Error in inspect_cat(ebola_sierra_leone) : 
 could not find function “inspect_cat”

How can get this script run ?

Thanks

Kene David

Hi Ramazani. You need to first load the package that contains that function, which is {inspectdf}.

Run this code from the lesson:

if(!require(pacman)) install.packages("pacman")
pacman::p_load(
  tidyverse, # meta-package
  inspectdf,
  plotly,
  janitor,
  visdat,
  esquisse
)
Ramazani

it is ok now…. thank you

Trokon Omarley

I am excited and looking forward to learning more through this long journey. However, in answering the last question about the outbreak growing or receding, I encountered a problem. After launching the esquisser function, I placed the date of onset variable in the “X” tab, but only the “bar plot” was active for… Read more »

Kene David

Hi Trokon! I think this may be due to the data import function that you used. It is likely that you used read.csv() instead of read_csv() when you were importing your data. The difference is that the second function, which has an underscore, rather than a period, is from the {readr} package and… Read more »

ADORATION

While I followed all, and got same results, I struggled with finding the button to zoom in and out on esquisse.
I am yet to find it.

Last edited 1 year ago by ADORATION
Kene David

Hello! Zooming in and out with esquisse is a bit confusing. You have to zoom out in Rstudio BEFORE you get into esquisse.

So use Control and in RStudio first to zoom out before you trigger {esquisse}. Or you can use the RStudio Menu (View > Zoom out)

Last edited 1 year ago by admin
ADORATION

Right, it worked.

Thanks.

Maxwell

While I am able to load and visualize on Esquisse, the view is not whole. In fact, I am unable to view the other chart options like density when you implemented age analysis as well as the violin plot. Any idea why this is so?

Kene David

I think this sometimes happens when your RStudio window is too zoomed in. Try to zoom out a bit, either with Ctrl/Cmd + minus.

Or with the RStudio menu option View > Zoom Out.

Let us know if it works!

Last edited 1 year ago by Kene David
Maxwell

I continued with the lesson but made sure I wrote the ggplot code and got the same violin chart. I have just tried the solution and repeated the steps and it worked. Thank you

Enoch

Thanks to this course, you can also use the attach() function than using the $ for calling the column names. – Thanks

28
0
Questions or comments?x