Re: [Rd] sequence divided by data.frame

2015-08-21 Thread Michael Lawrence
The first two behave as expected for vectors, because they are both (at least implicitly) vectors in that usage. But a data.frame is a tabular structure, so it's not obvious how to recycle it, nor does an implicit coercion to matrix/vector seem justified. Thus, R attempts to recycle the vector to

[Rd] sequence divided by data.frame

2015-08-20 Thread Ott Toomet
Can anyone explain me the following behavior: 1:2/1 [1] 1 2 -- makes sense 1:2/matrix(1,1,1) [1] 1 2 -- makes sense 1:2/data.frame(a=1) a 1 1 -- why is this different? Best, Ott -- Ott Toomet Visiting Researcher School of Information Mary Gates Hall, Suite 095 University of