<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi all,<br>
<br>
I have just stumbled across the same problem, when I roxygenized a
package with the "new" version of roxygen.<br>
I do not know why this problem is there since the last version and I
would prefer it not to be there, but it can be solved trivially by
writing <br>
<br>
contains=c("list")<br>
<br>
instead of<br>
<br>
contains="list"<br>
<br>
One can also use<br>
<br>
contains=list("list")<br>
<br>
(and no, it is not contains=x("x") for superclass "x" ;-)<br>
<br>
Regards<br>
Daniel<br>
<br>
<br>
<br>
<br>
<br>
<blockquote type="cite">
<pre>Hi,
I've run into the same issue, but the example does not solve it, as
the class definition is self referential, which will cause R to throw
an error.
Could you give working examples of the two cases where either the
contains or representation are empty e.g.:
setClass(Class="Object",representation=representation("referenceContainer"="environment"))
[no superclass]
setClass(Class="RDataFileList",contains="list") [only the superclass]
Thanks for any hints,
Bastian
I am using R-2.10.0 with roxygen 0.1-2:
[snip]
Packaged: 2009-11-12 08:32:10 UTC; meugster
Repository: CRAN
Date/Publication: 2009-11-12 11:39:59
Built: R 2.10.0; x86_64-unknown-linux-gnu; 2009-11-13
19:28:50 UTC; unix
On Sun, Aug 23, 2009 at 2:39 AM, Manuel J. A. Eugster
<<a
href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/roxygen-devel">Manuel.Eugster at stat.uni-muenchen.de</a>> wrote:
><i> Hi Mark,
</i>><i>
</i>><i> in case of S4 you have to specify the classes, methods, etc in
</i>><i> "full style", e.g.,
</i>><i>
</i>><i> setClass("BClass",
</i>><i> contains=c("BClass"),
</i>><i> representation=representation(
</i>><i> s1="character",
</i>><i> s2="numeric"))
</i>><i>
</i>><i> That's because the Roxygen parser is very rudimentary in case of
</i>><i> S4.
</i>><i>
</i>><i>
</i>><i> Best,
</i>><i>
</i>><i> Manuel.
</i>><i>
</i>><i>
</i>><i>
</i>><i> Mark Herzog wrote:
</i>>><i> Hello –
</i>>><i>
</i>>><i>
</i>>><i>
</i>>><i> I am working with the devel source code (S4 support) and receiving the
</i>>><i> following error (includes roxygen call, in case that helps):
</i>>><i>
</i>>><i>
</i>>><i>
</i>>>><i> roxygenize(package.dir=paste(work.dir,"/release/",sep=""),
</i>>><i>
</i>>><i> + roxygen.dir=paste(work.dir,"/release/pkg.roxygen",sep=""),
</i>>><i>
</i>>><i> + copy.package=FALSE,
</i>>><i>
</i>>><i> + unlink.target=FALSE,
</i>>><i>
</i>>><i> + use.Rd2=TRUE
</i>>><i>
</i>>><i> + )
</i>>><i>
</i>>><i> Error in cdr(preorder.flatten.expression(expression)) :
</i>>><i>
</i>>><i> CDRing a null list
</i>>><i>
</i>>><i>
</i>>><i>
</i>>><i> After doing some investigation, I believe it is related to subclassing,
</i>>><i> (e.g. using ‘contains’ argument within a setClass statement).
</i>>><i>
</i>>><i> Is this something that is not supported yet within roxygen, or am I
</i>>><i> doing something incorrectly? Is there a workaround?
</i>>><i>
</i>>><i> I tried adding #’ @nord to the line before the setClass statement, but
</i>>><i> that didn’t seem to help.
</i>>><i>
</i>>><i>
</i>>><i>
</i>>>><i> Sys.info()
</i>>><i>
</i>>><i> sysname release
</i>>><i>
</i>>><i> "Windows" "XP"
</i>>><i>
</i>>><i> version
</i>>><i>
</i>>><i> "build 2600, Service Pack 3"
</i>>><i>
</i>>><i> machine
</i>>><i>
</i>>><i> "x86"
</i>>><i>
</i>>>><i>
</i>>><i>
</i>>><i>
</i>>><i>
</i>>><i> Thanks for any insight,
</i>>><i>
</i>>><i> Mark
</i>>><i>
</i>>><i>
</i>>><i>
</i>>><i> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
</i>>><i> Mark Herzog, Ph.D.
</i>>><i> Informatics Division Director
</i>>><i>
</i>>><i> Quantitative and Computational Sciences
</i>>><i> PRBO Conservation Science
</i>>><i> 3820 Cypress Drive #11
</i>>><i> Petaluma, CA 94954
</i>>><i> 707-781-2555 x308 (office)
</i>>><i> 707-765-1685 (fax)
</i>>><i>
</i>>><i> 707-992-5726 (google voice)
</i>>><i>
</i>>><i> mpherzog (skype)
</i>>><i>
</i>>><i>
</i>>><i>
</i>>><i>
</i>>><i>
</i>>><i>
</i>>><i>
</i>>><i> ------------------------------------------------------------------------
</i>>><i>
</i>>><i> _______________________________________________
</i>>><i> Roxygen-devel mailing list
</i>>><i> <a
href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/roxygen-devel">Roxygen-devel at lists.r-forge.r-project.org</a>
</i>>><i> <a
href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/roxygen-devel">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/roxygen-devel</a>
</i>><i> _______________________________________________
</i>><i> Roxygen-devel mailing list
</i>><i> <a
href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/roxygen-devel">Roxygen-devel at lists.r-forge.r-project.org</a>
</i>><i> <a
href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/roxygen-devel">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/roxygen-devel</a>
</i></pre>
</blockquote>
<br>
</body>
</html>