Closed ArtPoon closed 6 years ago
The following link shows the app layouts achievable via shiny.
The app layouts are:
A basic implementation of a multipage app is on the multiPageApp
branch, now i need to automate graph generation from the tsv file.
I am trying to generate graphs from the tsv file after its creation (just to reduce complexity, eventually this will happen during creation), but I get the error:Error in xy.coords: 'x' is a list, but does not have components 'x' and 'y'
when using the following code:
observe(
lapply(seq_len(length(parameters[[input$specificModel]])), function(i) {
output[[paste0("meanTrajectoryOf", parameters[[input$specificModel]][[i]])]] <- renderPlot(
plot(
sapply(split(trace[[parameters[[input$specificModel]][[i]]]]*trace$weight, trace$n), sum),
ylim=c(0, 2),
type='o',
xlab='Iteration',
ylab=paste0('Mean', parameters[[input$specificModel]][[i]]),
cex.lab=1,
main=paste0('Trajectory of Mean ', parameters[[input$specificModel]][[i]], ' (', input$specificModel, ' Model)')
)
)
})
)
which is based on the following code from the example-yule.R
file:
plot(
sapply(split(trace$lambda*trace$weight, trace$n), sum),
ylim=c(0, 2),
type='o',
xlab='Iteration',
ylab='Mean lambda',
cex.lab=1,
main='Trajectory of Mean Lambda (Yule Model, 1000 particles)'
)
I commented out the following four lines but that didn't change the error:
ylim=c(0, 2),
type='o',
xlab='Iteration',
ylab=paste0('Mean', parameters[[input$specificModel]][[i]]),
cex.lab=1,
main=paste0('Trajectory of Mean ', parameters[[input$specificModel]][[i]], ' (', input$specificModel, ' Model)')
I plotted rnorm(100)
just to check that the plot outputting is working fine and it is.
After that I hard coded it and the error still occurs, code used:
output[[paste0("meanTrajectoryOflambda")]] <- renderPlot(
plot( sapply(split(trace$lambda*trace$weight, trace$n), sum))
)
A comment on the error below mentioned earlier in this thread:
Error in xy.coords(x, y, xlabel, ylabel, log) :
'x' is a list, but does not have components 'x' and 'y'
This occurs when the .tsv
file contains only the header row, and no data. Usually when either the run breaks, or the run isn't finished and hasn't fully completed creating the file.
I will be closing this issue since I managed to reorganize the app in multiple pages. I also managed to plot the mean trajectory of the parameters after the tsv generation.
I will be opening two issues one to workout the errors from the posterior approximation graphs, and the other to implement plotting mean trajectory and posterior approximation graphs during tsv generation.
Currently the entire analysis setup is contained on a single page, two columns (interface on left and feedback on right). This looks quite overwhelming for the user, and I think it would be simpler and cleaner to partition this workflow into separate pages as follows: