[Seqinr-commits] r2102 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Jul 4 16:25:14 CEST 2020
Author: simonpenel
Date: 2020-07-04 16:25:14 +0200 (Sat, 04 Jul 2020)
New Revision: 2102
Modified:
pkg/R/extract.breakpoints.R
Log:
Function extract.breakpoints is modified again as suggested by Sofia Rigou
Modified: pkg/R/extract.breakpoints.R
===================================================================
--- pkg/R/extract.breakpoints.R 2020-07-03 13:41:50 UTC (rev 2101)
+++ pkg/R/extract.breakpoints.R 2020-07-04 14:25:14 UTC (rev 2102)
@@ -46,8 +46,8 @@
rm(seg)
}
- try(seg <- segmented::segmented(lm(y.breaks~x.breaks),x.breaks,psi=initpsi,it.max=it.max), silent = TRUE)
-
+ #try(seg <- segmented::segmented(lm(y.breaks~x.breaks),x.breaks,psi=initpsi,it.max=it.max), silent = TRUE)
+ try(seg <- segmented::segmented(lm(y.breaks~ x.breaks),~x.breaks, psi = initpsi, it.max = it.max), silent = TRUE)
if(exists("seg")){
starts[[length(starts)+1]]=initpsi
@@ -63,8 +63,8 @@
starts=starts[[wmin]]
- seg=seg <- segmented::segmented(lm(y.breaks~x.breaks),x.breaks,psi=starts,it.max=it.max)
-
+ #seg=seg <- segmented::segmented(lm(y.breaks~x.breaks),x.breaks,psi=starts,it.max=it.max)
+ seg = seg <- segmented::segmented(lm(y.breaks~ x.breaks),~x.breaks, psi = starts, it.max = it.max)
breaks=round(seg$psi[,2])
breaks=breaks[order(breaks)]
More information about the Seqinr-commits
mailing list