get_prices: Get prices for a given city and page

Description Usage Arguments Details Value Author(s) Examples

Description

get_prices() scrapes prices elements for a given Swiss city and page from https://www.comparis.ch web-page and returns a numeric vector of prices.

Usage

1
get_prices(city, page, validate = TRUE)

Arguments

city

a length one character vector indicating a city.

page

a length one numeric vector indicating a page number.

validate

a length one logical vector indicating whether or not to validate city and page arguments. Default value: TRUE.

Details

Note that only the latest (no older than one week) items considered. https://www.comparis.ch url's indexing starts from zero, therefore, the page number should be subtracted by one.

Value

a numeric vector of prices.

Author(s)

Iegor Rudnytskyi, iegor.rudnytskyi@unil.ch

Examples

1
prices <- get_prices("bern", 3)

SMAC-Group/ptdspkg documentation built on Oct. 30, 2019, 11:08 p.m.