--- RSiteSearch.R 2009-04-18 03:28:06.000000000 -0400 +++ /home/liawand/RSiteSearch.R 2009-05-07 09:53:59.000000000 -0400 @@ -14,8 +14,7 @@ # A copy of the GNU General Public License is available at # http://www.r-project.org/Licenses/ -RSiteSearch <- function(string, restrict = c("Rhelp02a", "functions", "docs"), - format = c("normal", "short"), +RSiteSearch <- function(string, formatt = c("normal", "short"), sortby = c("score", "date:late", "date:early", "subject", "subject:descending", "from", "from:descending", "size", "size:descending"), @@ -27,10 +26,6 @@ mpp <- paste0("max=", matchesPerPage) format <- paste0("result=", match.arg(format)) - restrictVALS <- c("Rhelp02a", "Rhelp01", "functions", "docs", "R-devel") - restr <- match.arg(restrict, choices = restrictVALS, several.ok = TRUE) - restr <- paste(paste0("idxname=", restr), collapse = "&") - sortby <- match.arg(sortby) sortby <- paste0("sort=", switch(sortby, @@ -45,7 +40,7 @@ ## we know this is a http:// URL, so encoding should be safe. ## it seems that firefox on Mac OS needs it for {...} ## OTOH, Namazu does not decode in, say, sort=date:late. - qstring <- paste(URLencode(string), mpp, format, sortby, restr, sep = "&") + qstring <- paste(URLencode(string), mpp, format, sortby, sep = "&") browseURL(qstring) cat(gettext("A search query has been submitted to"), "http://search.r-project.org\n")