att / rcloud

Collaborative data analysis and visualization
http://rcloud.social
MIT License
430 stars 142 forks source link

rcloud.call.notebook with non-R cells #2644

Open gordonwoodhull opened 5 years ago

gordonwoodhull commented 5 years ago

Currently in rcloud.call.notebook we ignore any cells that are not R:

    for (o in p[match(sort.int(i), i)]) {
      if (grepl("^part.*\\.R$", o$filename)) { ## R code
        expr <- parse(text=o$content, srcfile = srcfilecopy(o$filename, o$content))
        result <- eval(expr, e)
        rcloud.flush.plot()
      } else if (grepl("^part.*\\.md", o$filename)) { ## markdown
        ## FIXME: we ignore markdown for now ...
      }
    }

A user recently asked why Python cells don't work. I don't think there is any practical reason - of course we'd have to go through the language module rather than this direct eval.