Giter Club home page Giter Club logo

Comments (9)

uyedaj avatar uyedaj commented on July 28, 2024

Same thing happens on newest arbor.arborworkflows.com

from flow.

danlamanna avatar danlamanna commented on July 28, 2024

I'm not familiar with R, but is it possible something is wrong with the script itself?

The error (which seems to be spawned by cardoonPlot) is that a png file under /tmp doesn't exist. I ran the script under strace and it looks like the only time it tries to access that file is to read it - so that analysis isn't creating the image anywhere.

pinging @jeffbaumes in case he has any ideas.

from flow.

curtislisle avatar curtislisle commented on July 28, 2024

thanks for looking into this, Dan. CardoonPlot has malfunctioned before, but I have never looked inside to determine why/when.

Unfortunately, the scatterplot function in arbor seems to not be working for the CSVs I tried yet, either, or I would have suggested this alternative.

On Jul 6, 2016, at 11:30 AM, Dan LaManna [email protected] wrote:

I'm not familiar with R, but is it possible something is wrong with the script itself?

The error (which seems to be spawned by cardoonPlot) is that a png file under /tmp doesn't exist. I ran the script under strace and it looks like the only time it tries to access that file is to read it - so that analysis isn't creating the image anywhere.

pinging @jeffbaumes https://github.com/jeffbaumes if he has any ideas.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub #202 (comment), or mute the thread https://github.com/notifications/unsubscribe/ACDZ9iWgZMBPn_8MBcfVHdJaLBenIr-vks5qS8oygaJpZM4JF0rq.

from flow.

curtislisle avatar curtislisle commented on July 28, 2024

Josef,
I will look at this tomorrow morning if it is still broken.

On Jul 6, 2016, at 11:45 AM, [email protected] [email protected] wrote:

thanks for looking into this, Dan. CardoonPlot has malfunctioned before, but I have never looked inside to determine why/when.

Unfortunately, the scatterplot function in arbor seems to not be working for the CSVs I tried yet, either, or I would have suggested this alternative.

On Jul 6, 2016, at 11:30 AM, Dan LaManna <[email protected] mailto:[email protected]> wrote:

I'm not familiar with R, but is it possible something is wrong with the script itself?

The error (which seems to be spawned by cardoonPlot) is that a png file under /tmp doesn't exist. I ran the script under strace and it looks like the only time it tries to access that file is to read it - so that analysis isn't creating the image anywhere.

pinging @jeffbaumes https://github.com/jeffbaumes if he has any ideas.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub #202 (comment), or mute the thread https://github.com/notifications/unsubscribe/ACDZ9iWgZMBPn_8MBcfVHdJaLBenIr-vks5qS8oygaJpZM4JF0rq.

from flow.

jeffbaumes avatar jeffbaumes commented on July 28, 2024

I vaguely remembered @hafen (original cardoonTools author) mentioning that sometimes expression() is not needed. And indeed if you remove the expression() wrapping from the trellis example it seems to work. Unfortunately I cannot recall the details of when it is needed and when it is not.

from flow.

uyedaj avatar uyedaj commented on July 28, 2024

You're correct @jeffbaumes, in the toy example I gave above, removing expression() does indeed fix it. However, this does not solve the problem in my real example (sorry for not testing the toy example enough...). Rather I don't need to use cardoonTools to recreate the problem at all, and the result is different whether I run the script interactively in R or when I run it through Arbor. In fact, I can run this exact script in R via SSH on arbor1 without any issue, but it fails when run via Arbor (same error message as above):
{ "description": "", "inputs": [], "mode": "r", "name": "TrellisFigure", "outputs": [ { "format": "png.base64", "id": "GLSplot", "name": "GLSplot", "type": "image" } ], "script": "y <- rnorm(100)\nx <- rnorm(100)\n\nglsfit <- nlme::gls(y~x)\n\nfile <- tempfile(fileext = sprintf(\".%s\", \"png\"))\nresult <- list()\npng(file, width=1000, height=1000, res=72)\nplot(glsfit)\ndev.off()\nbytes <- file.info(file)$size\nresult$png <- base64enc:::base64encode(readBin(file, \"raw\", n = bytes))\nfile.remove(file)\n\nGLSplot <- result$png" }

from flow.

uyedaj avatar uyedaj commented on July 28, 2024

The issue is sourcing the script does not tell R to make the plot for Trellis graphics. Not an Arbor problem: http://stackoverflow.com/questions/6783120/r-package-lattice-wont-plot-if-run-using-source
Thanks guys.

from flow.

jeffbaumes avatar jeffbaumes commented on July 28, 2024

Wow that is a crazy one. Thanks for digging into it.

from flow.

hafen avatar hafen commented on July 28, 2024

The cardoonPlot() function is looking for either an expression (when using base R graphics) or a lattice or ggplot2 object. It doesn't know what to do with a function (I suppose it should check for that).

So the first json shown should be changed to something like this:

{ "description": "", "inputs": [], "mode": "r", "name": "TrellisFigure", "outputs": [ { "format": "png.base64", "id": "plot", "name": "plot", "type": "image" } ], "script": "library(cardoonTools)\nlibrary(lattice) \nattach(mtcars)\n\n# create factors with value labels \ngear.f<-factor(gear,levels=c(3,4,5),\n \tlabels=c(\"3gears\",\"4gears\",\"5gears\")) \ncyl.f <-factor(cyl,levels=c(4,6,8),\n labels=c(\"4cyl\",\"6cyl\",\"8cyl\")) \n\n# kernel density plot \nplotObj <- densityplot(~mpg, \n \tmain=\"Density Plot\", \n \txlab=\"Miles per Gallon\")\n \t\n\nplot <- cardoonPlot(expression(plotObj))\nplot <- plot$png" }

from flow.

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.