getGoffs: getGoffs - Download historic sale results data from the Goffs...

Description Usage Arguments Details Value Examples

View source: R/getGoffs.R

Description

getGoffs downloads historic sale results data from the Goffs and Goffs DBS websites in xls format.

Usage

1
2
3
getGoffs(url, catalogue = "", auctioneer, country, currency, date,
  csv = FALSE, rds = TRUE, sqlite = FALSE,
  filename = "bloodstockSalesData")

Arguments

url

A string containing the universal resource locator for a Goffs or Goffs DBS xls file of historic bloodstock sale data. Required, no default set.

catalogue

A string containing the universal resource locator for a sale catalogue, usually containing pedigree information in PDF format. Optional, no default set.

auctioneer

A string containing the name of the company conducting the auction sale. Required, no default set.

country

A string containing the abbreviated country code for the location of the sale. e.g. IRE. Required, no default set.

currency

A string containing the abbreviated currency code for the currency of sale bids and payments. e.g. EUR. Required, no default set.

date

A string containing the date of the sale. Multi-day sales should only have the first day's date entered. The date should be entered in the format yyyy-mm-dd. Required, no default set.

csv

A Boolean defining the data output format, in this case a CSV file. Required. Defaults to FALSE. May be changed to TRUE. Multiple output formats are possible.

rds

A Boolean defining the data output format, in this case an Rds file. Required. Defaults to TRUE. May be changed to FALSE. Multiple output formats are possible.

sqlite

A Boolean defining the data output format, in this case an SQLite file. Required. Defaults to FALSE. May be changed to TRUE. Multiple output formats are possible. Requires the RSQLite library to be installed, which is only optional for pinhooker package installation. Prior to attempting SQLite output, please ensure the RSQLite package is installed.

filename

A string containing the output file name, without file extension. Required. Defaults to 'bloodstockSalesData'. Files are output to the current working directory.

Details

getGoffs downloads historic sale data from the Goffs http://goffs.com and Goffs DBS http://goffsdbs.com websites, based on the supplied URL. Data is downloaded as an xls file from the websites. Various options may be specified such as a filename and output format. Valid output formats are csv, Rds and sqlite. Only an Rds file is generated by default. Valid URLs for Goffs and Goffs DBS sales have been tested as far back as 2009. The demo directory contains a complete set of URLs and function calls to generate results data for all sales back to 2009.

Value

If all parameters are valid, data will be downloaded from the Goffs or Goffs DBS website, normalised and output, as the specified file fomats, in the current working directory directory.

Examples

1
2
3
4
5
  getGoffs(url =
  "http://goffs.com/sales-results/sales/february-sale-2015/excel/", catalogue
  = "http://goffs.com/files/9014/2107/7132/Full_catalogue.pdf", csv = FALSE,
  rds = TRUE, sqlite = FALSE, auctioneer = "Goffs", country = "IRE", currency
  = "EUR", date = "2015-02-11", filename = "goffsSaleData")

phillc73/pinhooker documentation built on May 25, 2019, 5:05 a.m.