Data_new <- reactive({
req(input$FPID)
req(input$RPID)
target_FP <- data()[input$FPID][!(data()[input$RPID]=="" |data()
[input$RPID]=='NA'|data()[input$RPID] =='\\N'| is.na(data()
[input$RPID]))]
as.data.frame(target_FP)
return(Data_new)
})
## render table of Data_new() -------------------
output$ProcessedOut <- renderTable({
req(input$FPID)
Data_new()
})
#--------------- Users Impute
#selecting the target FPs separately
#target_FP <- df$FPID[!(df$RPID ==""|df$RPID =='NA'|df$RPID
=='\\N'|is.na(df$RPID))]
#target_FP <- data()[input$FPID][!(data()[input$RPID]==""|data()
[input$RPID=="\\N"]|is.na(data()[input$RPID]))]
#target_FP
#target_FP <- data.frame(target_FP)
#target_FP <- distinct(target_FP)
#assigning the value
#df$RPID <- as.character(df$RPID)
#df$RPID[(df$FPID%in%target_FP$target_FP)&(df$RPID ==""|df$RPID
=='NA'|df$RPID =='\\N'|is.na(df$RPID))] <- "Known"
#df$RPID <- as.factor(df$RPID)
#DONE
#df$Users <- df$RPID
#df$Users <- as.character(df$Users)
#df$Users[is.na(df$Users)] <- 'Unknown'
#df$Users[(df$Users != 'Unknown')&(df$Users != 'Known')] <- 'Known'
#df$Users <- as.factor(df$Users)
#---------------
我要以闪亮的方式执行此操作,其中FPID和RPID是用户输入