Re: [R] conditional filling of data.frame - improve code

2022-03-10 Thread Ebert,Timothy Aaron
You could try some of the "join" commands from dplyr. https://dplyr.tidyverse.org/reference/mutate-joins.html https://statisticsglobe.com/r-dplyr-join-inner-left-right-full-semi-anti Regards, Tim -Original Message- From: R-help On Behalf Of Jeff Newmiller Sent: Thursday, March 10, 2022

Re: [R] conditional filling of data.frame - improve code

2022-03-10 Thread Jeff Newmiller
Use merge. expts <- read.csv( text = "expt,sample ex1,sample1-1 ex1,sample1-2 ex2,sample2-1 ex2,sample2-2 ex2,sample2-3 ", header=TRUE, as.is=TRUE ) mydata <- data.frame(sample = c("sample2-2", "sample2-3", "sample1-1", "sample1-1", "sample1-1", "sample2-1")) merge( mydata, expts, by="sample",

Re: [R] NA's in segmented

2022-03-10 Thread PIKAL Petr
Hi 1. Do not use HTML formated mail, your message is scrambled 2. With your code only you can get result all of us get error > Mod = lm(as.numeric(data[,"meanMSD25"])~(as.numeric(data[,"Slice"])), > weights=1*sqrt(as.numeric(data[,"Detec"]))) Error in data[, "meanMSD25"] : object of type

Re: [R] NA's in segmented

2022-03-10 Thread Ivan Krylov
Hi Mélina, If you don't get an answer here, consider running maintainer(segmented) and contacting the e-mail address shown by the command. On Tue, 8 Mar 2022 20:44:35 + Mélina Cointe wrote: > I have some trouble with the slope() function of segmented. When I > plot the predicted value