How to draw a line graph using ggplot with R programming. Plots and graphs to visualize data.

  Рет қаралды 67,524

R Programming 101

R Programming 101

3 жыл бұрын

If you want to use R programming to create plots and graphs using the ggplot package, then watch this video. In this video, I'll go though how to visualize two numeric variables and one categoric variable using line graphs and faceting with ggplot2 (which is a part of the tidyverse set of packages). This is an R programming for beginners video. Good data visualisation and descriptive statistics is the first step in data analysis. If you want to learn statistics and quantitative analysis, then this is a great place to start.

Пікірлер: 63
@RProgramming101
@RProgramming101 11 ай бұрын
Get my FREE cheat sheets for R programming and statistics (including transcripts of these lessons) here: www.learnmore365.com/courses/rprogramming-resource-library
@nastaranmarzban1419
@nastaranmarzban1419 25 күн бұрын
Hi, Dr Greg. So far, I've watched 5 videos about ggplot. I wanna confess that they are amazing and am sure that I'll watch all of the rest soon. Thanks for your nice explanation. Honestly, I lose track of time while watching your videos.
@matosleni
@matosleni 3 жыл бұрын
Thanks for the tutorial and simple explanation! After a quick review about the types of variables and graphs, the main topic starts at 05:51
@gregmartin
@gregmartin 2 жыл бұрын
Thank you, Leni 🙂
@belindalow5804
@belindalow5804 3 жыл бұрын
You have been a god send ! I just wasn't getting it until you explained it! And thanks for the reminder not to drugs - made me laugh ! YOU ARE APPRECIATED !
@RProgramming101
@RProgramming101 3 жыл бұрын
Thanks so much for the lovely comment Belinda!!!
@samuelperren485
@samuelperren485 2 жыл бұрын
This guy is great! He actually makes me excited about learning R. Thanks Greg, you're a legend 👍
@RProgramming101
@RProgramming101 2 жыл бұрын
That's kind of you to say :) thanks for the great feedback Samuel!!
@adriandevries8716
@adriandevries8716 10 ай бұрын
This channel is such a gold mine. God Bless You. This language is haRd.
@bestzohan
@bestzohan 3 жыл бұрын
as always, super didactic! Please keep doing these videos! :D
@veroniquemigue7985
@veroniquemigue7985 3 жыл бұрын
Thank you for another helpful video. Keep em coming!
@RProgramming101
@RProgramming101 3 жыл бұрын
Thanks, will do!
3 жыл бұрын
I really like your work, Greg! Thanks so much
@gregmartin
@gregmartin 2 жыл бұрын
Glad you liked it, Francisco! Thank you!
@zhenhuahuang291
@zhenhuahuang291 3 жыл бұрын
Could you keep adding more videos on linear regression, logistic regression, neural networks, deep learning, etc.?
@user-km3ru9bb7f
@user-km3ru9bb7f 2 жыл бұрын
Thanks for the tutorial and simple explanation!
@RProgramming101
@RProgramming101 2 жыл бұрын
Glad it was helpful!
@shubhankartiwari876
@shubhankartiwari876 3 жыл бұрын
I like the way you guide us about R programming. It is fun learning with you. request you to add more videos related to R programming so that we can enhance our skillset in it and become Pro like you :)
@gregmartin
@gregmartin 2 жыл бұрын
Thank you, Shubhankar. Will definitely do.
@mibo747
@mibo747 2 жыл бұрын
many thanks for PERFECT presentation and knowledge
@gregmartin
@gregmartin 2 жыл бұрын
Thank you for your feedback, Mike. Glad you liked it! 👍
@noureddineabid1753
@noureddineabid1753 8 ай бұрын
It is very useful. Thank you
@dcruz8510
@dcruz8510 3 жыл бұрын
Great easy explanations and great tips
@RProgramming101
@RProgramming101 3 жыл бұрын
Thanks for the feedback.
@forever.student
@forever.student 2 жыл бұрын
Could you give the R codes for each tutorial in description box? That would tremendously help us in practicing R for new learner like us
@gedagelana512
@gedagelana512 2 жыл бұрын
Greetings Mr. Martin! Thank you for your great channel. I'm learning so much from you. In the last two minutes of the above video, you discuss filtering a data set for a few variables and then consolidating them onto one graph for better comparison. I'm trying the same thing but getting a blank graph. My code shows no errors. Why is that? ...when I run it after filtering just one variable, it displays a graph. But when I filter two variables from the df and pipe it to ggplot, it becomes blank. I would appreciate your help! Many thanks!
@GiovanniGirelli1104
@GiovanniGirelli1104 2 жыл бұрын
I just discovered your channel while looking for information on how to write R code for Power BI. I immediately subscribed and hit that bell button :) Awesome videos. Keep it up.
@gregmartin
@gregmartin 2 жыл бұрын
Thank you for your feedback, Giovanni. Much appreciated 👍
@pawelkurtyka9672
@pawelkurtyka9672 3 жыл бұрын
WOW! Greg! Thanks so much
@gregmartin
@gregmartin 2 жыл бұрын
You're very much welcome, Pawel!
@romanvasiura6705
@romanvasiura6705 Жыл бұрын
Thank you for this amazing video.
@RProgramming101
@RProgramming101 Жыл бұрын
Glad you enjoyed it! Thank you too!
@Rehan1824
@Rehan1824 3 жыл бұрын
Unblieveable...too much easy to digest coding...like on finger tips...thank you so much
@gregmartin
@gregmartin 2 жыл бұрын
You're welcome!
@yw1182
@yw1182 2 жыл бұрын
Thank you ! great vid.
@RProgramming101
@RProgramming101 2 жыл бұрын
Glad you liked it! Thank you for the feedback.
@ktmagar7
@ktmagar7 3 жыл бұрын
You make it so cool. :)
@RProgramming101
@RProgramming101 3 жыл бұрын
Thanks.
@mathsheaven1605
@mathsheaven1605 Жыл бұрын
Thanks sir , day after tomorrow,i have my exam ,but i even don't know,what my teacher taught me ,she made this easy subject into a heap of trouble, but now after watching ur video , I'll give my best in exam , thank you sir
@RProgramming101
@RProgramming101 Жыл бұрын
So nice of you to say - thanks for the great feedback and all the best on your exams! You got this!
@programmingwithjackchew903
@programmingwithjackchew903 2 жыл бұрын
great video
@negusuworku2375
@negusuworku2375 Ай бұрын
Excellent...very helpful. I have one mor question ...on converting date into Week. Can you please send a video on this matter. Thank you in advance
@amada.10
@amada.10 3 жыл бұрын
Can you please put on your video description, a link to the database you were referred to create this video,it will help us a lot , Thank you🙂
@ahmed007Jaber
@ahmed007Jaber Жыл бұрын
thank u for this. suppose you got quantity of items sold and the value of the sale you want to should bars for sale value and line for quantity how would you do that???
@herbertchitere4142
@herbertchitere4142 3 жыл бұрын
Thanks Greg
@RProgramming101
@RProgramming101 3 жыл бұрын
You are most welcome.
@jamesleleji6984
@jamesleleji6984 Жыл бұрын
Why did you not use the color argument in the geom_line function?
@Alonso_Cid
@Alonso_Cid Жыл бұрын
Do anyone knows if I can make a plot with 2 different geometries each representing different data?
@arifmemovic3383
@arifmemovic3383 10 ай бұрын
Did you program the drum and bass breakbeat at the beginning of the video?
@waqarabbas1722
@waqarabbas1722 11 ай бұрын
Sir I mess up in understanding under what case type to plot different type of graphs for example when to create scatter plot or when do we plot line graph. This problem implies to all types of graphs I can't understand which graph to choose . Can you give an explanation on regarding the use of different types of graphs?
@salmaasghar9099
@salmaasghar9099 2 жыл бұрын
Hello my R studio doesnot have a function data but data.class and other options appear here. What should i do?
@tuhinsuryachakraborty
@tuhinsuryachakraborty Ай бұрын
@johirislam8174
@johirislam8174 3 жыл бұрын
I created a volcano plot by enhance volcano.But in the plot instead of showing the gene symbol some kind of number are shown.So how can i solve this problem. EnhancedVolcano(exp1, x = "logFC", y = "adj.P.Val", lab = rownames(exp1), FCcutoff = 0.6, pCutoff=0.01, cutoffLineType = 'twodash', cutoffLineWidth = 0.4, pointSize = 1, legendPosition = 'none', title = "", subtitle = "", caption = "", labSize = 3, ylim = c(0, 6)) + theme_pubr(legend = "none"). exp1 is my dataset and the first column of that dataset is gene symbol.
@bernardraath7390
@bernardraath7390 2 жыл бұрын
Hi you sound South African. Also. Please can you do one with loads of data as with spectra. I have to do it for my project and can't for the life of me figure it out. If you can reach out please.
@atifdai313
@atifdai313 Жыл бұрын
How can we make line graph of 30 countries...........I am using panel data.
@edongoogle8290
@edongoogle8290 3 жыл бұрын
I get this back in my console for 11.26 > Orange %>% + filter(Tree != "2") %>% + ggplot(aes(age,circumference))+ + geom_point()+ + geom_smooth()+ + facet_wrap(~Tree)+ + theme_bw() `geom_smooth()` using method = 'loess' and formula 'y ~ x' > facet_wrap()+ + labs(Title="Tree Age and Circumference") Error in wrap_as_facets_list(facets) : argument "facets" is missing, with no default > Orange %>% + filter(Tree != "2") %>% + ggplot(aes(age,circumference))+ + geom_point()+ + geom_smooth()+ + facet_wrap(~Tree)+ + theme_bw() `geom_smooth()` using method = 'loess' and formula 'y ~ x' > facet_wrap()+ + labs(title="Tree Age and Circumference") Error in wrap_as_facets_list(facets) : argument "facets" is missing, with no default > Orange %>% + filter(Tree != "1" & + Tree !+ "2") %>% Error: unexpected '!' in: " filter(Tree != "1" & Tree !" > ggplot(aes(age, circumference, colour, Tree))+ + geom_point(size = 5, alpha = 0.3)+ + geom_line(size =1)+ + theme_minimal()+ + labs(title = "Tree age and circumference") Error: `data` must be a data frame, or other object coercible by `fortify()`, not an S3 object with class uneval Did you accidentally pass `aes()` to the `data` argument? Run `rlang::last_error()` to see where the error occurred. In addition: Warning message: Duplicated aesthetics after name standardisation: >
@mychudungco
@mychudungco 2 жыл бұрын
Thanks for the video, but next time, please explain each code line in detail so that learner can follow. In this video, you passed lots of code lines, for example, from 80-83, so that it is hard to follow for new learners like me
@RProgramming101
@RProgramming101 2 жыл бұрын
Sorry about that, Thanks for the suggestion and for watching :)
@analyticsvisionary8197
@analyticsvisionary8197 3 жыл бұрын
AAA content!
@gregmartin
@gregmartin 2 жыл бұрын
Thank you for the feedback 👍
@georgebiffen2554
@georgebiffen2554 Жыл бұрын
dartar 😂
@paulhetherington3854
@paulhetherington3854 Жыл бұрын
Cat
Little girl's dream of a giant teddy bear is about to come true #shorts
00:32
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 9 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:26
CRAZY GREAPA
Рет қаралды 16 МЛН
아이스크림으로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 61 МЛН
Bar charts and Histograms using ggplot in R
18:22
R Programming 101
Рет қаралды 64 М.
How to combine multiple plots in R with cowplot and ggplot2 (CC098)
20:16
Riffomonas Project
Рет қаралды 20 М.
Describe and Summarise your data
19:44
R Programming 101
Рет қаралды 52 М.
Scatter plot and Line plot in R (using ggplot2)
22:28
Peeling Back Data
Рет қаралды 43 М.
Data visualization with R in 36 minutes
36:16
Equitable Equations
Рет қаралды 26 М.
Little girl's dream of a giant teddy bear is about to come true #shorts
00:32