[Rd] Define replacement functions

Hadley Wickham h.wickham at gmail.com
Mon May 4 20:16:23 CEST 2015


On Mon, May 4, 2015 at 12:06 PM,  <soeren.vogel at posteo.ch> wrote:
> No. I fixed that, the NAMESPACE file now contains:
>
> S3method("[[<-", mylist)
> S3method("$<-", mylist)
>
> It still does not work. I also created a print method (print.mylist) which did work out of the box, regardless of being in the NAMESPACE file or not. Could it be somehow in here (also in my NAMESPACE file):
>
> exportPattern("^[[:alpha:]]+")
>
> Or could it be that the type of quoting causes the problems? Like in the NAMESPACE I used double quotes for function definition. Do I need single quotes or back-ticks?
>
> Or is there a package where I can look how others implemented this kind of functionality?

Over 1,500 packages: https://github.com/search?q=user%3Acran+S3method&type=Code

Hadley

-- 
http://had.co.nz/



More information about the R-devel mailing list