[R] R2HTML problem

Joris Meys jorismeys at gmail.com
Mon Jun 7 14:07:27 CEST 2010


Err, sorry, forget my previous message. It has nothing to do with
Tinn-R or Eclipse. If you save that code in a file and you use the
source command in the console, you get the same output. Tinn-R and
Eclipse both source the code to R instead of sending it line by line.

To get what you want, you need to use the HTML() function on all
output you want to get correctly into the frame:

HTMLStart(getwd(),HTMLframe=FALSE, Title="My report",autobrowse=FALSE)
HTML(as.title("This is my first title"))
x <- 1
y<- 2
HTML(x+y)
HTMLStop()

This works from Tinn-R, Eclipse and by sourcing the file at the command line.

Cheers
Joris


On Mon, Jun 7, 2010 at 2:00 PM, Joris Meys <jorismeys at gmail.com> wrote:
> It must be something with your version of R, I tried it both in
> Eclipse and in Tinn-R, and I get exactly what should come out (see
> attached file). Try updating R and R2HTML first, the problem might be
> there somewhere.
>
> Cheers
> Joris
>
> On Mon, Jun 7, 2010 at 1:31 PM, Iago Conde <iagoconde at gmail.com> wrote:
>> I installed the whole eclipse and StatET thing... I try the R2HTML example
>>
>> library(R2HTML)
>>
>> HTMLStart(getwd(),HTMLframe=FALSE, Title="My report",autobrowse=FALSE)
>> as.title("This is my first title")
>> x <- 1
>> y<- 2
>> x+y
>> HTMLStop()
>>
>>
>> and still doesnt work, when I open the index html file... the title is "My
>> report" and the HTMLStop() message of
>> "Generated on: Mon Jun 07 13:36:24 2010 - R2HTML" also appears on the web
>> browser... but nothing else.
>> On Mon, Jun 7, 2010 at 3:09 AM, Joris Meys <jorismeys at gmail.com> wrote:
>>>
>>> Take a look at eclipse :
>>> http://www.splusbook.com/R_Eclipse_StatET.pdf
>>>
>>> And yes, your program should work. The editor doesn't do anything else
>>> but sending your code to R. It is R that decides what to do with it.
>>>
>>> Cheers
>>> Joris
>>>
>>> On Sun, Jun 6, 2010 at 7:25 PM, RGtk2User <iagoconde at gmail.com> wrote:
>>> >
>>> > Which editor could I use on Windows? The program that already works with
>>> > TinnR... will work with this new editor? Thanks!
>>> >
>>> > On Sat, Jun 5, 2010 at 11:40 PM, Joris FA Meys [via R] <
>>> >
>>> > ml-node+2244582-437396255-277940 at n4.nabble.com<ml-node%2B2244582-437396255-277940 at n4.nabble.com>
>>> >> wrote:
>>> >
>>> >> Tinn-R is using the R2HTML package itself for communication with R.
>>> >> You could ask JC Faria who wrote Tinn-R what exactly is going on
>>> >> there. You might get more help here :
>>> >> http://sourceforge.net/projects/tinn-r/support
>>> >>
>>> >> Personally, I'd just use a different editor in this case. I love
>>> >> Tinn-R, but it's no use programming in an editor that interacts with
>>> >> your code.
>>> >>
>>> >> Cheers
>>> >> Joris
>>> >>
>>> >> On Sat, Jun 5, 2010 at 4:57 PM, RGtk2User <[hidden
>>> >> email]<http://user/SendEmail.jtp?type=node&node=2244582&i=0>>
>>> >> wrote:
>>> >>
>>> >> >
>>> >> > Im developing an application with R and Gtk+. It's just a simple GUI
>>> >> which
>>> >> > helps new users to interactuate with R. Thing is, when you do a
>>> >> statistical
>>> >> > analysis, I also want to provide a HTML report, but HTMLStart doesnt
>>> >> > work
>>> >>
>>> >> > propperly when executing from TinnR. It does create the file but not
>>> >> empty,
>>> >> > I've tried some examples from different websites, and it's always the
>>> >> same..
>>> >> > it works if I execute it from the R prompt, but doesnt when it comes
>>> >> > to
>>> >> > execute it from TinnR. So, any ideas? Im trying to divide the
>>> >> > internal
>>> >> code
>>> >> > of the HTMLStart function to find out where it crashes, but I couldnt
>>> >> find
>>> >> > it yet. Thanks in advance
>>> >> >
>>> >> > ______________________________________________
>>> >> > [hidden email]
>>> >> > <http://user/SendEmail.jtp?type=node&node=2244582&i=1>mailing list
>>> >> > https://stat.ethz.ch/mailman/listinfo/r-help
>>> >> > PLEASE do read the posting guide
>>> >> http://www.R-project.org/posting-guide.html
>>> >> > and provide commented, minimal, self-contained, reproducible code.
>>> >> >
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> Ghent University
>>> >> Faculty of Bioscience Engineering
>>> >> Department of Applied mathematics, biometrics and process control
>>> >>
>>> >> tel : +32 9 264 59 87
>>> >> [hidden email] <http://user/SendEmail.jtp?type=node&node=2244582&i=2>
>>> >> -------------------------------
>>> >> Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php
>>> >>
>>> >> ______________________________________________
>>> >> [hidden email]
>>> >> <http://user/SendEmail.jtp?type=node&node=2244582&i=3>mailing list
>>> >> https://stat.ethz.ch/mailman/listinfo/r-help
>>> >> PLEASE do read the posting guide
>>> >> http://www.R-project.org/posting-guide.html
>>> >> and provide commented, minimal, self-contained, reproducible code.
>>> >>
>>> >>
>>> >> ------------------------------
>>> >>  View message @
>>> >> http://r.789695.n4.nabble.com/R2HTML-problem-tp2244294p2244582.html
>>> >> To unsubscribe from R2HTML problem, click here< (link removed) ==>.
>>> >>
>>> >>
>>> >>
>>> >
>>> > --
>>> > View this message in context:
>>> > http://r.789695.n4.nabble.com/R2HTML-problem-tp2244294p2245140.html
>>> > Sent from the R help mailing list archive at Nabble.com.
>>> >
>>> >        [[alternative HTML version deleted]]
>>> >
>>> > ______________________________________________
>>> > R-help at r-project.org mailing list
>>> > https://stat.ethz.ch/mailman/listinfo/r-help
>>> > PLEASE do read the posting guide
>>> > http://www.R-project.org/posting-guide.html
>>> > and provide commented, minimal, self-contained, reproducible code.
>>> >
>>>
>>>
>>>
>>> --
>>> Ghent University
>>> Faculty of Bioscience Engineering
>>> Department of Applied mathematics, biometrics and process control
>>>
>>> tel : +32 9 264 59 87
>>> Joris.Meys at Ugent.be
>>> -------------------------------
>>> Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php
>>
>>
>
>
>
> --
> Ghent University
> Faculty of Bioscience Engineering
> Department of Applied mathematics, biometrics and process control
>
> tel : +32 9 264 59 87
> Joris.Meys at Ugent.be
> -------------------------------
> Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php
>



-- 
Ghent University
Faculty of Bioscience Engineering
Department of Applied mathematics, biometrics and process control

tel : +32 9 264 59 87
Joris.Meys at Ugent.be
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php



More information about the R-help mailing list