Skip to content

Commit

Permalink
FbApp table format
Browse files Browse the repository at this point in the history
  • Loading branch information
CIP-RIU committed Jul 5, 2018
1 parent c653649 commit dbf8073
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions R/fbcheck_server_sbase.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ fbcheck_server_sbase <- function(input, output, session, values) {
shinysky::showshinyalert(session, "alert_fbapp_warning_sbase", paste("ERROR: Your data file has only one row of data. Please upload the right one. "), styleclass = "danger")
} else {
hot_bdata_sbase2 <- dt #fbapp2hidap(fieldbook = dt)
names(hot_bdata_sbase2) <- gsub("[[:space:]]", "", names(hot_bdata_sbase2)) #remove whitespaces
hot_bdata_sbase2
}

####### Create Unique ID ########
Expand All @@ -85,14 +87,13 @@ fbcheck_server_sbase <- function(input, output, session, values) {
fileNameExtFile<- fileNameExtFile()

####### Reactive values #######
hot_bdata_sbase <- hot_bdata_sbase2
values <- shiny::reactiveValues(
hot_bdata_sbase <- hot_bdata_sbase2

values <- shiny::reactiveValues(
hot_btable_fbapp_sbase = hot_bdata_sbase#()
)
DF <- NULL



if(!is.null(input$hot_btable_fbapp_sbase)) {
DF = hot_to_r(input$hot_btable_fbapp_sbase)

Expand All @@ -110,8 +111,6 @@ fbcheck_server_sbase <- function(input, output, session, values) {
} else if (!is.null(values[["hot_btable_fbapp_sbase"]])) {
DF = values[["hot_btable_fbapp_sbase"]]
}




if(!is.null(DF)){
Expand All @@ -127,6 +126,10 @@ fbcheck_server_sbase <- function(input, output, session, values) {

crop <- hot_crop_sbase()
trait_dict <- get_crop_ontology(crop = crop, dsource = dsource)
#print(trait_dict)
#print(DF)
#print(traits)
#print(dsource)
traittools::col_render_trait(fieldbook = DF, trait = traits , trait_dict = trait_dict, dsource = dsource)
}
})
Expand Down

0 comments on commit dbf8073

Please sign in to comment.