Bug 15241 - hlep.request fails with error "Invalid version specification"
hlep.request fails with error "Invalid version specification"
Status: CLOSED FIXED
Product: R
Classification: Unclassified
Component: Misc
R 2.15.2
ix86 (32-bit) Windows 32-bit
: P5 trivial
Assigned To: R-core
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-22 03:48 UTC by Dale
Modified: 2013-05-12 01:11 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dale 2013-03-22 03:48:05 UTC
help.request fails after "You have packages ... ... ... the package maintainer?" with error message "Error: invalid version specification ‘manuals’"

<< Sample session starts >>
>
>
> help.request()
Checklist:
Have you read the posting guide? (y/n) y
Have you checked the FAQ? (y/n) y
Have you checked An Introduction to R? (y/n) y
Have you checked the NEWS of the latest development release? (y/n) y
Have you looked on RSiteSearch? (y/n) y
You have packages (‘svSocket’, ‘TinnR’, ‘R2HTML’, ‘Hmisc’, ‘survival’) other than the base packages loaded.  If your query relates to one of these, have you checked any corresponding books/manuals and considered contacting the package maintainer? (y/n/NA)y
Error: invalid version specification ‘manuals’
>
>
>
> sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: i386-w64-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252   
[3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C                      
[5] LC_TIME=English_Australia.1252    

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

other attached packages:
[1] svSocket_0.9-53  TinnR_1.0-5      R2HTML_2.2       Hmisc_3.10-1     survival_2.36-14

loaded via a namespace (and not attached):
[1] cluster_1.14.3  fortunes_1.5-0  grid_2.15.2     lattice_0.20-10 svMisc_0.9-65   tools_2.15.2
>
>
<< Sample session ends >>

OS is Win 7 Prof SP1 32 bit.

I know I'm running a version or two behind, but I can't find a mention of this being fixed in news or a bug report - so I've jumped to a conclusion and assumed the issue is (maybe) still there.

The above is what I saw. SPECULATION follows...

The code from line 68(ish), just after if ("otherPkgs" %in% names(inf)) { ... }
 of help.request is:
    man <- url("http://cran.r-project.org/manuals.html")
    ver <- scan(man, what = character(0L), sep = "\n", skip = 13L,
        nlines = 1L, quiet = TRUE)
    ver <- strsplit(ver, " ")[[1L]][3L]
    if (getRversion() < numeric_version(ver)) {
    ....

I think numeric_version(ver) is falling over because there is no numerical data on
http://cran.r-project.org/manuals.html
it mostly appears to be text (html - no version numbers).

<< 2nd sample session >>
>
>
> man <- url("http://cran.r-project.org/manuals.html")
> ver <- scan(man, what = character(0L), sep = "\n", skip = 13L,
+     nlines = 1L, quiet = TRUE)
>
> ver
[1] "The following manuals for R were created on Debian Linux and may"
>
> ver <- strsplit(ver, " ")[[1L]][3L]
> ver
[1] "manuals"
> numeric_version(ver))
Error: invalid version specification ‘manuals’
>
>
> 
> scan(man, what = character(0L), sep = "\n")
Read 94 items
[1] "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">" 
# ... Deleted for brevity
[10] "The following manuals for R were created on Debian Linux and may" [11] "differ from the manuals for Mac or Windows on platform-specific pages,"     
[12] "but most parts will be identical for all platforms. The correct"            
[13] "version of the manuals for each platform are part of the respective R"      
[14] "installations. The manuals change with R, hence we provide versions for "   
[15] "the most recent released R version (R-release), a very current version "    
[16] "for the patched release version (R-patched) and finally a version for "
# ... Deleted for brevity
# `ver` seems to be getting [10] - nothing numeric there or at [13]
>
>
>
<< 2nd sample session ends >>

Maybe the web page has chnaged and help.request() has not been updated...?

I know I'm running a version or two behind, but I can't find a mention of this being fixed in news or a bug report so I've jumped to a conclusion and assumed the issue is (might) still there.

Cheers,
Dale.
Comment 1 Duncan Murdoch 2013-05-12 01:11:28 UTC
Thanks for the report.  This missed 3.0.1, but I'll put it in R-devel and R-patched once 3.0.1 is released.