Skip to content
Prev 333117 / 398506 Next

On "^" returning a matrix when operated on a data.frame

On 13-11-13 6:00 PM, Arunkumar Srinivasan wrote:
It's not just ^ that is missing, the logical relations like <, ==, etc 
also return matrices.  This is very old code (I think from 1999), but I 
would guess that the reason is that the ^ and < operators always return 
values of a single type (numeric and logical respectively), whereas the 
other operators can take mixed type inputs and return mixed type outputs.

Duncan Murdoch