Closed robertoromor closed 5 years ago
@adigherman ?
I was able to replicate the problem on my end. Tracked this down to htmlwidgets.js (line 500) but I was not able to figure out how to fix it yet. Debugging htmlwidgets is not an easy task.
Hi guys, do yo have some example that works in shiny or some way around it?
@muschellij2 @adigherman Is there a way we can modify the papaya function to make it open up the widget in a browser directly??? or maybe there already is a parameter that does this.
What do you mean? As compared to the Viewer in RStudio? John
On Fri, Jul 12, 2019 at 3:01 PM robertoromor notifications@github.com wrote:
@muschellij2 https://github.com/muschellij2 @adigherman https://github.com/adigherman Is there a way we can modify the papaya function to make it open up the widget in a browser directly??? or maybe there already is a parameter that does this.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/muschellij2/papayaWidget/issues/6?email_source=notifications&email_token=AAIGPLWW4QBI5EBSSRM6KBDP7DIKLA5CNFSM4HPSDUEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ2TM2A#issuecomment-510998120, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIGPLQWCELCV3KPC2JILI3P7DIKLANCNFSM4HPSDUEA .
For example a new feature like this.
papaya(directory/image.dcm, viewe=c("browser", "Rstudio viewer"), ... )
The point is that if it is not possible to use the papayaviewer within a Shiny enviroment, I want to know if it is possible to call the papaya function (see above) within shiny for it to open in another tab within the browser where I am using shiny.
Roberto R.
I believe the feature is not there, I just want to know if it is possibile to tweak the function to have the feature I am mentioning, if so how difficult is this "tweak"
You'd have to open an issue with htmlwidgets
I think.
John
On Tue, Jul 16, 2019 at 5:13 PM robertoromor notifications@github.com wrote:
I believe the feature is not there, I just want to know if it is possibile to tweak the function to have the feature I am mentioning, if so how difficult is this "tweak"
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/muschellij2/papayaWidget/issues/6?email_source=notifications&email_token=AAIGPLXAUMO2DJNXD26SPD3P7Y2XRA5CNFSM4HPSDUEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2CFPXY#issuecomment-511989727, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIGPLUOH3BLP2RRH7KOHULP7Y2XRANCNFSM4HPSDUEA .
Try this out with a new install of papayaWidget:
require(shiny)
require(WhiteStripe)
require(papayaWidget)
fnames = ws_img_data()
names(fnames) = neurobase::nii.stub(fnames, bn = TRUE)
server <- function(input, output) {
output$plot <- renderPapaya({
x = papaya(fnames)
x$elementId = NULL
x
})
}
ui <- fluidPage(
papayaOutput("plot")
)
shinyApp(ui = ui, server = server)
I tried it with the same result. A blank shinyapp
Works on my end - please send sessionInfo with all updates and also any example code. John
On Wed, Jul 24, 2019 at 4:17 PM robertoromor notifications@github.com wrote:
I tried it with the same result. A blank shinyapp
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/muschellij2/papayaWidget/issues/6?email_source=notifications&email_token=AAIGPLSN26SICADKTW7VULDQBC2GHA5CNFSM4HPSDUEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2XPUYA#issuecomment-514783840, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIGPLTWJAREW3WSFNHW2HDQBC2GHANCNFSM4HPSDUEA .
session info below. Whay do you mean by "any example code"
> sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=Spanish_Mexico.1252 LC_CTYPE=Spanish_Mexico.1252 LC_MONETARY=Spanish_Mexico.1252 LC_NUMERIC=C
[5] LC_TIME=Spanish_Mexico.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] papayaWidget_0.5.4 WhiteStripe_2.3.1 shiny_1.2.0 RSQLite_2.1.1
loaded via a namespace (and not attached):
[1] Rcpp_1.0.0 compiler_3.5.2 later_0.8.0 R.methodsS3_1.7.1 bitops_1.0-6 base64enc_0.1-3 R.utils_2.8.0
[8] tools_3.5.2 digest_0.6.18 bit_1.1-14 jsonlite_1.6 memoise_1.1.0 nlme_3.1-137 lattice_0.20-38
[15] mgcv_1.8-26 Matrix_1.2-15 RNifti_0.10.0 DBI_1.0.0 oro.nifti_0.9.1 yaml_2.2.0 htmlwidgets_1.3
[22] bit64_0.9-7 grid_3.5.2 neurobase_1.27.6 R6_2.4.0 blob_1.1.1 magrittr_1.5 matrixStats_0.54.0
[29] promises_1.0.1 htmltools_0.3.6 splines_3.5.2 abind_1.4-5 assertthat_0.2.1 mime_0.6 xtable_1.8-3
[36] httpuv_1.4.5.1 R.oo_1.22.0
>
papayaWidget on GitHub is 0.5.5 - please reinstall and retry: remotes::install_github("muschellij2/papayaWidget")
John
On Wed, Jul 24, 2019 at 4:31 PM robertoromor notifications@github.com wrote:
session info below. Whay do you mean by "any example code"
sessionInfo() R version 3.5.2 (2018-12-20) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale: [1] LC_COLLATE=Spanish_Mexico.1252 LC_CTYPE=Spanish_Mexico.1252 LC_MONETARY=Spanish_Mexico.1252 LC_NUMERIC=C [5] LC_TIME=Spanish_Mexico.1252
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] papayaWidget_0.5.4 WhiteStripe_2.3.1 shiny_1.2.0 RSQLite_2.1.1
loaded via a namespace (and not attached): [1] Rcpp_1.0.0 compiler_3.5.2 later_0.8.0 R.methodsS3_1.7.1 bitops_1.0-6 base64enc_0.1-3 R.utils_2.8.0 [8] tools_3.5.2 digest_0.6.18 bit_1.1-14 jsonlite_1.6 memoise_1.1.0 nlme_3.1-137 lattice_0.20-38 [15] mgcv_1.8-26 Matrix_1.2-15 RNifti_0.10.0 DBI_1.0.0 oro.nifti_0.9.1 yaml_2.2.0 htmlwidgets_1.3 [22] bit64_0.9-7 grid_3.5.2 neurobase_1.27.6 R6_2.4.0 blob_1.1.1 magrittr_1.5 matrixStats_0.54.0 [29] promises_1.0.1 htmltools_0.3.6 splines_3.5.2 abind_1.4-5 assertthat_0.2.1 mime_0.6 xtable_1.8-3 [36] httpuv_1.4.5.1 R.oo_1.22.0
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/muschellij2/papayaWidget/issues/6?email_source=notifications&email_token=AAIGPLSJXRP7NBKUWBVI2PTQBC3ZVA5CNFSM4HPSDUEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2XQYVY#issuecomment-514788439, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIGPLS2UYEFAYXSAC2JBM3QBC3ZVANCNFSM4HPSDUEA .
rock and roll!! works perfectly, the update did it for me Thanks a lot John!
Hi John,
I am having trouble rendering the papayaWidget on Shiny, it just shows a blank page, you will find my session on this link and below the code I am using:
robertoromo-sessioninfo.txt
code:
`library(kirby21.t1) library(papayaWidget) library(neurobase)
outdir = tempdir() download_t1_data(outdir = outdir)
fname = kirby21.t1::get_t1_filenames(outdir = outdir) fname = fname[3]
ui <- shinyUI( fluidPage( papayaOutput("test") ) )
server <- function(input, output, session) {
output$test<-renderPapaya({
img = readnii(fname)
print(img) papaya(img) })
}
shinyApp(ui, server)`