From vograno at evafunds.com  Sat May  7 17:30:49 2005
From: vograno at evafunds.com (Vadim Ogranovich)
Date: Sat May  7 17:30:58 2005
Subject: [Rd] how to add method to .Primitive function
Message-ID: <C698D707214E6F4AB39AB7096C3DE5A59E9333@phost015.EVAFUNDS.intermedia.net>

Hi,
 
I tried to write the dim method for the list class, but R doesn't seem
to dispatch to it:
> dim.list = function(x) c(length(x[[1]]), length(x))
> dim(list(1))
NULL
> dim.list(list(1))
[1] 1 1

What is the correct way of registering dim.list with .Primitive("dim")?
 
Thanks,
Vadim
 
 

	[[alternative HTML version deleted]]


[Rd] how to add method to .Primitive function
Vadim Ogranovich