Quantcast

R2HTML output shows NULL

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

R2HTML output shows NULL

Erin Hodgess-2
Hello R People:

I am using the R2HTML program for the first time (actually yesterday),
and I have a question, please:

I am getting NULL in the webpage in several places, presumably where
NULL would appear on the screen.

How would I go about fixing that, please?

Thanks,
Erin


--
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: [hidden email]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: R2HTML output shows NULL

Jeff Newmiller
Haven't you been asked to provide an example of code that illustrates your problem often enough by now to anticipate the request in your first post?
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<[hidden email]>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.

Erin Hodgess <[hidden email]> wrote:

>Hello R People:
>
>I am using the R2HTML program for the first time (actually yesterday),
>and I have a question, please:
>
>I am getting NULL in the webpage in several places, presumably where
>NULL would appear on the screen.
>
>How would I go about fixing that, please?
>
>Thanks,
>Erin
>
>
>--
>Erin Hodgess
>Associate Professor
>Department of Computer and Mathematical Sciences
>University of Houston - Downtown
>mailto: [hidden email]
>
>______________________________________________
>[hidden email] 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.

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: R2HTML output shows NULL

glsnow
Jeff, there are also many times that people are told not to post HTML,
so this case would be a bit of a Catch 22.  Also some of us (well me
at least, I expect others have as well) have experienced this already
and fully understand what is being discussed without needing an
example (and for this case I don't know that those who don't already
understand what she is saying would benefit much from the example
without the output).

Erin,

I have seen the same thing (as well as all the output from the hist
function being printed and other things that are usually invisible)
and have not found a way to suppress/hide the usually invisible
output.

An alternative is the txtStart and friends functions in the
TeachingDemos package (which were inspired by, but not as fancy as,
the R2HTML package).  Like R2HTML those functions will copy your
session to a file (currently plain text, enhanced text (can be post
processed with the enscript program to provide color and embedded
graphics), or MS Word documents (via the R2wd package), .rtf files
(via the rtf package) are planned).  These functions by default do not
include output that is returned invisibly.

On Fri, Apr 27, 2012 at 2:06 PM, Jeff Newmiller
<[hidden email]> wrote:

> Haven't you been asked to provide an example of code that illustrates your problem often enough by now to anticipate the request in your first post?
> ---------------------------------------------------------------------------
> Jeff Newmiller                        The     .....       .....  Go Live...
> DCN:<[hidden email]>        Basics: ##.#.       ##.#.  Live Go...
>                                      Live:   OO#.. Dead: OO#..  Playing
> Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
> /Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
> ---------------------------------------------------------------------------
> Sent from my phone. Please excuse my brevity.
>
> Erin Hodgess <[hidden email]> wrote:
>
>>Hello R People:
>>
>>I am using the R2HTML program for the first time (actually yesterday),
>>and I have a question, please:
>>
>>I am getting NULL in the webpage in several places, presumably where
>>NULL would appear on the screen.
>>
>>How would I go about fixing that, please?
>>
>>Thanks,
>>Erin
>>
>>
>>--
>>Erin Hodgess
>>Associate Professor
>>Department of Computer and Mathematical Sciences
>>University of Houston - Downtown
>>mailto: [hidden email]
>>
>>______________________________________________
>>[hidden email] 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.
>
> ______________________________________________
> [hidden email] 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.



--
Gregory (Greg) L. Snow Ph.D.
[hidden email]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: R2HTML output shows NULL

Erin Hodgess-2
Hello!

Thank you.

I figured out the solution.

In the HTML.title function, there is an argument CSSstyle which is set
to NULL by default.  If I put " " in there, all is well.

Sincerely,
Erin


On Fri, Apr 27, 2012 at 4:52 PM, Greg Snow <[hidden email]> wrote:

