repr icon indicating copy to clipboard operation
repr copied to clipboard

error in repr for a tbl_df

Open jankatins opened this issue 9 years ago • 3 comments

library("dplyr")
library("tibble")
library("jsonlite")
download.file("http://jsonstudio.com/wp-content/uploads/2014/02/world_bank.zip", "world_bank.zip")
world_bank <- jsonlite::stream_in(unz("world_bank.zip", "world_bank.json"))
world_bank <- as_data_frame(world_bank)
world_bank

results in this:

Error in rbind(deparse.level, ...): replacement has length zero
Traceback:

1. prepare_mimebundle(obj, .self$handle_display_error)
2. repr_text(obj)
3. repr_text.data.frame(obj)   # at line 29 of file C:/data/external/R/repr/R/generics.r
4. ellip.limit.arr(obj)   # at line 224 of file C:/data/external/R/repr/R/repr_matrix_df.r
5. rbind(cbind(a[top, left], ehf, a[top, right], deparse.level = 0), 
 .     ellip.limit.vec(rep(ellip.v, ncol(a)), cols, ellip.d), cbind(a[bottom, 
 .         left], ehf, a[bottom, right], deparse.level = 0), deparse.level = 0)   # at line 104-108 of file C:/data/external/R/repr/R/repr_matrix_df.r
6. rbind(deparse.level, ...)

jankatins avatar Jun 19 '16 20:06 jankatins

BTW: wow, how does it know where the source for my repr package is located?

jankatins avatar Jun 19 '16 20:06 jankatins

I also reported that in tibble: https://github.com/hadley/tibble/issues/103

jankatins avatar Jun 19 '16 21:06 jankatins

BTW: wow, how does it know where the source for my repr package is located?

because you installed it from there using --with-keep.source (or RStudio did)

flying-sheep avatar Jun 20 '16 08:06 flying-sheep