RSiteSearch.function: Fast RSiteSearch

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/RSiteSearch.function.R


Returns a data.frame from RSiteSearch(string, "function") which can be sorted and subsetted by user specifications and viewed in an HTML table.


RSiteSearch.function(string, maxPages = 10, sort.=NULL,
                     quiet = FALSE, ...)



A character string. See RSiteSearch.


The maximum number of pages to download assuming 20 links per page.


a character vector specifying how the data.frame returned should be sorted. Default = c('Count', 'MaxScore', 'TotalScore', 'Package', 'Score', 'Function') to sort descending on numerics and ascending on alphnumerics. Specifying sort. = c('c', 't', 'm') is equivalent to c('Count', 'TotalScore', 'MaxScore', 'Package', 'Score', 'Function').


logical; if TRUE no output is printed to the console. The default FALSE displays a progress report with each page of matches.




RSiteSearch.function searchs the help pages of packages covered by the RSiteSearch archives. To restrict the search to only packages installed locally, use

1. Access the RSitSearch engine with string, restricting to "functions", storing Score, Package, Function, Date, Description, and Link in a data.frame.

2. Compute Count, MaxScore and TotalScore for each Package accessed. Combine them in a matrix PackageSummary.

3. Sort PackageSummary in the order defined by the occurrance of c('Count', 'MaxScore', 'TotalScore', 'Package') in sort..

4. Merge PackageSummary with the data.frame of search hits.

5. Sort the combined data.frame as defined by sort..

6. Make the result have class c("RSiteSearch", "data.frame") and add attributes hits, summary, and call.

7. Done.


an object with class c('RSiteSearch', 'data.frame') with columns and attributes as follows:

  • CountTotal number of hits downloaded in this package

  • MaxScore maximum of the Score over all help pages selected within each Package. See Score below or the Namazu website (link below) for more information on how the score is determined.

  • TotalScore sum of the Score over all help pages selected within each Package. See Score below or the Namazu website (link below) for more information on how the score is determined.

  • Package Name of the package containing a help page meeting the search criteria

  • Function Name of the help page found that meets the indicated search criterion.

  • DateDate of the help page

  • Score Score returned by RSiteSearch, discussed in the Namazu website (link below).

  • DescriptionTitle of the help page

  • LinkUniversal Resource Locator (URL) for the help page

  • hits an integer = total number of hits found by the search

  • PackageSummary a data.frame with one row for each package and columns Package, Count, MaxScore, TotalScore, and Date, sorted as in the sort. argument.

  • string the string argument in the call.

  • callthe matched call


Spencer Graves and Sundar Dorai-Raj

References - reference on determining Score

See Also to search only installed packages. RSiteSearch, download.file for a web interface to this same search capability with more general options. This function searches only "Target: Functions" from that site, ignoring the R-help arcihves. for a list of alternative R search capabilities, each of which may be best for different types of inquiries.


  z <- RSiteSearch.function("spline", maxPages = 2)
# To search for 2 terms, not necessarily together:
  RSS <- RSiteSearch.function('RSiteSearch function', 1)
# To search for an exact string, use braces:
  RSS. <- RSiteSearch.function('{RSiteSearch function}', 1)

RSiteSearch documentation built on May 31, 2017, 3:47 a.m.