R programming for beginners – statistic with R (t-test and linear regression) and dplyr and ggplot | Video

R programming for beginners – This video is an introduction to R programming. I have another channel dedicated to R teaching: https://www.youtube.com/c/rprogramming101 In this video I provide a tutorial on some statistical analysis (specifically using the t-test and linear regression). I also demonstrate how to use dplyr and ggplot to do data manipulation and data visualisation. Its R programming for beginners really and is filled with graphics, quantitative analysis and some explanations as to how statistics work. If you’re a statistician, into data science or perhaps someone learning bio-stats and thinking about learning to use R for quantitative analysis, then you’ll find this video useful. Importantly, R is free. If you learn R programming you’ll have it for life.

READ ALSO:  Class 10th Science video tutorials |displacement reaction in hindi |Wahthu| part 4 | Video

This video was sponsored by the University of Edinburgh. Find out more about their programmes at http://edin.ac/2pTfis2

This channel focusses on global health and public health – so please consider subscribing if you’re someone wanting to make the world a better place – I’d love to you join this community. I have videos on epidemiology, study design, ethics and many more.

READ ALSO:  Data Science Tutorials | Part 2 Session 6 | Measure of Central Tendency Mean,Median,Mode | Video



  1. Thanks for making this video. I am encountering trouble as a newbie R learner. When I try to run the following, I get an error in the t-test statement. It looks identical to what you have on the video.

    x <- mean(gapminder$gdpPercap)
    df1 <- gapminder %>%
    select(country,lifeExp) %>%
    filter(country == "South Africa" |
    country == "Ireland") %>%
    group_by(country) %>%
    summarise(Average_life = mean(lifeExp))
    t.test(data = df1, lifeExp ~ country)

    I get this error when executing the last statement: Error in eval(predvars, data, env) : object 'lifeExp' not found. The preceding source is OK since x and df1 are printed correctly.

    Just commented out the "group_by" and "summarise" and the pipe at the end of the filter(). That worked and t-test was run. Back to the drawing board.

  2. Hi i am trying to use "mutate" to add a new column B that calculates differences between, consecutive cells of column A… say B2 = A2-A1 , B3= A3-A2 .. etc , using diff() function, but since this new column has one element less , i get an error. Any ideas? I am a total newbie.

  3. Thank you for you give this course free which I did not get when I was attending in university class. I motivated and feel confidence to do and continue a research in one of health problems.

Comments are closed.