我使用闪亮上传多个文件,但我如何使用它们?
这是我写的一个简短的脚本,这不起作用:
output$NewDataPlot<-renderPrint({
DataSets <- input$newfile
for(p in 1:length(DataSets)){
DataSet<-read.delim(**DataSets[p]**,header = TRUE,row.names = 1,sep="\t",blank.lines.skip=TRUE)##Read specific dataset
##Cut the genes that at least 80% of their expresions is lower then 10
delete<-0
for(i in 1:length(DataSet[,1])){
count<-0
for(j in 1:length(DataSet[i,])){
if(DataSet[2,3]<10 || DataSet[2,3]=="" || DataSet[2,3]==" "){
count=count+1
cat(count,i,j,DataSet[i,j])
}
}
if(count>0.8*length(DataSet[i,])){
DataSet=DataSet[-i,]
delete<-delete+1
}
}
)} ui是用html编写的:
<input id="newfile" type="file" multiple accept="text/csv,text/comma-separated- values,text/plain,.csv" />
<input id="newGOI" type="file" accept="text/csv,text/comma-separated-values,text/plain,.csv" />