Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R上传一个.rda文件_R_Shiny_Rda - Fatal编程技术网

R上传一个.rda文件

R上传一个.rda文件,r,shiny,rda,R,Shiny,Rda,我不能上传和显示一个rda文件,它的库在R中闪闪发光。 有人知道怎么做吗? 我使用的是R版本3.1.1。 以下是使用shiny的网站: ** #ui.R 图书馆(闪亮) shinyUI(navbarPage(“MareyMap online”), 选项卡面板(“声明”, h2(“用于估计基因组重组率的网络服务”,align=“center”), br() ), 选项卡面板(“步骤1:数据选择”, fileInput(“文件”,label=h3(“或上载数据集”), 注:使用以下格式上传您物种的马

我不能上传和显示一个rda文件,它的库在R中闪闪发光。 有人知道怎么做吗? 我使用的是R版本3.1.1。 以下是使用shiny的网站:

**

#ui.R
图书馆(闪亮)
shinyUI(navbarPage(“MareyMap online”),
选项卡面板(“声明”,
h2(“用于估计基因组重组率的网络服务”,align=“center”),
br()
),
选项卡面板(“步骤1:数据选择”,
fileInput(“文件”,label=h3(“或上载数据集”),
注:使用以下格式上传您物种的马里地图数据:txt、rda、,
Rda、rdata或rdata,
“可选--您是否同意在数据整理后将您的数据集包括在我们的数据库中”,
表格输出(“表格”)
)
))
#服务器.R
图书馆(闪亮)
图书馆(MareyMap)
shinyServer(功能(输入、输出){

output$table不起作用,但最后我尝试使用.txt文件:

“设置”“映射”“mkr”“物理”“gen”“vld” “拟南芥”“1号染色体”“SGCSNP131”184351 0真 “拟南芥”“1号染色体”“SGCSNP5”189722 2.61真 “拟南芥”“1号染色体”“SGCSNP247”662031 2.54真 “拟南芥”“1号染色体”“GST1”663291 3.99真 拟南芥1号染色体SGCSNP151 1148355 3.35真 “拟南芥”“1号染色体”“AtEAT1”1435872 3.87真 拟南芥1号染色体ve002 1521308 7.15真 拟南芥1号染色体SGCSNP388 1526933 7.66真 拟南芥1号染色体SGCSNP170 1642565 7.66真 “拟南芥”1号染色体“ve003”2032443 7.76真 “拟南芥”“1号染色体”“SGCSNP308”2664435 0.89真 “拟南芥”“1号染色体”“phyA”3097714 11.35真 “拟南芥”“1号染色体”“SGCSNP107”3097951 11.86真 “拟南芥”“染色体1”“SGCSNP138”3121108 14.69正确 拟南芥1号染色体SGCSNP270 3190609 13.8真 “拟南芥”1号染色体“ve005”3194953 11.48真 拟南芥1号染色体nga63 3224435 11.48真 “拟南芥”“1号染色体”“ARR4”3443848 11.35真 “拟南芥”“1号染色体”“SGCSNP148”3658292 11.99真 “拟南芥”“1号染色体”“BFN1”3773426 11.98真 “拟南芥”“1号染色体”“NCC1”4107626 12.6真 “拟南芥”“1号染色体”“ve006”4459553 16.13真 “拟南芥”“染色体1”“SGCSNP132”4588103 14.04真

服务器.R 图书馆(闪亮) 图书馆(MareyMap)

shinyServer(功能(输入、输出){


输出$table在
renderPrint
中尝试
load(input$file$datapath)
而不是
input$file
并查看当我使用
load(input$file$datapath)
而不是
renderPrint
中的
input$file
时,控制台显示
加载错误(input$file$datapath):错误的'file'参数
您尝试加载的对象的名称是什么?如何在R中以正常方式加载它?错误是因为您尚未选择文件。如果在ui.R中使用
tableOutput
,最好在server.R中使用
renderable
#ui.R
library(shiny)
shinyUI(navbarPage("MareyMap online",

                   tabPanel("Présentation",

h2("A web-service for estimating recombination rates along the genome",align="center"),

br()

),

tabPanel("Step 1 : Data Selection",


         fileInput("file", label = h3("or upload a data set")),
                         'Note: Upload the marey map data for your species using the following format: txt, rda,
Rda, rdata or Rdata.',

        "Optional -- Would you agree to include your dataset in our database after data curation",

         tableOutput("table")

         )
))
#server.R
library(shiny)
library(MareyMap)
shinyServer(function(input, output) {

  output$table <- renderPrint({
    input$file
  })  
})
#data(Arabidopsis_thalianan)
#Arabidopsis_thalianan@maps  
inFile <- input$file

if (is.null(inFile))
  return(NULL)

read.csv(inFile$datapath, header = TRUE,
         sep = ' ', quote ='"')
inFile <- input$file

if (is.null(inFile))
  return(NULL)

a<-read.csv(inFile$datapath, header = TRUE,
         sep = ' ', quote ='"')
a[,"map"]
               tabPanel("Présentation",
                        
                        h2("A web-service for estimating recombination rates along the genome",align="center"),
                        
                        
                        br(),
                        
                        helpText("MareyMap allows to estimate local recombination rates along the genome. MareyMap relies on
                                 comparing the genetic and the physical maps of a given chromosome to estimate local recombination
                                 rates (given by the slope of the curve describing the relationship between both variables), a graphical
                                 method called the Marey map method introduced by A. Chakravarti in 1991 . MareyMap accepts Marey
                                 map data as input (genetic and physical positions of markers for a set of chromosomes of a species) and
                                 will return local recombination rate estimates.")
                        ),
               
               
               
               tabPanel("Step 1 : Data Selection",
                        
                        selectInput("dataset", label = h3("Select a dataset in our database",align="center"),
                                    choices = c("Arabidopsis_thalianan", "Caenorhabditis_elegans" ,
                                                "Drosophila melanogaster","Homo sapiens")),
                        
                        fileInput("file", label = h3("or upload a data set")),
                        'Note: Upload the marey map data for your species using the following format: txt',
                        
                        br(),
                        br(),
                        
                        "Optional -- Would you agree to include your dataset in our database after data curation",
                        
                        textOutput("table"),
                        tableOutput("table2")
                        
                        
               ),
               tabPanel("Step 2 : Data curation",
                        "list of chromosomes:",
                        br(),
                        tableOutput("table3")
               ),
               tabPanel("Step 3 : Interpolation"),
               tabPanel("Step 4 : Rec Rates export")
                        ))