IRkernel / repr

String and byte representations for all kinds of R objects
https://irkernel.github.io/docs/repr/
GNU General Public License v3.0
54 stars 33 forks source link

error in repr for a tbl_df #70

Open jankatins opened 8 years ago

jankatins commented 8 years ago
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 commented 8 years ago

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

jankatins commented 8 years ago

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

flying-sheep commented 8 years ago

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)