insert_table icon indicating copy to clipboard operation
insert_table copied to clipboard

Window closed without giving any output in code chunk

Open sk-sahu opened this issue 6 years ago • 15 comments

Table copied and inserted and after clicking done the window just closed without giving any output in code chunk. No Error message also. Rstudio V - 1.2.1335

sk-sahu avatar Sep 06 '19 05:09 sk-sahu

@sk-sahu

Thanks for signaling this. I think this should now be fixed. Can you test?

Lorenzo

lbusett avatar Sep 16 '19 12:09 lbusett

After update, Now from Addins menu or insert_table() directly prints a table code to the Rmd file. If I remember correctly earlier a miniUI window used to come.

sk-sahu avatar Sep 17 '19 06:09 sk-sahu

@sk-sahu Yes. That's how the addin is supposed to work. On my machine, the miniUI correctly opens with the new version. If on yours it doesn't, I'd suggest to try to first of all remove the package with remove.packages("inserttable") and then reinstall it, exit and reenter rstudio and retry. If it still not works, i'd suggest to try to update the package's dependencies (i.e.,, tibble, rstudioapi, shiny, miniUI, datapasta, assertthat, anytime, rhandsontable).

HTH

Lorenzo

lbusett avatar Sep 17 '19 13:09 lbusett

Table copied and inserted and after clicking done the window just closed without giving any output in code chunk. No Error message also. Rstudio V - 1.2.1335

After remove.packages("inserttable") and install again with updated dependency I am getting this same problem as earlier.

Here is a sessioninfo():

R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 LTS

Matrix products: default
BLAS:   /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

locale:
 [1] LC_CTYPE=en_IN.UTF-8       LC_NUMERIC=C               LC_TIME=en_IN.UTF-8       
 [4] LC_COLLATE=en_IN.UTF-8     LC_MONETARY=en_IN.UTF-8    LC_MESSAGES=en_IN.UTF-8   
 [7] LC_PAPER=en_IN.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_IN.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] shiny_1.3.2       inserttable_0.4.0

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.2             packrat_0.5.0          digest_0.6.20         
 [4] later_0.8.0            assertthat_0.2.1       mime_0.7              
 [7] R6_2.4.0               jsonlite_1.6           xtable_1.8-4          
[10] magrittr_1.5           rlang_0.4.0            rstudioapi_0.10.0-9001
[13] miniUI_0.1.1.1         promises_1.0.1         rhandsontable_0.3.7   
[16] tools_3.6.1            htmlwidgets_1.3        anytime_0.3.6         
[19] yaml_2.2.0             httpuv_1.5.2           compiler_3.6.1        
[22] datapasta_3.0.0        htmltools_0.3.6

sk-sahu avatar Sep 18 '19 10:09 sk-sahu

Ah, ok. So your problem is when cutting/pasting a table from "excel" in the GUI, right?

lbusett avatar Sep 18 '19 10:09 lbusett

No. Even when I am typing the entries it not printing anything on Rmd file.

sk-sahu avatar Sep 18 '19 12:09 sk-sahu

strange. In my case, currently it works on manual input, but not on the cut and paste. I'll investigate.

lbusett avatar Sep 18 '19 13:09 lbusett

Correction: in my case, it usually works ok, save some times when I do not know why the output is not written. However, if I try again a couple of times it works. Could you try repeating multiple times?

Also, I think it may not work on "untitled" RStudio tabs. You need to use a saved ".R" file, at the moment.

lbusett avatar Sep 18 '19 13:09 lbusett

Hey @lbusett I tried for several times with saving the file with a name. And in few attempts it worked after changing the default my_tbl to a different name. But afterwards in other attempts its failed again, not printing anything.

sk-sahu avatar Sep 19 '19 04:09 sk-sahu

That's very strange.... I had a look at your session_info, and the only difference that I see is that you are using a development version of rstudioapi, but I do not know if it could be related.

lbusett avatar Sep 19 '19 08:09 lbusett

I'm also able to reproduce the issue. After pasting the table in the GUI and pressing Done, the GUI closes but it does not print any code on Rmd file.

BrunoCQ avatar Sep 22 '19 19:09 BrunoCQ

strange...

@sk-sahu @BrunoCQ:

could you please tell me which version of RStudio you are using?

Lorenzo

lbusett avatar Sep 23 '19 07:09 lbusett

I am using

Rstudio V - 1.2.1335

sk-sahu avatar Sep 23 '19 08:09 sk-sahu

Thanks.

I am currently using the 1.2.1578 preview version. I'll try to downgrade and see if it changes anything.

lbusett avatar Sep 23 '19 15:09 lbusett

I may have found a reason. When I include a table of the default dimensions (4x3) it works. It doesn't matter whether I copy paste it from excel or fill it in manually. Any table larger than these dimensions results in no output. I can't manually type anything bigger than the default size in the pop-up window anyway. I have tried it with kable and rhandsontable, both produced the same results.

Here is my session info

R version 4.0.5 (2021-03-31) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C LC_TIME=English_United States.1252

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] knitr_1.31 shiny_1.6.0 inserttable_0.4.0

loaded via a namespace (and not attached): [1] Rcpp_1.0.6 highr_0.8 compiler_4.0.5 bslib_0.2.4 pillar_1.6.0 later_1.1.0.1 jquerylib_0.1.3
[8] tools_4.0.5 digest_0.6.27 jsonlite_1.7.2 evaluate_0.14 lifecycle_1.0.0 tibble_3.1.0 anytime_0.3.9
[15] pkgconfig_2.0.3 rlang_0.4.10 cli_2.4.0 rstudioapi_0.13 yaml_2.2.1 xfun_0.22 fastmap_1.1.0
[22] datapasta_3.1.0 vctrs_0.3.7 htmlwidgets_1.5.3 sass_0.3.1 glue_1.4.2 R6_2.5.0 fansi_0.4.2
[29] rmarkdown_2.7 magrittr_2.0.1 promises_1.2.0.1 ellipsis_0.3.1 htmltools_0.5.1.1 assertthat_0.2.1 rhandsontable_0.3.7 [36] mime_0.10 xtable_1.8-4 httpuv_1.5.5 tinytex_0.31 utf8_1.2.1 miniUI_0.1.1.1 cachem_1.0.4
[43] crayon_1.4.1

SinaOzdemir avatar Apr 14 '21 13:04 SinaOzdemir