[R] Overload standart function
Duncan Murdoch
murdoch at math.aau.dk
Fri Apr 15 13:22:04 CEST 2005
Václav Kratochvíl wrote:
> Hi all,
>
> I try to develop my own R package. I have a couple of standart functions like dim() and length() overloaded.
>
> #Example
> dim.Model <- function(this) {
> length(unique(this$.variables));
> }
>
> I built my package, but when I try to load it... This message appears:
> Attaching package 'mudim':
> The following object(s) are masked _by_ .GlobalEnv :
> dim.Model,...(etc.)
>
> Any idea, how to hide this message?
You don't want to hide this message. It is telling you that you have a
variable in your user workspace that is hiding the one in your package.
You probably want to delete the one in your workspace.
By the way, questions about package writing really belong more on the
R-devel list.
Duncan Murdoch
More information about the R-help
mailing list