}
height =
looks like you missed the comma but not just that, the arrangement of the open and closing round and curly brackets. best try
output$fancyPlot <- renderPlot({
#I get the plot_list_final which has some plots (1 or 2 or 3 or 4).
n <- lenght(plot_list_final )
nCol <- floor(sqrt(n))
p_last = do.call("grid.arrange", c(plot_list_final, ncol=nCol))
return(p_last)
},
height = function() {
if_else(length(plot_list_final) == 1,
400,
800)}
)
I advise you not to hold back potentially useful information i.e. the content of your error