I have inputfile with my database and i want to make calculation on it.
I'm begginer with shiny app and I don't know how can I filter or add the columns.
My database looks like this:
x1 | x2 | type1 | x3 | x4 | type2 |
---|---|---|---|---|---|
0.2 | 1.1 | Y | 6 | 4.2 | 0 |
0.5 | 3.3 | N | 1.8 | 7.0 | 0 |
0.8 | 0.5 | Y | 2.5 | 11 | 1 |
My question in how can I make simple calculation like x1+x2, if database is from my own inputfile like this:
ui <- fluidPage(fileInput('file', label = "Read file.csv", accept ="text/csv")
in server I use:
data <- reactive(read_csv2(input$plik$datapath))
but my problem is how can i use expresion like data$x1 or my calculation like data$x2*data$x3.