Re: [R] ggplot2: Get the regression line with 95% confidence bands

2023-12-12 Thread Rui Barradas
Às 00:36 de 13/12/2023, Robert Baer escreveu: coord_cartesian also seems to work for y, and including the breaks = . How about: df=data.frame(year= c(2012,2015,2018,2022),   score=c(495,493, 495, 474)) ggplot(df, aes(x = year, y = score)) +   geom_point() +   geom_smooth(method

Re: [R] Advice on starting to analyze smokestack emissions?

2023-12-12 Thread Bert Gunter
My point was only that there might be functionality there that might be relevant to his concerns. .. with help on how to use it. Bert On Tue, Dec 12, 2023, 19:37 Ebert,Timothy Aaron wrote: > That depends on how exactly everything must match your primary question. > The ecology group might be

Re: [R] Advice on starting to analyze smokestack emissions?

2023-12-12 Thread Richard O'Keefe
This https://ncceh.ca/resources/evidence-reviews/crematoria-emissions-and-air-quality-impacts might provide some useful information. On Wed, 13 Dec 2023 at 04:53, Bert Gunter wrote: > > You might also try the R-Sig-ecology list, though I would agree that it's > not clearly related. Still, air

Re: [R] Advice on starting to analyze smokestack emissions?

2023-12-12 Thread Ebert,Timothy Aaron
That depends on how exactly everything must match your primary question. The ecology group might be helpful for how biodiversity changes with proximity to a smokestack. They might have a better idea if the smokestack was from a coal fired powerplant or oil refinery. The modeling process would

Re: [R] ggplot2: Get the regression line with 95% confidence bands

2023-12-12 Thread Ebert,Timothy Aaron
Change year to a factor. Doing it in ggplot will not change the original data. ggplot(df, aes(x = as.factor(year), y = score)) + geom_point() + geom_smooth(method = "lm", formula = y ~ x) + labs(title = "Standard linear regression for France", x = "Year", y = "PISA score in mathematics") +

Re: [R] ggplot2: Get the regression line with 95% confidence bands

2023-12-12 Thread Robert Baer
coord_cartesian also seems to work for y, and including the breaks = .  How about: df=data.frame(year= c(2012,2015,2018,2022),   score=c(495,493, 495, 474)) ggplot(df, aes(x = year, y = score)) +   geom_point() +   geom_smooth(method = "lm", formula = y ~ x) +   labs(title =

Re: [R] ggplot2: Get the regression line with 95% confidence bands

2023-12-12 Thread Ben Bolker
Use scale_x_continuous() and specify your desired breaks On Tue, Dec 12, 2023, 4:19 PM varin sacha wrote: > Dear Ben, > Dear Daniel, > Dear Rui, > Dear Bert, > > Here below my R code. > I really appreciate all your comments. My R code is perfectly working but > there is still something I would

Re: [R] ggplot2: Get the regression line with 95% confidence bands

2023-12-12 Thread varin sacha via R-help
Dear Ben, Dear Daniel, Dear Rui, Dear Bert, Here below my R code. I really appreciate all your comments. My R code is perfectly working but there is still something I would like to improve. The X-axis is showing   2012.5 ;   2015.0   ;   2017.5   ;  2020.0 I would like to see on X-axis only the

Re: [R] Advice on starting to analyze smokestack emissions?

2023-12-12 Thread Bert Gunter
You might also try the R-Sig-ecology list, though I would agree that it's not clearly related. Still, air pollution effects...? -- Bert On Tue, Dec 12, 2023 at 3:15 AM Kevin Zembower via R-help < r-help@r-project.org> wrote: > Hello, all, > > [Originally sent to r-sig-geo list, with no

[R] Advice on starting to analyze smokestack emissions?

2023-12-12 Thread Kevin Zembower via R-help
Hello, all, [Originally sent to r-sig-geo list, with no response. Cross-posting here, in the hope of a wider audience. Anyone with any experience in this topic? Thanks.] I'm trying to get started analyzing the concentrations of smokestack emissions. I don't have any professional background or