Github user elbamos commented on the pull request: https://github.com/apache/incubator-zeppelin/pull/208#issuecomment-195114026 Yes you did understand - I just checked and I know why it didn't work for you, I'll fix it next time I'm in the code. The xtable package generates html, as a simple example. I will confess, I haven't tested the html functionality in quite a while-the reason is, anyone who wants html displayed, i can't think of a reason they wouldn't use the knitr interpreter. But it should work. Regarding the locked environment error, it seems like you've loaded a package that has a dependency on a package that defines a "Person" object. What happens when search the namespaces for Person? But honestly I've never seen that error before. > On Mar 10, 2016, at 5:46 PM, Jeff Steinmetz <notificati...@github.com> wrote: > > To confirm, are you saying this should return Zeppelin displayed html? (I may have misunderstood) > > ``` > %r > > cat("%html <h1>hello!</h1>â) > ``` > > If so, it outputs text as is (which still makes sense based on your explanation, since its not an HTML class?) > > %html <h1>hello!</h1> > > Do you have an example of how to create an HTML class in the interpreter? > > As an aside, while testing this I ran across a locked environment error > > ``` > setClass("Person", representation(name = "character", age = "numeric"), > prototype(name = NA_character_, age = NA_real_)) > ``` > > Returns an error: > <simpleError in assign(mname, def, where): cannot add bindings to a locked environment> > > > > From: elbamos > Reply-To: apache/incubator-zeppelin > Date: Thursday, March 10, 2016 at 1:18 PM > To: apache/incubator-zeppelin > Cc: Jeff Steinmetz > Subject: Re: [incubator-zeppelin] R Interpreter for Zeppelin (#208) > > In R, when a string gets returned to the repl by an expression, it gets formatted by calling print(). This is why the magic isn't working as you expect-R is adding formatting. If you write the string with cat() instead of print, it should work, and I'll fix if it doesn't. > > However, in R, html is generally created using the 'html' class. If an object of class 'html' is returned by this interpreter, it is passed to Zeppelin with the %html magic for native display. > > This is necessary to handle some kinds of interactive visualization. It also means the interpreter will properly display html created by R packages in the manner the user expects. > > While I'm somewhat open on this issue as well, I'm pretty sure that the current design is the one that R users will find the most natural. > > > On Mar 10, 2016, at 3:59 PM, Jeff Steinmetz <notificati...@github.com> wrote: > > > > This doesn't work as I would expect: > > > > %r > > print("%html <h1>HTML Works</h1>") > > and %table, %md, etc > > Shouldn't this work similar to other interpreters, and support the zeppelin display system? > > > > this returns rendered html in pyspark > > > > %pyspark > > > > print("%html <h1>HTML Works</h1>") > > as does > > > > %spark > > > > print("%html <h1>HTML Works</h1>") > > â > > Reply to this email directly or view it on GitHub. > > > > â > Reply to this email directly or view it on GitHub. > > > > â > Reply to this email directly or view it on GitHub. >
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---