Excellent video, but you need to remove the full stop (after drv,) from your example code in the video: qplot(hwy, data = mpg, facets = .~drv,. binwidth = 2) else the code will produce an error. Best, W
Thanks so much Roger. I have begin for several days. I found your videos by accident. It is extremely useful for my study. In case I have any question about Graph in R during my learning, could I contact you for help?
Great video on the history and various graphs one can make with ggplot. I like using ggplot for my longer, more thorough analyses. The possibilities are almost limitless with bagplots, violin distribution plots, and even 3D rotating plots (you can see some examples of these on my channel under ggplot or R, RStudio). Again great video. Thank you.
I am having this error when i tried to geom_point() > scatterplot + geom_line() Error in exists(name, envir = env, mode = mode) : argument "env" is missing, with no default Can someone explain why this is happening. I am using R Studio. Thanks
When you're in R, either in the terminal or in an IDE (Rstudio for example) - type "install.packages('ggplot2')". To later use it, you have to load the package with the command: "library(ggplot2)"
Hey yes I did, the easiest thing to do is send you to stackoverflow link, as I did it through that - but essentially for me it was a laptop issue, corrupting the files ...... stackoverflow.com/questions/34753612/why-cant-i-use-my-installed-packages-in-r/34764504#34764504 I hope this helps, if not let me know xx
I believe ggplot comes standard with the Tidyverse package. Just install.packages("tidyverse") then run it with library(tidyverse) and that should work for you. Also, be sure and check your version of R. Update to the latest version on the Cran site. :)
Hi, how to import the RDA files, I need to import maacs data set which is in Rda format. save, load seems to be doesn't work . Any help is highly appreciated
Why do I get a different histogram depending on the order of the levels of the factor? Try running the following code with and without the line for re-ordering the factor level. Data from here: github.com/TarekDib03/ExploratoryDataAnalysisCoursera/blob/master/maacs.Rda load("maacs.Rda") # Change order of yes/no levels maacs$mopos
Thank you, this is a really usefull video. I would like some help. I have a data with 4 information (exemple), the first is real (A). So, I need a grafhic (geom) with A in axis X and LC, A1 and A2 in axis Y. It's possible? How can I do? Data exemple: A LC AC1 AC2 1 1,27 1,47 1,29 1,27 2 1,80 2,16 1,89 1,86 3 1,75 1,92 1,68 1,65 4 1,94 2,70 2,36 2,33 5 1,54 1,80 1,58 1,55 6 1,96 2,25 1,97 1,94
I want to draw a multifaceted diagram using "mpg" for the factors "cty" and "hey". Facet factor= dev 1) how to draw a multifaceted diagram with color 2) How to add multiple plot Syntex in vim file
Hello, for your first question, does the following code do what you want? ggplot(mpg, aes(cty, hwy, color = drv)) + geom_point() + facet_wrap(~drv) Unfortunately I can't help with the second question
There are a ton of free data sets on the University of California at Irvine's data science department site. Go to it here: archive.ics.uci.edu/ml/index.php
I would like to use "ggplot2" to create a graph showing whether life satisfaction returns to the value it had before the unemployment event occurred. Unemployment I have coded with 0 = not unemployed and 1 = unemployed. General life satisfaction is coded 0 - 10. I have already created the data set df_emp with a subset command, which contains all persons who were unemployed at least once. It also contains all years of observation of these persons. So all years before, during and after unemployment, as well as the corresponding values for life satisfaction The years before, during and after the event should now be entered on the x-axis. Where 0 is the event unemployment. The values -1 -2 and 1 2 etc. show values for the years before and after unemployment. On the y-axis the values for life satisfaction should then be deducted (centered). Unfortunately, I can't manage to model this graphic in R and would therefore be very pleased if somebody could help me or give me some tips on how to proceed. Best regards ps. I got the graphic from Lucas et al. (2004) - Unemployment alters the set point for life satisfaction
GUI GUI GUI. It is the robots era and we still have to waste time writing syntax. GUI GUI GUI. Just drag and drop and the software should be more smart to know what we want. Just like Tableau
themanager1980 Automation requires programs and syntax. Any program that is GUI controlled without a similar command capability is very limited. GUIs are fine if you only have to do a it couple of dozen times. But a couple of thousand times is a different story. I write many processes that are automated in a script so that people do not have to spend weeks at the terminal using GUIs.
Thank you. This is a really decent video. The graphics and labels to code are a great help to us novices.
I wish your coursera courses are just like this !!! Very informative and at a considerable pace.
I love this Roger. You have indeed simplified the whole course called Data Viz. I am so glad.
Thanks a lot you made it look so easy,P.S the way you illustrate the crude data by these plot was really great.
Excellent! Just start to use ggplot2 and this is a brilliant starting point.
Thank you so much ! It helps a lot !
Helped my understanding of visualizations with ggplot2 immensely. Thanks!
Hi Roger. Excellent video! How do you get the presenter video in the upper right corner??
Excellent video, but you need to remove the full stop (after drv,) from your example code in the video:
qplot(hwy, data = mpg, facets = .~drv,. binwidth = 2)
else the code will produce an error.
Best,
W
Thank you! Nice introduction to ggplot package!
These have been very informative. Thank you good sir.
Amazing work Roger.
Thanks Roger for sharing the video, great job done!
Hi! Your video is very useful, I was wondering if you can share your presentation because I really like to have that useful information
Thank you for this fantastic video!! It has helped tons!!
Amazing video. Thanks for sharing!
Great GGPOT2 Presentation.
Thank You.
Thanks for very informative video, and learning ggplot2 was due for very long time for me.
Thanks so much Roger. I have begin for several days. I found your videos by accident. It is extremely useful for my study. In case I have any question about Graph in R during my learning, could I contact you for help?
Very good. Suggestions: Add subtitles, so we can skip the intro on ggplot2. Use a large mouse to point at the slides.
Excellent presentation, very helpful
v.nice thanks, I would like to meet you as I am a MPH student in JHSPH
It was an excellent explanation, thank you!!
Very helpful. Thanks!
Very instructive video, thx!
Thank you very much !!
Thank you :D !!
Very coherent. Good pace and great information presented.
thank you very much!
Thank you. Excellent explanation.
Thank you... Please do same for ggmap, dplyr and ggvis...
Do you have a link to the PowerPoint slides?
just saved my life! thanks
thank you very much good job
Brilliant video. Thank you Roger!
+James Barrett
Hi James, do you know how to get data set to practice following this video? Thanks
+Khanh Pham Dang "This dataset comes with the ggplot2 package" at about 10:28
Very useful but having the last data set would help me a lot...
thank you can you draw the red circle in shape is different to others color
Good exposition. Thank you.
Thank a lot..can u pleas add a link to the commands u used so we can copy them and repeat after u
Thanks!
Hello!! Can i do you one question? Is about a code with ggplot that i cant resolve... :(
Great
Great video on the history and various graphs one can make with ggplot. I like using ggplot for my longer, more thorough analyses. The possibilities are almost limitless with bagplots, violin distribution plots, and even 3D rotating plots (you can see some examples of these on my channel under ggplot or R, RStudio). Again great video. Thank you.
Danke! Sehr kompetent!
perfect!
First of all your videos are great Thanks for that
But the method="lm" function gives me an error saying that Unexpected parameter
I get the same message.
any way for making 2 y-axis plots in ggplot2 ???
I am having this error when i tried to geom_point()
> scatterplot + geom_line()
Error in exists(name, envir = env, mode = mode) :
argument "env" is missing, with no default
Can someone explain why this is happening. I am using R Studio. Thanks
A quick walk through on installing ggplot2 would be helpful
When you're in R, either in the terminal or in an IDE (Rstudio for example) - type "install.packages('ggplot2')".
To later use it, you have to load the package with the command: "library(ggplot2)"
How can I increase size of font and numbers in boxplot and scatter plot/
i installed the package but its doing this:> library(ggplot2)
Error in loadNamespace(j
+Destiny Bradley
Hi,
Did you solve the issue??
I too have the same issue.. can u help me please
Hey yes I did, the easiest thing to do is send you to stackoverflow link, as I did it through that - but essentially for me it was a laptop issue, corrupting the files ...... stackoverflow.com/questions/34753612/why-cant-i-use-my-installed-packages-in-r/34764504#34764504 I hope this helps, if not let me know xx
I believe ggplot comes standard with the Tidyverse package. Just install.packages("tidyverse") then run it with library(tidyverse) and that should work for you. Also, be sure and check your version of R. Update to the latest version on the Cran site. :)
> qplot(preciokilo, data=basebananos, fill=fecha1,ylab = "Precio", xlab="Tiempo", main="Precio/kilo vs Tiempo")
error `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
Hi, how to import the RDA files, I need to import maacs data set which is in Rda format. save, load seems to be doesn't work . Any help is highly appreciated
solution to import RDA files
r.789695.n4.nabble.com/How-to-open-rda-file-in-R-td1049893.html
Why do I get a different histogram depending on the order of the levels of the factor? Try running the following code with and without the line for re-ordering the factor level. Data from here: github.com/TarekDib03/ExploratoryDataAnalysisCoursera/blob/master/maacs.Rda
load("maacs.Rda")
# Change order of yes/no levels
maacs$mopos
Thanks. How about this error? Error: 'encode_colour' is not an exported object from 'namespace:farve
What code did you use?
how to solve this error:
> library("ggplot2", lib.loc="~/R/win-library/3.2")
Error in loadNamespace(j
Thank you, this is a really usefull video.
I would like some help. I have a data with 4 information (exemple), the first is real (A). So, I need a grafhic (geom) with A in axis X and LC, A1 and A2 in axis Y. It's possible? How can I do?
Data exemple:
A LC AC1 AC2
1 1,27 1,47 1,29 1,27
2 1,80 2,16 1,89 1,86
3 1,75 1,92 1,68 1,65
4 1,94 2,70 2,36 2,33
5 1,54 1,80 1,58 1,55
6 1,96 2,25 1,97 1,94
Thanks
I want to draw a multifaceted diagram using "mpg" for the factors "cty" and "hey". Facet factor= dev
1) how to draw a multifaceted diagram with color
2) How to add multiple plot Syntex in vim file
Hello, for your first question, does the following code do what you want?
ggplot(mpg, aes(cty, hwy, color = drv)) +
geom_point() +
facet_wrap(~drv)
Unfortunately I can't help with the second question
Can all of you help me to know how to get data set for this video?
Thanks
There are a ton of free data sets on the University of California at Irvine's data science department site. Go to it here: archive.ics.uci.edu/ml/index.php
Why talking so much about qplot when the title is about ggplot? Loss of time.
does someone know how to make forest plot with R. I am lost
You can try using some meta-analysis packages. Such as 'metafor', with the function 'forest', you can make a forest plot easily.
Use JASP to create forest plots....no better way to go than JASP!
how to get the MAACS dataset ?
github.com/lejarx/MAACS-dataset/blob/master/maacs.rda
I would like to use "ggplot2" to create a graph showing whether life satisfaction returns to the value it had before the unemployment event occurred.
Unemployment I have coded with 0 = not unemployed and 1 = unemployed. General life satisfaction is coded 0 - 10.
I have already created the data set df_emp with a subset command, which contains all persons who were unemployed at least once. It also contains all years of observation of these persons. So all years before, during and after unemployment, as well as the corresponding values for life satisfaction
The years before, during and after the event should now be entered on the x-axis. Where 0 is the event unemployment. The values -1 -2 and 1 2 etc. show values for the years before and after unemployment.
On the y-axis the values for life satisfaction should then be deducted (centered).
Unfortunately, I can't manage to model this graphic in R and would therefore be very pleased if somebody could help me or give me some tips on how to proceed.
Best regards
ps. I got the graphic from Lucas et al. (2004) - Unemployment alters the set point for life satisfaction
Hello did you manage to create the graph?
You talk way too fast man. is difficult to keep up with you. I suggest you slow down a bit since there are foreign who also watch these videos
data("")
plot()
attach()
par(mfrow=c(1,2)
2xplot(wt, dose, col="", main="")
B
t=data.frame(A=rep(c("a","b"), each=10),B=norm(20),C=seq(1,100,by=5),D=1:20)
tab[1,3]=NA
quantile(tab$D, .00)
colSums(tab[,2:4],na.rm=true)
sum(is.na(tab$C))
mean(tab$C,na.rm=TRUE)
any(is.na(tab$C)
sort(tab$B,decreasing=TRUE)
sort(tab$B)
tab["E"]=tab$B^2
Video is titled 'Plotting with ggplot2,' but the guy spends most of the time talking about qplot... what's that all about?
qplot is a ggplot2 function and keeps in mind that the video was published 7 years ago
GUI GUI GUI. It is the robots era and we still have to waste time writing syntax.
GUI GUI GUI. Just drag and drop and the software should be more smart to know what we want. Just like Tableau
themanager1980 Automation requires programs and syntax. Any program that is GUI controlled without a similar command capability is very limited. GUIs are fine if you only have to do a it couple of dozen times. But a couple of thousand times is a different story. I write many processes that are automated in a script so that people do not have to spend weeks at the terminal using GUIs.
Thanks Mark. I mean both options GUI and syntax. Maybe as SPSS. Graphs are so limited in SPSS tho.
themanager1980 I agree completely.
Thanks