ndays: Number of Periods in Data

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Calculate the number of specified periods in a given time series like data object.

Usage

1
2
3
4
5
6
7
8

Arguments

x

A time-based object

Details

Essentially a wrapper to endpoints with the appropriate period specified; the resulting value derived from counting the endpoints

As a compromise between simplicity and accuracy, the results will always round up to the nearest complete period. So n**** - 1 will return the completed periods.

For finer grain detail one should call a higher frequency n**** function.

An alternative summary can be found with periodicity and unclass(periodicity(x)).

Value

The number of observations for the period type specified

Author(s)

Jeffrey A. Ryan

See Also

endpoints

Examples

1
2
3
4
5
6
7
## Not run: 
getSymbols("QQQQ")

ndays(QQQQ)
nweeks(QQQQ)

## End(Not run)


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

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.