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
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