From h.wickham at gmail.com  Mon May  4 20:16:23 2015
From: h.wickham at gmail.com (Hadley Wickham)
Date: Mon, 4 May 2015 13:16:23 -0500
Subject: [Rd] Define replacement functions
In-Reply-To: <77F37290-0264-45DC-9604-7D0CD327C132@posteo.ch>
References: <925F72C7-1611-4AE5-911B-D4DA89D180B9@posteo.ch>
	<CABdHhvHPs07Khh1PATxg_NgxcB0byox-vm5rxq=s-gr1GxhUnA@mail.gmail.com>
	<77F37290-0264-45DC-9604-7D0CD327C132@posteo.ch>
Message-ID: <CABdHhvEiksqat8m6RMhL-zWCXBZ375HDg7t2frQU=oS6n_CgtQ@mail.gmail.com>

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/



[Rd] Define replacement functions
Hadley Wickham