Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: No method asJSON S3 class: histogram #37

Open
ghost opened this issue Dec 23, 2019 · 0 comments
Open

Error: No method asJSON S3 class: histogram #37

ghost opened this issue Dec 23, 2019 · 0 comments

Comments

@ghost
Copy link

ghost commented Dec 23, 2019

I am trying to call simple R file which will call hist function.
But when I call this function, I am getting following error

Error: No method asJSON S3 class: histogram

Execution halted

below is my R code

x <- c(1,2,3,4,5,6,6)

hist(x, col="lightblue")

and here is my index.js file


var express = require('express');
var R = require("r-script");

var app = express(); app.get('/', function (req, res) 
{      
	var out = R("example/sample.R")
  .data("hello world", 20)
  .callSync();
    console.log(out);

}) 
var server = app.listen(8081, function () {      var port = server.address().port   
   console.log(`Example app listening at http://localhost:${port}`)})

Similarly I cannot execute any other R function. example
x <- c(1,2,3,4,5,6,6) print(summary(x));

I am getting error as below

Error: No method asJSON S3 class: table

Execution halted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants