When using a Jupyter notebook with R kernel in CoCalc to print out a ts object, I got this error
ERROR while rich displaying an object: Error in arr_partition(a, rows, cols): rows >= 2L is not TRUE
The error occurs when printing a ts object where all observations are in the same year. To replicate in a notebook:
# This works fine because two rows of output
ts(rnorm(13), start=c(2000,1), frequency=12)
# This fails because only one row of output
ts(rnorm(12), start=c(2000,1), frequency=12)
# Wrapping in a print statement works, but that's because it's dumping the R output directly to the screen rather than formatting it
print(ts(rnorm(12), start=c(2000,1), frequency=12))
It looks like the message is triggered by this line, which imposes the requirement that the ts object has to have two rows:
|
stopifnot(rows >= 2L, cols >= 2L) |
When using a Jupyter notebook with R kernel in CoCalc to print out a ts object, I got this error
The error occurs when printing a ts object where all observations are in the same year. To replicate in a notebook:
It looks like the message is triggered by this line, which imposes the requirement that the ts object has to have two rows:
repr/R/repr_matrix_df.r
Line 36 in e82a319