# scatterplot + trendline: linear ggplot(radon_summary, aes(D, mean)) + geom_point( size = 2) + geom_errorbar( aes( ymin=mean -sd, ymax=mean +sd), width = 0.05) + labs( x= "Diameter (mm)", y= "Radon Released (%)") + theme_bw() + theme( = element_blank(), = element_blank()) + geom_smooth( method = "lm", formula = y ~ x) + labs( subtitle= "Trendline: linear") # scatterplot + trendline: quadratic ggplot(radon_summary, aes(D, mean)) + geom_point( size = 2) + geom_errorbar( aes( ymin=mean -sd, ymax=mean +sd), width = 0.05) + labs( x= "Diameter (mm)", y= "Radon Released (%)") + theme_bw() + theme( = element_blank(), = element_blank()) + geom_smooth( method = "lm", formula = y ~ x + I(x ^ 2)) + labs( subtitle= "Trendline: quadratic") # scatterplot + trendline: exponential ggplot(radon_summary, aes(D, mean)) + geom_point( size = 2) + geom_errorbar( aes( ymin=mean -sd, ymax=mean +sd), width = 0.05) + labs( x= "Diameter (mm)", y= "Radon Released (%)") + theme_bw() + theme( = element_blank(), = element_blank()) + geom_smooth( method = "lm", formula = y ~ exp( -x)) + labs( subtitle= "Trendline: exponential")Ĭomparing the different plots, I will choose the one using the exponential trendline to go on with the examples. We are going to start by loading the appropriate libraries, the readr to load the data from a csv file, the ggplot2 for the plots. I have tried ggplot but it says it does not find what I. This is what I used: plot (pa2wti2.Approving, pa2wti2.Price) Even when I tried a single it didn't give me a scatter plot. I am new to rstudio and having a lot of time understanding. You can download the summarised table here, or you can go to the tutorial on One-Way ANOVA to see how to create it. I am trying to create a scatterplot in rstudio with my data. We are going to use a table with summarised data: the shower diameter, the mean and standard deviation of the radon released, and compact letter display indicating the significant differences by Tukey’s test. The data was published in the Environment International Journal. In this tutorial we are going to build scatterplots to show the results of a one-factor experiment that measured the release of radon in showers with different aperture diameters. Adding compact letter display from Tukey’s test.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |