Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8192467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:11:16+00:00 2026-06-07T04:11:16+00:00

I was wondering if there is a way in which its possible to integrate

  • 0

I was wondering if there is a way in which its possible to integrate the manipulate package or gWidgetsManipulate package so that their outputs can be viewable/manipulable in the html/markdown output file, as I think that this would be extremely useful when developing reproducible interactive research reports. I know that googleVis has some functionality that allows it to be integrated with knitr so that the outputs go into the html file by using options like results=’asis’ but googleVis is currently quite restrictive in its capabilities when using sliders for example.

If the package outputs of manipulate or gWidgetsManipulate hasn’t quite been integrated yet, would it be possible to suggest a workaround for the time being that will allow it to be viewed in the html file?

i.e. my current code in my Rmd file before running knitr-ing to html looks like the below…but I get the following errors.

```{r}
library(manipulate)
manipulate(plot(1:x), x = slider(5, 10))
```

with output

library(manipulate)
## Error: there is no package called 'manipulate'
manipulate(plot(1:x), x = slider(5, 10))
## Error: could not find function "manipulate"

so trying the package gWidgetsManipulate instead…

```{r}
library(gWidgetsManipulate)
manipulate(plot(1:x), x = slider(5, 10))
```

you get the error…

library("gWidgetsManipulate")
## Loading required package: gWidgets
manipulate(plot(1:x), x = slider(5, 10))
## Error: unable to find an inherited method for function ".gwindow", for signature "NULL"

I have tried to specify a guiToolkit to fix this error by using things like

options(guiToolkit="WWW")

but to no avail…

Any help would be greatly appreciated, thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T04:11:18+00:00Added an answer on June 7, 2026 at 4:11 am

    If you don’t absolutely need to use the gwidgets, I have a solution with Rook and googleVis that does what you want: displaying an interactive chart in html.

    The script for the slider: it contains a little javascript function to display the currently chosen value. It also submits the form at each change. You can easily change the min/max/… values here.

    slider_script <- '
      <input type="range" min="5" max="10" name="plot_max" value="%s" step="1" onchange="document.form1.submit(); showValue(this.value);" />
      <span id="range">%s</span>
      <script type="text/javascript">
      function showValue(newValue)
    {
        document.getElementById("range").innerHTML=newValue;
      }
    </script>
    '
    

    We build the code of the web page. The structure is typical for rook: html code is written inside res$write().

    ### this script builds the webpage
        webreport_app <- function(
          ){
          newapp = function(env) {
            req = Rook::Request$new(env)
            res = Rook::Response$new()
            # initialise variables for first execution
            if (is.null(req$POST())){
              plot_max <- 5
            } else{
              plot_max <- as.numeric(req$POST()[["plot_max"]])
            }
            res$write('<body style="font-family:Arial">')
            res$write("<H3>My App</H3>")
            res$write('<form name = "form1" method="POST">\n')
            res$write('<br> Number of dots: \n')
            res$write(sprintf(slider_script, plot_max, plot_max))
            res$write('<br><input type="submit" name="Go!">\n</form>\n')
            if (!is.null(req$POST())) {    
              # generate the plot
              library(googleVis)
              data_for_plot <- data.frame(x_var = 1:plot_max, y_var = 1:plot_max)
              Scatter1 <- gvisScatterChart(data_for_plot)
              # extract chart script
              chart_script <- capture.output(print(Scatter1, 'chart'))
              # write to html
              res$write(paste(chart_script, collapse="\n"))
              res$write("<br><br></body></html>")
            }
            res$finish()
          }
          return(newapp)
        }
    

    And finally launch the setup and launch the html server via Rook:

    library(Rook)
    
    # launch the web app
    if (exists("report_server")){
      report_server$remove(app, all = TRUE)
      report_server$stop()
      rm(report_server)
    }
    report_server = Rhttpd$new()
    report_server$add(app = webreport_app(), name = "My_app")
    report_server$start()
    report_server$browse("My_app")
    report_server$browse()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hi there i'm wondering that if is it possible to update a textfile which
I'm using Websphere portal 6.0 and I'm wondering if there's a way in which
I am wondering is there any way to execute following shell script, which waits
Just wondering is there any way I can check whether the url links to
I was wondering is there a way in PHP that you could tell where
I am wondering is there any way we can test the font size/color of
Wondering if there is any way to get the lambda expressions that result from
I was wondering if its possible to create variable names which are linked to
I was wondering is there a way to give the user a small guided
I was wondering is there a way in visual studio 2010 to search in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.