print.findFn: print a findFn object

View source: R/print.findFn.R

print.findFnR Documentation

print a findFn object

Description

Print a findFn object to a file and pass it to a web browser

Usage

## S3 method for class 'findFn'
print(x, where, title, 
  openBrowser = TRUE, template, ...)

Arguments

x

An object of class findFn

where

a character vector interpreted as follows:

If length(where)==1, it must be either 'HTML' or 'console' or the name of a column of x or the name of a file to hold the file created to be displayed in a web browser.

If length(where)>1, it must be the names of columns of x to be displayed on the console. If where is a vector of names of columns of x, those columns will be printed to the console, and there will be no display in a web browser. If where == 'console', the following columns of x are displayed: c('Count', 'Package', 'Function', 'Score', 'Date').

title

An optional title to give the HTML file. Default is to use the original query string.

openBrowser

logical; if TRUE and where is missing or 'HTML', launch default browser after building table

template

Template file used by brew

...

ignored

Value

The full path and name of the file created is returned invisibly.

Author(s)

Sundar Dorai-Raj, Spencer Graves, Romain Francois, Uwe Ligges

See Also

findFn, RSiteSearch, browseURL brew

Examples

splineSearch <- try(findFn("spline", maxPages = 2))

if(!inherits(splineSearch, 'try-error')){
if(!CRAN()){
  print(splineSearch, 'console')
  splineSearch # all columns in a browser
}
webScr <- try(findFn('web scraping'))
if(!inherits(webScr, 'try-error')){
if(!CRAN()){
  print(webScr)
}
}
}

sos documentation built on May 31, 2023, 7:46 p.m.