R Shiny for Data Science Tutorial – Build Interactive Data-Driven Web Apps



Learn how to build interactive data-driven web apps in R using the Shiny package.

✏️ Course developed by Chanin Nantasenamat (aka Data Professor). Check out his YouTube
channel for more bioinformatics and data science tutorials:

⭐️ Code ⭐️
💻 Apps 1-5:
💻 Deploy Shiny App:

🔗 Medium blog posts for more data science tutorials
🔗 For updates connect via Newsletter:
🔗 Twitter:

⭐️ Course Contents ⭐️
⌨️ (0:00:00) Introduction
⌨️ (0:01:13) Introduction to Shiny
⌨️ (0:08:24) App 1 – Print User Input
⌨️ (0:21:12) App 2 – Display Histogram
⌨️ (0:32:07) App 3 – Machine Learning (Weather Dataset)
⌨️ (0:47:51) App 4 – Machine Learning (Iris Dataset)
⌨️ (1:05:03) App 5 – BMI Calculator
⌨️ (1:19:18) Deploy Shiny Apps to Heroku

🎉 Thanks to our Champion and Sponsor supporters:
👾 Wong Voon jinq
👾 hexploitation
👾 Katia Moran
👾 BlckPhantom
👾 Nick Raker
👾 Otis Morgan
👾 DeezMaster
👾 AppWrite

Learn to code for free and get a developer job:

Read hundreds of articles on programming:

❤️ Support for this channel comes from our friends at Scrimba – the coding platform that’s reinvented interactive learning:

source

34 Comments

  1. Hi FCC Team.
    sir i have doubt with few question which asked me by interviewer in interview that as fresher in R/Shiny Developer.
    1. What happens if a required package is missing after deployment or while deployment?
    2. The application works in dev. environment, but fails in production ?
    3. If package installation suddenly fails during deployment?

    i really need this answer by Chanin Nantasenamat aka data Professor

  2. Going through the code. It seems there was an R update that doesn't automatically make strings as factors when reading a csv for App 3 which breaks some things. Adding ", stringsAsFactors = TRUE" to the read.csv line fixes this.

  3. Apllication activity 3, randomForest 4.7-1.1 do cannot create the model, Error in y – ymean : non-numeric argument to binary operator

    In addition: Warning messages:

    1: In randomForest.default(m, y, …) :

    The response has five or fewer unique values. Are you sure you want to do regression?

    2: In mean.default(y) : argument is not numeric or logical: returning

  4. @NETSEDU8

    Before the line defining the model, add:

    weather$play = factor(weather$play)

    weather$outlook = factor(weather$outlook)
    =================================================================================
    model <- randomForest(play ~ ., data = weather, ntree = 500, mtry = 4, importance = TRUE)
    =================================================================================
    play golf app

  5. 31:16 what does length.out = input$bins + 1 mean? Can you explain it to me in plain English? (The answer has been generated by ChatGPT.) In the Shiny app code, seq(min(x), max(x), length.out = input$bins + 1) is used to create a sequence of values that is used to define the bins for the histogram.

    The seq function is used to create a sequence of evenly spaced values. In this case, the first argument min(x) is the starting value of the sequence, and the second argument max(x) is the ending value of the sequence. The length.out argument specifies the length of the sequence that should be generated.

    The value of input$bins is the number of bins selected by the user using the sliderInput. The +1 is added to input$bins to ensure that the sequence has one more value than the number of bins selected by the user. This is because the hist function includes the rightmost edge of the last bin, so the number of breaks needed is bins+1.

    Therefore, length.out = input$bins + 1 means that the seq function should generate a sequence of values that is input$bins + 1 long, starting at the minimum value of x and ending at the maximum value of x. This sequence of values is used to define the breaks or bins for the histogram.

  6. Hello Professor, thank you so much for the great video. I have a question in the App 3 how to add background color to the header title? COuld you please tell us?

  7. Hi Prof. Your tutorial is great. I am getting following error in both Play-Golf and IRIS programs related to randomForest.
    Error in y – ymean : non-numeric argument to binary operator

    In addition: Warning messages:

    1: In randomForest.default(m, y, …) :

    The response has five or fewer unique values. Are you sure you want to do regression?

    2: In mean.default(y) : argument is not numeric or logical: returning NA

Leave a Reply

Your email address will not be published. Required fields are marked *

You might like

© 2026 Cantinho do Vídeo - WordPress Video Theme by WPEnjoy