ekstroem / MethComp

R package for Methods Comparisons
1 stars 1 forks source link

Fixing a bug in Meth() #2

Open JohannesNE opened 3 years ago

JohannesNE commented 3 years ago

I tried to run MethComp::Meth(data, y=c('co_ref', 'co_exp'), item = 'id')

This gave an error, because of line#123 make.repl( data.frame(meth=rep(1,Nr),item=item) )

The function expects a data.frame with a column named "item", however, when data.frame(...) is passed a data.frame (here data[,item]) it will use the names in this data.frame instead.

These changes fixed the issue and it works with MethComp::Meth(data, y=c('co_ref', 'co_exp'), item = 'id', repl = 'time'). I have not tested it with other combinations of parameters.