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

2023-12-10 Thread Bert Gunter
This can easily be done using predict.lm to get the intervals (confidence or prediction). ?predict.lm contains a plotting example using ?matplot from the graphics package. Here's a somewhat verbose version for your example (first converting Year to numeric, of course): df=data.frame(year=

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

2023-12-10 Thread Rui Barradas
Às 22:35 de 10/12/2023, varin sacha via R-help escreveu: Dear R-experts, Here below my R code, as my X-axis is "year", I must be missing one or more steps! I am trying to get the regression line with the 95% confidence bands around the regression line. Any help would be appreciated. Best,

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

2023-12-10 Thread varin sacha via R-help
Dear R-experts, Here below my R code, as my X-axis is "year", I must be missing one or more steps! I am trying to get the regression line with the 95% confidence bands around the regression line. Any help would be appreciated. Best, S. #

Re: [R] reshape() not dropping varaibles

2023-12-10 Thread Jeff Newmiller via R-help
It would be nice to see what OP wanted to end up with, but the link contained input data to experiment with. The first problem is that if you are not interested in working with the whole set of columns then you need to only give a data frame with the columns you want to work with: dta.wide <-

Re: [R] reshape() not dropping varaibles

2023-12-10 Thread Bert Gunter
Posting a few rows, say 5, of your data using dput() along with the result that you would like to get for those rows would help get you a quicker and more accurate response, I believe. This is as suggested by the posting guide, linked below, which you should read if you have not already. -- Bert

[R] reshape() not dropping varaibles

2023-12-10 Thread Bob O'Hara
Hi all! I1m trying to re-format some data from long to wide format with reshape(). Specifically, the data has SURVEYDATE, which I want to be in the rows, and COMMON_NAME which should be the columns. The entries should be TOTAL_CATCH. The data has a bunch of other variables, which can be ignored.

Re: [R] Fit NLE - was: computer algebra in R

2023-12-10 Thread Ivan Krylov
В Fri, 8 Dec 2023 08:21:16 +0100 Konrad via R-help пишет: > My problem is how to replicate the Eliminate function in R. While R does invite the user to "compute on the language", i.e. take R expressions and function calls and work with them as with ordinary variables [*], so far nobody wrote a