Skip to content

Conversation

@JohannesNE
Copy link
Contributor

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.

data[,item] creates a 1 column data.frame. This creates an error in make.repl() since the data.frame passed to this function will have an item with the wrong name. data.frame(item=item) ignores the tag if item is a data.frame.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant