Giter Site home page Giter Site logo

Comments (6)

0ldM4j0r avatar 0ldM4j0r commented on August 19, 2024

The following link shows the app layouts achievable via shiny.

The app layouts are:

  • Sidebar Layout
  • Grid Layout
  • Tabsets (The layout used right now)
  • Navlists
  • Navbar Pages (The layout I believe is closest to the separate pages concept above)

from kaphishiny.

0ldM4j0r avatar 0ldM4j0r commented on August 19, 2024

A basic implementation of a multipage app is on the multiPageApp branch, now i need to automate graph generation from the tsv file.

from kaphishiny.

0ldM4j0r avatar 0ldM4j0r commented on August 19, 2024

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)'
)

from kaphishiny.

0ldM4j0r avatar 0ldM4j0r commented on August 19, 2024

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))
)

from kaphishiny.

gtng92 avatar gtng92 commented on August 19, 2024

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.

from kaphishiny.

0ldM4j0r avatar 0ldM4j0r commented on August 19, 2024

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.

from kaphishiny.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.