Learn R Programming

orderbook (version 1.03)

read.orders.function: read.order

Description

Read the next n messages of the data file.

Usage

read.orders(object, n = 1000)

Arguments

object
Object of class orderbook
n
number of messages we want to read.

Value

Return an object of class orderbook

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.

Examples

Run this code
library(orderbook)
filename <- system.file("extdata", "sample.txt",
                        package = "orderbook")

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

Run the code above in your browser using DataLab