In "R version 2.10.0 Patched (2009-11-15 r50445)" on Windows Vista
upon issuing help.start() and clicking on Packages I get this.
Packages in C:\Users\Gabor\Documents\R\win-library\2.10
C:\Users\Gabor\Documents/R/win-library/2.10/AER/DESCRIPTION -- Title
is missing --
C:\Users\Gabor\Documents/R/win-library/2.10/akima/DESCRIPTION -- Title
is missing --
C:\Users\Gabor\Documents/R/win-library/2.10/car/DESCRIPTION -- Title
is missing --
C:\Users\Gabor\Documents/R/win-library/2.10/caroline/DESCRIPTION --
Title is missing --
...
Looking at make.packages.html in utils, this code:
    for (lib in lib.loc) {
        pg <- Sys.glob(file.path(lib, "*",
"DESCRIPTION"))
        pkgs[[lib]] <- sort(sub(paste(lib, "([^/]*)",
"DESCRIPTION$",
            sep = "/"), "\\1", pg))
    }
has the problem that lib can contain regular expression characters but
is used in the pattern of sub.  This could be changed to the following
which does not use lib in any pattern. Only the pkgs[[lib]]<-
statement is changed relative to the original:
    for (lib in lib.loc) {
        pg <- Sys.glob(file.path(lib, "*",
"DESCRIPTION"))
        pkgs[[lib]] <- sort(sub(".*[\\/]", "",
sub(".DESCRIPTION$", "", pg)))
    }
On 17/11/2009 5:33 AM, Gabor Grothendieck wrote:> In "R version 2.10.0 Patched (2009-11-15 r50445)" on Windows Vista > upon issuing help.start() and clicking on Packages I get this. > > Packages in C:\Users\Gabor\Documents\R\win-library\2.10 > > C:\Users\Gabor\Documents/R/win-library/2.10/AER/DESCRIPTION -- Title > is missing -- > C:\Users\Gabor\Documents/R/win-library/2.10/akima/DESCRIPTION -- Title > is missing -- > C:\Users\Gabor\Documents/R/win-library/2.10/car/DESCRIPTION -- Title > is missing -- > C:\Users\Gabor\Documents/R/win-library/2.10/caroline/DESCRIPTION -- > Title is missing -- > ... > > Looking at make.packages.html in utils, this code: > > for (lib in lib.loc) { > pg <- Sys.glob(file.path(lib, "*", "DESCRIPTION")) > pkgs[[lib]] <- sort(sub(paste(lib, "([^/]*)", "DESCRIPTION$", > sep = "/"), "\\1", pg)) > } > > has the problem that lib can contain regular expression characters but > is used in the pattern of sub. This could be changed to the following > which does not use lib in any pattern. Only the pkgs[[lib]]<- > statement is changed relative to the original: > > for (lib in lib.loc) { > pg <- Sys.glob(file.path(lib, "*", "DESCRIPTION")) > pkgs[[lib]] <- sort(sub(".*[\\/]", "", sub(".DESCRIPTION$", "", pg))) > }Thanks, I'll take a look. Duncan Murdoch
On 17/11/2009 5:33 AM, Gabor Grothendieck wrote:> In "R version 2.10.0 Patched (2009-11-15 r50445)" on Windows Vista > upon issuing help.start() and clicking on Packages I get this. > > Packages in C:\Users\Gabor\Documents\R\win-library\2.10 > > C:\Users\Gabor\Documents/R/win-library/2.10/AER/DESCRIPTION -- Title > is missing -- > C:\Users\Gabor\Documents/R/win-library/2.10/akima/DESCRIPTION -- Title > is missing -- > C:\Users\Gabor\Documents/R/win-library/2.10/car/DESCRIPTION -- Title > is missing -- > C:\Users\Gabor\Documents/R/win-library/2.10/caroline/DESCRIPTION -- > Title is missing -- > ... > > Looking at make.packages.html in utils, this code: > > for (lib in lib.loc) { > pg <- Sys.glob(file.path(lib, "*", "DESCRIPTION")) > pkgs[[lib]] <- sort(sub(paste(lib, "([^/]*)", "DESCRIPTION$", > sep = "/"), "\\1", pg)) > } > > has the problem that lib can contain regular expression characters but > is used in the pattern of sub. This could be changed to the following > which does not use lib in any pattern. Only the pkgs[[lib]]<- > statement is changed relative to the original: > > for (lib in lib.loc) { > pg <- Sys.glob(file.path(lib, "*", "DESCRIPTION")) > pkgs[[lib]] <- sort(sub(".*[\\/]", "", sub(".DESCRIPTION$", "", pg))) > }I've committed your patch to R-devel and R-patched now. Thanks! Duncan Murdoch