read.orders: read.order

Description Usage Arguments Details Value Examples

Description

Read the next n messages of the data file.

Usage

1
read.orders(object, n = 1000)

Arguments

object

Object of class orderbook

n

number of messages we want to read.

Details

The orderbook keeps track of its current position within the data file. The read.orders function will read and process the next n messages from the file.

Value

Return an object of class orderbook

Examples

1
2
3
4
5
6
library(orderbook)
filename <- system.file("extdata", "sample.txt",
                        package = "orderbook")

ob <- orderbook(file = filename)
ob <- read.orders(ob, 100)

Example output

Loading required package: lattice
Loading required package: hash
hash-2.2.6.1 provided by Decision Patterns

Loading required package: grid

orderbook documentation built on May 2, 2019, 12:19 p.m.