[Rd] generic '[' for a non-exported class
Hi all, I define a S4 class 'foo'. I define '[' and '[-' for it. I do not want to export foo, so I do not put it in NAMESPACE. I do not want to export '[' and '[-' either (since the user can not use foo, no raison to give him access to '[' for foo). But R CMD check does not agree with me and report an error: Undocumented S4 methods: generic '[' and siglist 'foo' generic '[-' and siglist 'foo' Any solution ? Christophe __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Additions to posting guide
One user said he would have found it useful to have textConnection be described in the posting guide since he was having problems creating a self-contained post. I suggest the following section be added: How to post commented, minimal, self-contained, reproducible code === The footer of every message to r-help reminds the poster that postings should include commented, minimal, self-contained, reproducible code. That means that - responders can copy the code to the clipboard without further modification and paste it into their session to reproduce it. - the data must be included and - the data should be cut down to the smallest amount that will illustrate the problem. To include the data: - use dput(mydata). That will output R source code whose value is the indicated data and you can then write: mydata - where you place the output of dput to the right of the arrow. - use textConnection. An alternative in the case of data frames is to read in a text string like this: Lines - A,B,C 1,2,x 3,4,y DF - read.table(textConnection(Lines), header = TRUE) Using textConnection(Lines) in place of a file name causes the input to be taken from the indicated string and facilitates self-contained posts. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Additions to posting guide
e-letter, who had suggested that something about textConnection be added, also suggested that warning against posting code that first wipes out all variables in the workspace. On Wed, Apr 7, 2010 at 7:31 AM, Gabor Grothendieck ggrothendi...@gmail.com wrote: One user said he would have found it useful to have textConnection be described in the posting guide since he was having problems creating a self-contained post. I suggest the following section be added: How to post commented, minimal, self-contained, reproducible code === The footer of every message to r-help reminds the poster that postings should include commented, minimal, self-contained, reproducible code. That means that - responders can copy the code to the clipboard without further modification and paste it into their session to reproduce it. - the data must be included and - the data should be cut down to the smallest amount that will illustrate the problem. To include the data: - use dput(mydata). That will output R source code whose value is the indicated data and you can then write: mydata - where you place the output of dput to the right of the arrow. - use textConnection. An alternative in the case of data frames is to read in a text string like this: Lines - A,B,C 1,2,x 3,4,y DF - read.table(textConnection(Lines), header = TRUE) Using textConnection(Lines) in place of a file name causes the input to be taken from the indicated string and facilitates self-contained posts. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] generic '[' for a non-exported class
On 4/7/10 1:09 AM, Christophe Genolini wrote: Hi all, I define a S4 class 'foo'. I define '[' and '[-' for it. I do not want to export foo, so I do not put it in NAMESPACE. I do not want to export '[' and '[-' either (since the user can not use foo, no raison to give him access to '[' for foo). But R CMD check does not agree with me and report an error: Undocumented S4 methods: generic '[' and siglist 'foo' generic '[-' and siglist 'foo' Any solution ? You can document these on an internal API Rd page. Create an Rd file like yourPkg-internal-api.Rd and add the appropriate \alias{} lines to it. + seth -- Seth Falcon | @sfalcon | http://userprimary.net/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] generic '[' for a non-exported class
On Wed, Apr 7, 2010 at 6:13 PM, Seth Falcon s...@userprimary.net wrote: On 4/7/10 1:09 AM, Christophe Genolini wrote: Hi all, I define a S4 class 'foo'. I define '[' and '[-' for it. I do not want to export foo, so I do not put it in NAMESPACE. I do not want to export '[' and '[-' either (since the user can not use foo, no raison to give him access to '[' for foo). But R CMD check does not agree with me and report an error: Undocumented S4 methods: generic '[' and siglist 'foo' generic '[-' and siglist 'foo' Any solution ? You can document these on an internal API Rd page. Create an Rd file like yourPkg-internal-api.Rd and add the appropriate \alias{} lines to it. ...with Rd \keyword{internal} on that Rd page (so it does not show up on the Rd help index page). /Henrik + seth -- Seth Falcon | @sfalcon | http://userprimary.net/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel