RStudio和bright:服务器和客户机之间的消息

时间:2023-01-10 09:51:57

I'm trying to create a Shiny application, and I need the messages that the client sends to the server and the answers the server sends back (especially the images). The problem is t I don't know how they communicate with each other. I was trying to get this information from the documentation, but I wasn't able to find it. I would prefer to get these server-client messages in Java, but I'm interested in any solution that can work.

我正在尝试创建一个闪亮的应用程序,我需要客户机发送给服务器的消息和服务器返回的答案(特别是图像)。问题是我不知道他们是如何沟通的。我试图从文档中获取这些信息,但我没能找到。我希望在Java中获得这些服务器客户机消息,但是我对任何可以工作的解决方案都感兴趣。

This is how I would like my app to work:

这就是我希望我的应用程序工作的方式:

We have shiny code which generates a web page that contains an image and a few things the user can change. Whenever the user changes something (a check-box, menu, etc), the current state of the page should be saved. Alternatively, we could have a a button that the user clicks to save the state of the page. We would like to save the whole html, or just the image. with the current state of the menus as a string. I tried to save the html, but it did not contain the image. That is why I would like t those messages, because I guess they contain the data I need.

我们有闪亮的代码,它生成一个包含图像和用户可以更改的一些内容的web页面。当用户更改某些内容(复选框、菜单等)时,应该保存页面的当前状态。或者,我们可以有一个按钮,用户可以单击该按钮来保存页面的状态。我们想要保存整个html,或者只保存图像。菜单的当前状态为字符串。我试图保存html,但它不包含图像。这就是为什么我想要这些消息,因为我想它们包含了我需要的数据。

However, I chose Java, because these states should be saved to a graph showing step-by-step how the final form gained shape. I would prefer to save this into an Xmind workbook as it has a nice Java API, which I could use to make the needed workbook.

但是,我选择了Java,因为这些状态应该保存到一个图表中,一步一步地显示最终表单是如何获得形状的。我宁愿将它保存到Xmind工作簿中,因为它有一个很好的Java API,我可以用它来制作所需的工作簿。

1 个解决方案

#1


3  

Try

试一试

options(shiny.trace=TRUE)
runApp("myApp")

The messages between the server and the ui are then printed in the R console. see this question. Hope this will help.

然后,服务器和ui之间的消息将打印在R控制台中。看到这个问题。希望这将帮助。

#1


3  

Try

试一试

options(shiny.trace=TRUE)
runApp("myApp")

The messages between the server and the ui are then printed in the R console. see this question. Hope this will help.

然后,服务器和ui之间的消息将打印在R控制台中。看到这个问题。希望这将帮助。