> Jeff, there are also many times that people are told not to post HTML,
> so this case would be a bit of a Catch 22.  Also some of us (well me
> at least, I expect others have as well) have experienced this already
> and fully understand what is being discussed without needing an
> example (and for this case I don't know that those who don't already
> understand what she is saying would benefit much from the example
> without the output).
>
> Erin,
>
> I have seen the same thing (as well as all the output from the hist
> function being printed and other things that are usually invisible)
> and have not found a way to suppress/hide the usually invisible
> output.
>
> An alternative is the txtStart and friends functions in the
> TeachingDemos package (which were inspired by, but not as fancy as,
> the R2HTML package).  Like R2HTML those functions will copy your
> session to a file (currently plain text, enhanced text (can be post
> processed with the enscript program to provide color and embedded
> graphics), or MS Word documents (via the R2wd package), .rtf files
> (via the rtf package) are planned).  These functions by default do not
> include output that is returned invisibly.
>
> On Fri, Apr 27, 2012 at 2:06 PM, Jeff Newmiller
> <[hidden email]> wrote:
>> Haven't you been asked to provide an example of code that illustrates your problem often enough by now to anticipate the request in your first post?
>> ---------------------------------------------------------------------------
>> Jeff Newmiller                        The     .....       .....  Go Live...
>> DCN:<[hidden email]>        Basics: ##.#.       ##.#.  Live Go...
>>                                      Live:   OO#.. Dead: OO#..  Playing
>> Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
>> /Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
>> ---------------------------------------------------------------------------
>> Sent from my phone. Please excuse my brevity.
>>
>> Erin Hodgess <[hidden email]> wrote:
>>
>>>Hello R People:
>>>
>>>I am using the R2HTML program for the first time (actually yesterday),
>>>and I have a question, please:
>>>
>>>I am getting NULL in the webpage in several places, presumably where
>>>NULL would appear on the screen.
>>>
>>>How would I go about fixing that, please?
>>>
>>>Thanks,
>>>Erin
>>>
>>>
>>>--
>>>Erin Hodgess
>>>Associate Professor
>>>Department of Computer and Mathematical Sciences
>>>University of Houston - Downtown
>>>mailto: [hidden email]
>>>
>>>______________________________________________
>>>[hidden email] 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.
>>
>> ______________________________________________
>> [hidden email] 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.
>
>
>
> --
> Gregory (Greg) L. Snow Ph.D.
> [hidden email]



--
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: [hidden email]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: R2HTML output shows NULL

Joshua Wiley-2
In reply to this post by glsnow
On Fri, Apr 27, 2012 at 2:52 PM, Greg Snow <[hidden email]> wrote:

> Jeff, there are also many times that people are told not to post HTML,
> so this case would be a bit of a Catch 22.  Also some of us (well me
> at least, I expect others have as well) have experienced this already
> and fully understand what is being discussed without needing an
> example (and for this case I don't know that those who don't already
> understand what she is saying would benefit much from the example
> without the output).
>
> Erin,
>
> I have seen the same thing (as well as all the output from the hist
> function being printed and other things that are usually invisible)
> and have not found a way to suppress/hide the usually invisible
> output.

I have struggled with this for some time.  (embarrassingly, I
filed/assigned myself a bug report over 6 months ago) you can track
the status here:
https://r-forge.r-project.org/tracker/index.php?func=detail&aid=1628&group_id=405&atid=1643

It seems like there should be two solutions: A) somehow never grab
output that was meant to be invisible B) grab but then parse out such
output.  It is not too difficult to alter the internals of R2HTML to
not print NULLs, but at least the easy way is global.  I.e., any code
output that is only NULL is simply dropped, even though sometimes
there are legitimate cases.  This is essentially the latter approach
where there are the NULLs but clever printing avoids printing them.  I
have not had enough time to fully grasp the underlying workings of how
output is redirected and stored.  If anyone has suggestions, I would
be happy to hear them.  If anyone knows of nice guides/suggested
reading about how Sweave or the like work in R, I would also be
interested.  Everytime I have gone straight to the source code, I lose
sight of the forest for the trees =\

I have not forgotten or stopped working on it, but I was not the
original package author so I have a lot to learn about how it works
and I am swamped with classes and research presently so progress is
slow.

Josh





>
> An alternative is the txtStart and friends functions in the
> TeachingDemos package (which were inspired by, but not as fancy as,
> the R2HTML package).  Like R2HTML those functions will copy your
> session to a file (currently plain text, enhanced text (can be post
> processed with the enscript program to provide color and embedded
> graphics), or MS Word documents (via the R2wd package), .rtf files
> (via the rtf package) are planned).  These functions by default do not
> include output that is returned invisibly.
>
> On Fri, Apr 27, 2012 at 2:06 PM, Jeff Newmiller
> <[hidden email]> wrote:
>> Haven't you been asked to provide an example of code that illustrates your problem often enough by now to anticipate the request in your first post?
>> ---------------------------------------------------------------------------
>> Jeff Newmiller                        The     .....       .....  Go Live...
>> DCN:<[hidden email]>        Basics: ##.#.       ##.#.  Live Go...
>>                                      Live:   OO#.. Dead: OO#..  Playing
>> Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
>> /Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
>> ---------------------------------------------------------------------------
>> Sent from my phone. Please excuse my brevity.
>>
>> Erin Hodgess <[hidden email]> wrote:
>>
>>>Hello R People:
>>>
>>>I am using the R2HTML program for the first time (actually yesterday),
>>>and I have a question, please:
>>>
>>>I am getting NULL in the webpage in several places, presumably where
>>>NULL would appear on the screen.
>>>
>>>How would I go about fixing that, please?
>>>
>>>Thanks,
>>>Erin
>>>
>>>
>>>--
>>>Erin Hodgess
>>>Associate Professor
>>>Department of Computer and Mathematical Sciences
>>>University of Houston - Downtown
>>>mailto: [hidden email]
>>>
>>>______________________________________________
>>>[hidden email] 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.
>>
>> ______________________________________________
>> [hidden email] 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.
>
>
>
> --
> Gregory (Greg) L. Snow Ph.D.
> [hidden email]
>
> ______________________________________________
> [hidden email] 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.



