Hello, I'm new up there ! I'm not very good in Rstudio so please be patient lol (and i'm french so non native english speaker)

I'm in master's degree internship and I have collected data of bacteria concentration (cell/ml) above time (in days of experiment). So My supervisor wants me to plot the abundance above time and to add exponential trendline (with equation of the trendline and Rsquare). As simple as it is on Excel, i would like to do it on R, but I NEVER SUCCEDED and I went on so many website. I don't understand why this seems so complicated. I really need help because my internship end soon, so please if someone succeed to help me, I would appreciate.
Someone on stack overflow told me to just copy the curve given by excel, but I'm sure there is a way to calculate it with Rstudio.

Also on Excel, you can choose to trace the tendance curve on just some point of the data but still plot all the point (idk if this is clear but), for example let's imagine I know from what I see when I plot my data, that there is an exponential growth from the day 1 to day 6, and after it "calm down" and decrease. So I just want the exponential trendline to be calculated from the day 1 to 6. is it possible on R ??

Please, I beg someone to help me ..

here are an example of my data
C2A <- data.frame(cell = c(7.0710000,
5.2810000,
5.4210000,
5.5810000,
1.26100000,
1.121000000,
1.551000000,
2.501000000,
3.34*1000000),
day = c(0,3,4,5,7,11,12,13,14))

Hello and thanks,
is "| >" a language from tidyverse package , because with this symbol >, the console say this :
Error: unexpected '>' in "C2AShort <- C2A |>"

I tried to install of course tidyverse.... but it struggle a lot. Btw this is another problem but I have problem installing some packages sometimes. Stuff about binary version, and it looked trought many internet link to download the package.

This is the R pipe, introduce in Version 4.1.0 in May 2021
To use it you would need to upgrade R itself.
if you have magrittr/dplyr/tidyverse packages you could use that instead,
load them and use %>% which is the version they provided before R itself gave us |>

for problems with installation, its somewhat platform dependant. What Operating System do you use ?

The exponential growth function is y = Ae^bx, where A is the y-intercept and b is the growth rate. The formula y ~ exp(x) would estimate y = a + be^x instead

The exponential function can be estimated by taking the log of both sides, resulting in log(y) = a + bx where a = log(A), hence the formula log(y) ~ x

Hi to you all, okay I've found a solution
I'm using ggtrendline package which gave me good results . I wrote the script but I don't know I did it well, don't understand how we are supposed to add code line.

So this method looks great !

BUT NOW, sorry to bother you all, but I would like to merge 3 graphs like this in one (I have 3 plot from my 3 replicate) and I would like to plot them in one. It seems like this package ggtrendline does not allow this.

I've tried 2 solutions :

to run the same code for my 3 replicate, and to put the three graphs in ONE PAGE and I didn't succeed

or to use the package on my dataframe regrouping the three replicate.