R/convertBack.R

Defines functions convertBack

Documented in convertBack

convertBack <-
function(tree,otree,regshifts){
	regs<-repaint(otree,regshifts)
	otree2<-data.frame(as(otree,"data.frame"),regimes=regs,shifts=rep(NA,length(otree@nodes)))
	otree2$shifts[match(names(regshifts),otree2$nodes)]<-1:length(regshifts)
	otree2
}

Try the surface package in your browser

Any scripts or data that you put into this service are public.

surface documentation built on Dec. 18, 2020, 5:08 p.m.