--
Joshua Wiley
Ph.D. Student, Health Psychology
Programmer Analyst II, Statistical Consulting Group
University of California, Los Angeles
https://joshuawiley.com/

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: R2HTML output shows NULL

Jeff Newmiller
In reply to this post by glsnow
The key rule on this list is to post R code. And HTML is text in its raw form, so posting HTML source in a text message works fine, especially if it is trimmed to just show context. It is when the message itself is sent with MIME coding set to HTML that the formatting gets messed up and expectations of the author fall apart; e.g. that things like colored or bolded or large text will be visible to the readers.

I too occasionally see problems described that look like issues i have seen before, but often enough they turn out to be different and seeing code would have tipped me off. The most important reason to post examples is that the process of preparing a small example is often enough to allow the OP to figure out the answer themselves without even posting at all, and conserving ones chits for tough problems shows respect for the people on the list whose time you are requesting.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<[hidden email]>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.

Greg Snow <[hidden email]> wrote:

>Jeff, there are also many times that people are told not to post HTML,
>so this case would be a bit of a Catch 22.  Also some of us (well me
>at least, I expect others have as well) have experienced this already
>and fully understand what is being discussed without needing an
>example (and for this case I don't know that those who don't already
>understand what she is saying would benefit much from the example
>without the output).
>
>Erin,
>
>I have seen the same thing (as well as all the output from the hist
>function being printed and other things that are usually invisible)
>and have not found a way to suppress/hide the usually invisible
>output.
>
>An alternative is the txtStart and friends functions in the
>TeachingDemos package (which were inspired by, but not as fancy as,
>the R2HTML package).  Like R2HTML those functions will copy your
>session to a file (currently plain text, enhanced text (can be post
>processed with the enscript program to provide color and embedded
>graphics), or MS Word documents (via the R2wd package), .rtf files
>(via the rtf package) are planned).  These functions by default do not
>include output that is returned invisibly.
>
>On Fri, Apr 27, 2012 at 2:06 PM, Jeff Newmiller
><[hidden email]> wrote:
>> Haven't you been asked to provide an example of code that illustrates
>your problem often enough by now to anticipate the request in your
>first post?
>>
>---------------------------------------------------------------------------
>> Jeff Newmiller                        The     .....       .....  Go
>Live...
>> DCN:<[hidden email]>        Basics: ##.#.       ##.#.  Live
>Go...
>>                                      Live:   OO#.. Dead: OO#..
> Playing
>> Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
>> /Software/Embedded Controllers)               .OO#.       .OO#.
> rocks...1k
>>
>---------------------------------------------------------------------------
>> Sent from my phone. Please excuse my brevity.
>>
>> Erin Hodgess <[hidden email]> wrote:
>>
>>>Hello R People:
>>>
>>>I am using the R2HTML program for the first time (actually
>yesterday),
>>>and I have a question, please:
>>>
>>>I am getting NULL in the webpage in several places, presumably where
>>>NULL would appear on the screen.
>>>
>>>How would I go about fixing that, please?
>>>
>>>Thanks,
>>>Erin
>>>
>>>
>>>--
>>>Erin Hodgess
>>>Associate Professor
>>>Department of Computer and Mathematical Sciences
>>>University of Houston - Downtown
>>>mailto: [hidden email]
>>>
>>>______________________________________________
>>>[hidden email] 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.
>>
>> ______________________________________________
>> [hidden email] 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.
>
>
>
>--
>Gregory (Greg) L. Snow Ph.D.
>[hidden email]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: R2HTML output shows NULL

glsnow
In reply to this post by Joshua Wiley-2
Joshua,

