0

I am a student and I am doing an internship I am working on the development of small poplars and we are recording several traits such as the number of days it takes to see the first roots on cuttings (r_days)

We have recorded this: data table

try rapidly that

read.table(file = "~/1 ADMINISTRATIFS/1 Stages/Stage master 2/TESTS screening NUE/Screaning NUE Follow-up.txt", header = TRUE, sep = "\t", dec = "," ) %>% as_tibble() -> all_table 

all_table [c(1:23), c(1,2,10)] -> T89 

tapply(T89$r_days,T89$media, cumsum) -> T89_cum 

as.data.frame(T89_cum)->T89_cum_tab 

T89_cum_tab %>% 
ggplot()+ geom_line(aes(x= "media", T89_cum, color = "grey"))
> dput(head(T89)) structure(list(name = c("T89.1-1", "T89.1-2", "T89.1-3", "T89.1-4", "T89.2-1", "T89.2-2"), media = c("1/2MS_0N_V", "MS_0N_V", "1/2MS_N_V", "MS_N_V", "1/2MS_0N_V", "MS_0N_V"), r_days = c(18L, 18L, 20L, NA, 11L, 32L)), row.names = c(NA, 6L), class = c("tbl_df", "tbl", "data.frame"))

I block on how to cumulate individuals when we have 2 that produce roots after 18 days for example

I would like to make a graph that on the ordinate is the number of individuals and on the abscissa is the number of days it takes to get the roots. In addition to that, we work on 4 different soils (media) and therefore have on the same graph all of them.

It may be a simple question but I’m stuck on one point, tell me how I could do

  • 2
    What have you tried? Also, share a sample of your data with `dput`. – Vinícius Félix Jan 17 '23 at 19:43
  • 2
    Welcome to SO, Camille_brnd! (1) Please do not post (only) an image of code/data/errors: it breaks screen-readers and it cannot be copied or searched (ref: https://meta.stackoverflow.com/a/285557 and https://xkcd.com/2116/). Please include the code, console output, or data (e.g., `data.frame(...)` or the output from `dput(head(x))`) directly. (2) It helps when a question is fully reproducible, starting with usable sample data, usually extended with expected output and the code that you've tried so far. See https://stackoverflow.com/q/5963269, [mcve], and https://stackoverflow.com/tags/r/info. – r2evans Jan 17 '23 at 19:47
  • 1
    Hi @Camille_brnd, when you load the data you posted here (btw, please use EDIT under your question and put it there, not in *comments*), can you reproduce the problem? If not, please put as much information in that enables recreating the problem. – Andre Wildberg Jan 17 '23 at 21:47
  • I m sorry for these mistake, I changed it For the problem, yes I can reproduce it – Camille_brnd Jan 18 '23 at 07:19

0 Answers0