SHARE
TWEET

Untitled

a guest Aug 18th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. summary_library=function(taxon19){
  2.   cat(paste("Number of specimens with A grade:",as.numeric(length(which(taxon19$grade=="A")))," ","Percentage:",signif((as.numeric(length(which(taxon19$grade=="A"))*100)/length(taxon19$species)),digits=3),"%"),
  3.   paste("Number of specimens with B grade:",as.numeric(length(which(taxon19$grade=="B")))," ","Percentage:",signif((as.numeric(length(which(taxon19$grade=="B"))*100)/length(taxon19$species)),digits=3),"%",collapse="n"),
  4.   paste("Number of specimens with C grade:",as.numeric(length(which(taxon19$grade=="C")))," ","Percentage:",signif((as.numeric(length(which(taxon19$grade=="C"))*100)/length(taxon19$species)),digits=3),"%",collapse="n"),
  5.   paste("Number of specimens with D grade:",as.numeric(length(which(taxon19$grade=="D")))," ","Percentage:",signif((as.numeric(length(which(taxon19$grade=="D"))*100)/length(taxon19$species)),digits=3),"%",collapse="n"),
  6.   paste("Number of specimens with E grade:",as.numeric(length(which(taxon19$grade=="E")))," ","Percentage:",signif((as.numeric(length(which(taxon19$grade=="E"))*100)/length(taxon19$species)),digits=3),"%",collapse="n"),
  7.   paste("Number of different species:",length(unique(taxon19$species)),collapse="n"),
  8.   paste("Number of different BIN numbers:",length(unique(taxon19$BIN)),collapse="n"),
  9.   paste("Number of different collectors:",length(unique(taxon19$collectors)),collapse="n"),
  10.   paste("Number of different countries:",length(unique(taxon19$country)),collapse="n"),
  11.   paste("Total Number of specimens in reference library:",length(taxon19$species),collapse="n"),sep="t")
  12. }
  13.      
  14. tags$div(style="text-align:justify",tags$h4(textOutput("summary")))
  15. actionBttn("clicks3",size="sm",label="SUMMARY")
  16.      
  17. summary_reac<-eventReactive(input$clicks3,{summary_library(taxon19)})
  18. output$summary <- renderPrint({ summary_reac() })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top