Experimental lifecycle

store(x, ...)

# S3 method for StationBoard
store(x, ..., file)

# S3 method for busServices
store(x, ..., wb)

# S3 method for ferryServices
store(x, ..., wb)

# S3 method for trainServices
store(x, ..., wb)

# S3 method for CallingPoints
store(x, ..., wb, serviceID)

# S3 method for previousCallingPoints
store(x, ..., wb, serviceID)

# S3 method for subsequentCallingPoints
store(x, ..., wb, serviceID)

Arguments

x

Data.

...

Optional parameters.

file

String with filename and path.

wb

Workbook object, created with openxlsx::createWorkbook.

serviceID

(string): The LDBWS service ID of the service to request the details of. The service ID is obtained from a service listed in a StationBoard object returned from any other request.

Value

Nothing, call for its side effect.

Details

The goal of this generic is to facilitate storing data retrieved from arrival and departure boards. Each request has multiple parts that should be stored individually (e.g. Excel Workbook or individual CSV files).

Examples

if (FALSE) { `%>%` <- magrittr::`%>%` pad <- trainR::GetArrBoardWithDetailsRequest("PAD") pad %>% trainR::store(file = "arrivals-PAD.xlsx") # Delete test file unlink("arrivals-PAD.xlsx") }