all.equal.instrument: instrument all.equal method

Description Usage Arguments Note Author(s) See Also Examples

View source: R/all.equal.instrument.R

Description

This is most useful for seeing the difference between two instrument objects.

Usage

1
2
3
## S3 method for class 'equal.instrument'
all(target, current, char.n = 2, collapse = ";",
  ...)

Arguments

char.n

If length of a character vector is char.n or less it will be treated as a single element. A negative value for char.n will be treated as if it were positive Inf.

collapse

Only used if a character vector is of length less than char.n. Unless collapse is NULL, it will be used in a call to paste. If collapse is NULL, each element of the character vector will be compared separately.

Note

ALPHA code. Subject to change

Author(s)

Garrett See

See Also

getInstrument, instrument.table, buildHierarchy

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
currency("USD")
stock("SPY", "USD", validExchanges=c("SMART", "ARCA", "BATS", "BEX"))
stock("DIA", "USD", validExchanges=c("SMART", "ARCA", "ISLAND"),
     ExtraField="something")

all.equal(getInstrument("SPY"), getInstrument("DIA"))
all.equal(getInstrument("SPY"), getInstrument("DIA"), char.n=5)
all.equal(getInstrument("SPY"), getInstrument("DIA"), char.n=5, collapse=NULL)

all.equal(getInstrument("DIA"), getInstrument("USD"))

## End(Not run)

FinancialInstrument documentation built on May 21, 2017, 1:23 a.m.

Search within the FinancialInstrument package
Search all R packages, documentation and source code