beta/which.formula.R

which.formula <- 

function(f1,f2){

terms1 <- terms(f1)
terms2 <- terms(f2)

#INDEX OF WHICH TERMS OF F1 ARE SHARED BY F2

which(attr(terms1,"term.labels")%in%attr(terms2,"term.labels"))

}

Try the ipdmeta package in your browser

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

ipdmeta documentation built on May 2, 2019, 3:29 p.m.