lens_iterate: Iterate over lens urls and return a data.frame

Description Usage Arguments Value Examples

Description

Used internally in lens_search. Takes a set of urls generared by lens_urls() and uses lapply to fetch the raw data and converts it to a data.frame using lens_parse(). The lists of data.frames are bound using dplyr::bind_rows().

Usage

1
lens_iterate(x, f, timer = 20)

Arguments

x

A vector of urls (see lens_urls)

f

function from lensr to use within iterate e.g. lens_parse.

timer

(numeric) Delay between each request to the Lens. 20 seconds as the default which may be a little slow.

Value

a data.frame

Examples

1
## Not run: df <- lens_iterate_new(three_urls, lens_parse, timer = 10)

poldham/lensr documentation built on May 25, 2019, 11:22 a.m.