1

New in R and i have the following dataframe that i want to plot each individual Name in col "Name" against column "Created" or against "Closed". So somehow i need to pick the desired name (tried select input) and the plot with respective dates to appear.

> str(closed_srs3)
Classes ‘tbl_df’, ‘tbl’ and 'data.frame':   8220 obs. of  5 variables:
 $ Name   : chr  "DASOVOUNIX" "MYSTEGNA_X" "PETROCHORI_SAR" "AGNIK_SAR" ...
 $ Id     : num  3311 1632 4779 4796 4291 ...
 $ Date   : POSIXct, format: "2019-01-31" "2019-01-31" "2019-01-31" "2019-01-31" ...
 $ Created: POSIXct, format: "2019-01-31" "2019-01-31" "2019-01-31" "2019-01-31" ...
 $ Closed : POSIXct, format: "2019-02-01" "2019-02-01" "2019-02-01" "2019-02-01" ...

I ve tried without success:

selectInput('y', 'Y', choices = c("All", unique(as.character(closed_srs3$Name))))
output$outplot1 <- renderPlot({

    Created <- as.Date(closed_srs3$Date, '%m/%d/%Y')
    ggplot(closed_srs3, aes(y=input$y, x=Created))+
      geom_line()
Νick
  • 35
  • 8
  • 1
    Welcome to Stack Overflow! Please keep in mind that it is more likely to get the help you need if you share a reproducible example and an expected output. Meanwhile those two posts would help [How to make a great R reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) and [How do I ask a good question](https://stackoverflow.com/help/how-to-ask)? – DS_UNI Jun 07 '19 at 11:25

0 Answers0