Michael Lawrence

Results 196 comments of Michael Lawrence

I think it should coerce to an array though, not necessarily a matrix, since the object could have more than two dimensions. The data.frame case could also be removed if...

How about submitting a PR adding an S3 method for `model.frame()` on DataFrame? Note that `model.frame()` can operate on environments, and one can coerce a DataFrame to an environment with...

Yea, that's what I meant by using `as.env()`. So you have a way forward, right?

I'm inclined to declare that this is unsupported. It's true that data.frame supports this by wrapping the vector up into a matrix and essentially converting that to a data.frame. However,...

I see. Passing a formula dispatches to `model.frame.default()`, so we could introduce a `model.frame.formula()` that delegates to an S4 generic, which dispatches to a method that calls `as.env()`. If they...

Seems like a different case to me. The way I think about it (and how it's implemented) is that the RHS is coerced to a DataFrame. A matrix has an...

That's expected given the simple rule of coercing to a DataFrame. It's only surprising because what happens when subassigning a factor into an integer vector is surprising. To stick to...

I guess we can go that way, arguing for consistency with the other coercions. There's nothing wrong with matrix RHS per se; there's just the general issues with character to...

Would this also handle character representation of ranges, like "chr1:1-1000"?

Thanks for discovering and reporting this. Would you please provide a reproducible example?