bug in clear_topic_index?

19 views
Skip to first unread message

Gregory Jefferis

unread,
Sep 21, 2012, 6:18:05 PM9/21/12
to rdev...@googlegroups.com
I am having an intermittent bug building package documentation. This is the kind of output I get:

> document("/GD/dev/R/gphys")
Updating gphys documentation
Loading gphys
Writing spiketimes.Rd
Writing split.spiketimes.Rd
Writing plus-spiketimes.Rd
Writing merge.spiketimes.Rd
Writing subset.spiketimes.Rd
Writing is.spiketimes.Rd
Writing as.spiketimes.Rd
Error in rm(pkg$package, envir = topic_indices) :
... must contain names or character strings

I haven't quite isolated the conditions that trigger the problem, but I think that there may be a bug in clear_topic_index

clear_topic_index <- function(pkg = ".") {
pkg <- as.package(pkg)
if (exists(pkg$package, topic_indices)) {
- rm(pkg$package, envir = topic_indices)
+ rm(list=pkg$package, envir = topic_indices)
}

Does this sound reasonable? I see that help('rm') contains the note:

> Earlier versions of R incorrectly claimed that supplying a character vector in ... removed the objects named in the character vector, but it removed the character vector. Use the list argument to specify objects via a character vector.


Many thanks for continued work on this tremendously useful package.

Best wishes,

Greg.

> R.version
_
platform i386-apple-darwin9.8.0
arch i386
os darwin9.8.0
system i386, darwin9.8.0
status
major 2
minor 15.1
year 2012
month 06
day 22
svn rev 59600
language R
version.string R version 2.15.1 (2012-06-22)
nickname Roasted Marshmallows

stock devtools 0.8

--
Gregory Jefferis, PhD
Division of Neurobiology
MRC Laboratory of Molecular Biology,
Hills Road,
Cambridge, CB2 0QH, UK.

http://www2.mrc-lmb.cam.ac.uk/group-leaders/h-to-m/g-jefferis
http://www.neuroscience.cam.ac.uk/directory/profile.php?gsxej2
http://flybrain.stanford.edu

Winston Chang

unread,
Oct 1, 2012, 7:04:31 PM10/1/12
to Gregory Jefferis, rdev...@googlegroups.com
Hi Greg -

Does your patch fix the problem for you? If so, I can merge into devtools.

-Winston

Gregory Jefferis

unread,
Oct 1, 2012, 9:49:53 PM10/1/12
to Winston Chang, rdev...@googlegroups.com
U


On 2 Oct 2012, at 00:04, Winston Chang <winsto...@gmail.com> wrote:

> Does your patch fix the problem for you? If so, I can merge into

Yes, thanks. Greg.

Winston Chang

unread,
Oct 1, 2012, 10:34:25 PM10/1/12
to Gregory Jefferis, rdev...@googlegroups.com
I committed the fix.

Thanks,
-Winston
Reply all
Reply to author
Forward
0 new messages