Bug 14280 - package.skeleton fails on S4 class in 2.11
package.skeleton fails on S4 class in 2.11
Status: RESOLVED FIXED
Product: R
Classification: Unclassified
Component: Documentation
R 2.11.0
ix86 (32-bit) Linux-Ubuntu
: P5 minor
Assigned To: R-core
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-03 17:17 UTC by Toby Dylan Hocking
Modified: 2010-05-04 16:57 UTC (History)
1 user (show)

See Also:


Attachments
s4 class that caused package.skeleton to crash (243 bytes, text/plain)
2010-05-03 17:17 UTC, Toby Dylan Hocking
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toby Dylan Hocking 2010-05-03 17:17:14 UTC
Created attachment 1102 [details]
s4 class that caused package.skeleton to crash

Hi, I think I have discovered a new bug in the package.skeleton
function introduced in R-2.11. It gives me an error when I try to
process R code with an S4 class defined using setClass. I ran the
example on R-2.11, it didn't work, then I rebuilt R-2.10.1 and it did
work. Follows is the output, pasted from my terminal:

~/R/inlinedocs/pkg/inlinedocs/R$ R --vanilla

R version 2.11.0 (2010-04-22)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

 Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

>package.skeleton("foobar",code_files="minimal.r")
Creating directories ...
Creating DESCRIPTION ...
Creating Read-and-delete-me ...
Copying code files ...
Making help files ...
Error in allgen[ok] : invalid subscript type 'list'
Error in package.skeleton("foobar", code_files = "minimal.r") : 
 Error in allgen[ok] : invalid subscript type 'list'
>version
              _                            
platform       i686-pc-linux-gnu            
arch           i686                         
os             linux-gnu                    
system         i686, linux-gnu              
status                                      
major          2                            
minor          11.0                         
year           2010                         
month          04                           
day            22                           
svn rev        51801                        
language       R                            
version.string R version 2.11.0 (2010-04-22)
>sessionInfo()
R version 2.11.0 (2010-04-22) 
i686-pc-linux-gnu 

locale:
[1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
[3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
[5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8   
[7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
[9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] tools_2.11.0


~/R/inlinedocs/pkg/inlinedocs/R$ R --vanilla

R version 2.10.1 (2009-12-14)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

 Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

>package.skeleton("foobar2",code_files="minimal.r")
Creating directories ...
Creating DESCRIPTION ...
Creating Read-and-delete-me ...
Copying code files ...
Making help files ...
Done.
Further steps are described in './foobar2/Read-and-delete-me'.
>version
              _                            
platform       i686-pc-linux-gnu            
arch           i686                         
os             linux-gnu                    
system         i686, linux-gnu              
status                                      
major          2                            
minor          10.1                         
year           2009                         
month          12                           
day            14                           
svn rev        50720                        
language       R                            
version.string R version 2.10.1 (2009-12-14)
>SessionInfo()
Error: could not find function "SessionInfo"
>sessionInfo()
R version 2.10.1 (2009-12-14) 
i686-pc-linux-gnu 

locale:
[1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
[3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
[5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8   
[7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
[9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] tools_2.10.1
setClass("DocLink",
        representation(name="character",
                       created="character",
                       parent="character",
                       code="character",
                       description="character"))
Comment 1 Martin Maechler 2010-05-04 16:57:17 UTC
Bug was actually in  methods::promptClass();
fixed in rev 51906 (for R-devel; then also for R 2.11.0 patched)