I'm just lost in r shiny and to be perfectly honest I probably bitten off too much for my meager coding skills however I need help.
My r shiny code works except for updating the data once I add need information to the excel file that the data is coming from. The code basically takes data I have collected inside a greenhouse and spits out numerous graphs (I should have 110 graphs over 8 different pages). The graphs work until I try to make the data upload and processing more reactive.
I know that reactiveFileReader
exists however I am not sure how it interacts with me loading my data through one specific sheet of the excel file.
df<-read_excel("Crop Registration 2022.xlsx",sheet="CSV")
If I have to make a new file that is purely just the data that is possible.
Secondly I do a lot of "processing" of the data once I upload it. This processing is to prepare it for all of the graphs. Currently this all occurs before the server and ui parts of the code. I have tried putting it in reactive({})
but it isn't working. I get an error that object x not found (x being something like data_beef
in the examples I provide below).
Examples of the "processing" that I conduct.
df$Date<-as.Date(df$Date)
df<-arrange(df,Date)
df$Number_Leaves<-as.numeric(df$Number_Leaves)
data_beef<-filter(df,Type=="BEEF")
data_beef_numbleaves<-filter(data_beef,Number_Leaves!="NA")