问题描述
我正在上传闪亮的应用程序中的文本文件。 这是我在闪亮的应用程序中阅读的方式:
data <- reactive({
req(input$file)
df <- read.table(file=input$file$datapath[input$file$name==input$Select],skip = 15,sep=input$sep,header = input$header,stringsAsFactors = input$stringAsFactors)
updateSelectInput(session,inputId = 'xcol',label = 'X Variable',choices = names(df),selected = names(df)[1])
updateSelectInput(session,inputId = 'ycol',label = 'Y Variable',selected = names(df)[2])
return(df)
})
现在,我想删除/跳过上传的数据集中具有空单元格的行。
我的尝试:
df[!apply(df == "",1,all),]
但是,它不起作用。
使用read.table
时有其他方法吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)