R Shiny 应用程序 – 有哪些可能性

huangapple go评论88阅读模式
英文:

R Shiny apps - What are the possibilities

问题

我很新于使用 R 中的 Shiny 应用程序及其功能。我在想以下内容是否可能,以及开发起来有多困难。

我有一个监督学习模型,将几何参数(面积、圆度、周长等)分类为不同的形状。我有带有所有训练/测试数据的标记数据集。然后它执行统计并绘制结果。以下是否可能:

  1. 允许用户导入他们自己的数据以将其分类为形状(这个用户可以是世界上的任何随机人)?
  2. 动态更改绘制的变量(例如,如果我的数据在比较药物 A 与药物 B,而新用户正在比较药物 C、D、E 和 F,他们是否可以指定每个变量的名称(药物 C、D 等)以及要比较的变量数目(4)?
  3. 用户是否必须安装 R?如果是这样,用户是否需要提供大量输入来使用该应用程序?
  4. 是否存在其他可预见的问题?

感谢提供意见!这个社区真的很棒,我希望有人能指导我从何处开始以及这个项目是否可行。

英文:

this is a question that is very open-ended, and I am hoping for some advice/discussion. I am very new to Shiny apps in R and their capabilities. I was just wondering if the following would be possible, and how difficult it is to develop.

I have a supervised learning model that classifies geometric parameters (area, circularity, perimeter etc) into different shapes. I have the labeled dataset, with all the training/testing performed already. It then performs statistics and graphs the results. Would it be possible to

  1. Have the user import their own data to classify their data into shapes (this user being any random person in the world)
  2. Dynamically change the variables that are graphed (e.g. if my data was comparing drug A vs drug B, and a new user was comparing drug C, D, E and F, can they specify what each variable should be called (Drug C D etc), and how many variables are being compared (4)?
  3. Do they have to have R installed? If so, would there be lots of input required from the user to use the app?
  4. Any other forseeable problems?

Advice is appreciated! This community is really great and I hope someone could guide me on what to begin with and if this project is feasible.

答案1

得分: 1

为了先回答你的最后一个问题:是的,这是一个可行的项目,适合使用Shiny应用程序。

将你的模型导入到Shiny应用程序工作空间中(例如使用readRDS())。

Shiny已经提供了许多输入选项(如果需要,可以使用自定义HTML添加更多)。其中一个输入选项是fileInput(),允许用户上传数据。

定义Shiny应用程序期望用户数据的格式(.csv/.xlsx/等等)。然后确保模型可以处理上传的数据(如果需要,进行预处理、过滤缺失值/异常值等)。

关于结果以何种形式绘制或基本输出,你也可以让用户决定(其他输入选项,如checkboxInput()radioButtons()selectInput()可能会有帮助)。

而且,用户不需要安装R。

英文:

To answer your last question first: Yes, this is a feasible project for which a Shiny app can be well suited.

Import your model into the Shiny App Workspace (e.g. with readRDS()).

Shiny already comes with many inputs (add more with custom HTML if needed). One input is fileInput() which allows users to upload data.

Define a format (.csv/.xlsx/etc..) in which your Shiny app expects the user data. Then make sure that the model can handle the uploaded data (preprocess, filter missing/outlier etc.. if needed).

In which form the result is plotted or basically output, you can also let the user decide (further inputs like checkboxInput(), radioButtons(), selectInput() can be helpful).

And no, the user does not need to have R installed.

huangapple
  • 本文由 发表于 2023年6月29日 14:09:45
  • 转载请务必保留本文链接:https://go.coder-hub.com/76578439.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定