The task call back mechanism passes on a flag to say if the output was
invisible or not, so the HTML functions would just need to look for
and honor that flag.  This is what the TeachingDemos versions do.

On Fri, Apr 27, 2012 at 4:07 PM, Joshua Wiley <[hidden email]> wrote:

> On Fri, Apr 27, 2012 at 2:52 PM, Greg Snow <[hidden email]> wrote:
>> Jeff, there are also many times that people are told not to post HTML,
>> so this case would be a bit of a Catch 22.  Also some of us (well me
>> at least, I expect others have as well) have experienced this already
>> and fully understand what is being discussed without needing an
>> example (and for this case I don't know that those who don't already
>> understand what she is saying would benefit much from the example
>> without the output).
>>
>> Erin,
>>
>> I have seen the same thing (as well as all the output from the hist
>> function being printed and other things that are usually invisible)
>> and have not found a way to suppress/hide the usually invisible
>> output.
>
> I have struggled with this for some time.  (embarrassingly, I
> filed/assigned myself a bug report over 6 months ago) you can track
> the status here:
> https://r-forge.r-project.org/tracker/index.php?func=detail&aid=1628&group_id=405&atid=1643
>
> It seems like there should be two solutions: A) somehow never grab
> output that was meant to be invisible B) grab but then parse out such
> output.  It is not too difficult to alter the internals of R2HTML to
> not print NULLs, but at least the easy way is global.  I.e., any code
> output that is only NULL is simply dropped, even though sometimes
> there are legitimate cases.  This is essentially the latter approach
> where there are the NULLs but clever printing avoids printing them.  I
> have not had enough time to fully grasp the underlying workings of how
> output is redirected and stored.  If anyone has suggestions, I would
> be happy to hear them.  If anyone knows of nice guides/suggested
> reading about how Sweave or the like work in R, I would also be
> interested.  Everytime I have gone straight to the source code, I lose
> sight of the forest for the trees =\
>
> I have not forgotten or stopped working on it, but I was not the
> original package author so I have a lot to learn about how it works
> and I am swamped with classes and research presently so progress is
> slow.
>
> Josh
>
>
>
>
>
>>
>> An alternative is the txtStart and friends functions in the
>> TeachingDemos package (which were inspired by, but not as fancy as,
>> the R2HTML package).  Like R2HTML those functions will copy your
>> session to a file (currently plain text, enhanced text (can be post
>> processed with the enscript program to provide color and embedded
>> graphics), or MS Word documents (via the R2wd package), .rtf files
>> (via the rtf package) are planned).  These functions by default do not
>> include output that is returned invisibly.
>>
>> On Fri, Apr 27, 2012 at 2:06 PM, Jeff Newmiller
>> <[hidden email]> wrote:
>>> Haven't you been asked to provide an example of code that illustrates your problem often enough by now to anticipate the request in your first post?
>>> ---------------------------------------------------------------------------
>>> Jeff Newmiller                        The     .....       .....  Go Live...
>>> DCN:<[hidden email]>        Basics: ##.#.       ##.#.  Live Go...
>>>                                      Live:   OO#.. Dead: OO#..  Playing
>>> Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
>>> /Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
>>> ---------------------------------------------------------------------------
>>> Sent from my phone. Please excuse my brevity.
>>>
>>> Erin Hodgess <[hidden email]> wrote:
>>>
>>>>Hello R People:
>>>>
>>>>I am using the R2HTML program for the first time (actually yesterday),
>>>>and I have a question, please:
>>>>
>>>>I am getting NULL in the webpage in several places, presumably where
>>>>NULL would appear on the screen.
>>>>
>>>>How would I go about fixing that, please?
>>>>
>>>>Thanks,
>>>>Erin
>>>>
>>>>
>>>>--
>>>>Erin Hodgess
>>>>Associate Professor
>>>>Department of Computer and Mathematical Sciences
>>>>University of Houston - Downtown
>>>>mailto: [hidden email]
>>>>
>>>>______________________________________________
>>>>[hidden email] 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.
>>>
>>> ______________________________________________
>>> [hidden email] 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.
>>
>>
>>
>> --
>> Gregory (Greg) L. Snow Ph.D.
>> [hidden email]
>>
>> ______________________________________________
>> [hidden email] 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.
>
>
>
> --
> Joshua Wiley
> Ph.D. Student, Health Psychology
> Programmer Analyst II, Statistical Consulting Group
> University of California, Los Angeles
> https://joshuawiley.com/



--
Gregory (Greg) L. Snow Ph.D.
[hidden email]

______________________________________________
[hidden email] 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.
Loading...