data(sample_matrix)
sample.xts <- as.xts(sample_matrix)
# output is truncated and shows first and last 10 observations
print(sample.xts)
# show the first and last 5 observations
print(sample.xts, show.rows = 5)
Run the code above in your browser using DataLab