R/Aesthetic_Tab_Functions.R

mapAes2Var <- function(plot_type,var_list,layer_count) {

  Geom <- Aes <- Type <- NULL

  applicable_aes <- aesthetics %>% filter(Geom == plot_type & Type == "Aesthetic") %>% select(Aes)
  id_val = paste("map_aes_controls",layer_count,sep="")
  div(id = id_val,
      h4(strong(paste("LAYER ",layer_count, " - MAP AESTHETIC TO VARIABLE")),style="color:darkblue"),
      selectInput(inputId = paste("select_aes",layer_count,sep=""),"Select an Aesthetic",choices = c("",as.character(unlist(applicable_aes)))),
      selectInput(inputId = paste("aes_mapping_var",layer_count,sep=""),"Select Mapping Variable",choices = c("",var_list))
  )

}

Try the RtutoR package in your browser

Any scripts or data that you put into this service are public.

RtutoR documentation built on May 2, 2019, 4:20 a.m.