我如何在切换中 select 选择后显示两个文件上传按钮
How can I show two file upload buttons once I select a choice in a switch
所以我希望在编写以下代码时显示两个文件上传按钮,但只显示其中一个 (file1)。知道如何展示它们吗? I need two have two buttons in one row for uploading files when that specific option in a switch is selected. Shiny 中有这样做的选项吗?
"Load Manually"= fileInput('file1', 'Choose file to upload',
accept = c(
'text/csv',
'text/comma-separated-values',
'text/tab-separated-values',
'text/plain',
'.csv',
'.tsv'
), multiple=TRUE
),
fileInput('file2', 'Choose file2 to upload',
accept = c(
'text/csv',
'text/comma-separated-values',
'text/tab-separated-values',
'text/plain',
'.csv',
'.tsv'
), multiple= TRUE
)
)
这是当前显示的内容:
如果我们使用 fluidRow
我们可以有多个项目:
"Load Manually"=fluidRow(
fileInput('file1', 'Choose file to upload',
accept = c(
'text/csv',
'text/comma-separated-values',
'text/tab-separated-values',
'text/plain',
'.csv',
'.tsv'
), multiple=TRUE
),
fileInput('file2', 'Choose file2 to upload',
accept = c(
'text/csv',
'text/comma-separated-values',
'text/tab-separated-values',
'text/plain',
'.csv',
'.tsv'
), multiple= TRUE
)
)
这是它的样子:
所以我希望在编写以下代码时显示两个文件上传按钮,但只显示其中一个 (file1)。知道如何展示它们吗? I need two have two buttons in one row for uploading files when that specific option in a switch is selected. Shiny 中有这样做的选项吗?
"Load Manually"= fileInput('file1', 'Choose file to upload',
accept = c(
'text/csv',
'text/comma-separated-values',
'text/tab-separated-values',
'text/plain',
'.csv',
'.tsv'
), multiple=TRUE
),
fileInput('file2', 'Choose file2 to upload',
accept = c(
'text/csv',
'text/comma-separated-values',
'text/tab-separated-values',
'text/plain',
'.csv',
'.tsv'
), multiple= TRUE
)
)
这是当前显示的内容:
如果我们使用 fluidRow
我们可以有多个项目:
"Load Manually"=fluidRow(
fileInput('file1', 'Choose file to upload',
accept = c(
'text/csv',
'text/comma-separated-values',
'text/tab-separated-values',
'text/plain',
'.csv',
'.tsv'
), multiple=TRUE
),
fileInput('file2', 'Choose file2 to upload',
accept = c(
'text/csv',
'text/comma-separated-values',
'text/tab-separated-values',
'text/plain',
'.csv',
'.tsv'
), multiple= TRUE
)
)
这是它的样子: