When it's as simple as in Boris's example, just use cat() statements. Otherwise, go to CRAN, find the packages page ("Table of available packages, sorted by name"), and search for "html" -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 6/3/15, 9:38 AM, "valerio orfano" <ingorfano at hotmail.com> wrote:>Hi Boris and thanx a lot > >Which library should i be using to create html in R? > >rgds valerio >On 03 Jun 2015, at 18:08, Boris Steipe <boris.steipe at utoronto.ca> wrote: > >> ... as in: the png exists in a directory that is accessible to the >>server? >> >> That would be as simple as creating a HTML document with the following >>contents: >> >> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" >>"http://www.w3.org/TR/html4/strict.dtd"> >> <html> >> <head><title="Image"></head> >> <body><img src="myPNGimage.png"></body> >> </html> >> >> >> B. >> >> >> On Jun 3, 2015, at 11:32 AM, valerio orfano <ingorfano at hotmail.com> >>wrote: >> >>> Hi All >>> >>> Is there any chance in R to convert a png and/or pdf file into an html? >>> Any example? >>> >>> I?ve tried htmlize but doesn?t work out! >>> >>> Rgds valerio >>> ______________________________________________ >>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >>> 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. >> > >______________________________________________ >R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >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.
Or try the brand-new way: http://www.r-pkg.org/search.html?q=html --Ista On Wed, Jun 3, 2015 at 1:06 PM, MacQueen, Don <macqueen1 at llnl.gov> wrote:> When it's as simple as in Boris's example, just use cat() statements. > > Otherwise, go to CRAN, find the packages page ("Table of available > packages, sorted by name"), and search for "html" > > -Don > > -- > Don MacQueen > > Lawrence Livermore National Laboratory > 7000 East Ave., L-627 > Livermore, CA 94550 > 925-423-1062 > > > > > > On 6/3/15, 9:38 AM, "valerio orfano" <ingorfano at hotmail.com> wrote: > >>Hi Boris and thanx a lot >> >>Which library should i be using to create html in R? >> >>rgds valerio >>On 03 Jun 2015, at 18:08, Boris Steipe <boris.steipe at utoronto.ca> wrote: >> >>> ... as in: the png exists in a directory that is accessible to the >>>server? >>> >>> That would be as simple as creating a HTML document with the following >>>contents: >>> >>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" >>>"http://www.w3.org/TR/html4/strict.dtd"> >>> <html> >>> <head><title="Image"></head> >>> <body><img src="myPNGimage.png"></body> >>> </html> >>> >>> >>> B. >>> >>> >>> On Jun 3, 2015, at 11:32 AM, valerio orfano <ingorfano at hotmail.com> >>>wrote: >>> >>>> Hi All >>>> >>>> Is there any chance in R to convert a png and/or pdf file into an html? >>>> Any example? >>>> >>>> I?ve tried htmlize but doesn?t work out! >>>> >>>> Rgds valerio >>>> ______________________________________________ >>>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >>>> 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. >>> >> >>______________________________________________ >>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >>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. > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.
Valerio, Actually htmlize works pretty well. I used it for a long time. If you want to get the most help from this forum you need to provide a reproducible example showing htmlize not working for you. Nevertheless, today I would recommend going with RMarkdown. It may be overkill for your example, but if you want to produce HTML output in the future, it is good to know: http://rmarkdown.rstudio.com/ Thanks, Roger *************************************************************** This message and any attachments are for the named person's use only. This message may contain confidential, proprietary or legally privileged information. No right to confidential or privileged treatment of this message is waived or lost by an error in transmission. If you have received this message in error, please immediately notify the sender by e-mail, delete the message, any attachments and all copies from your system and destroy any hard copies. You must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message or any attachments if you are not the intended recipient. -----Original Message----- From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Ista Zahn Sent: Wednesday, June 03, 2015 1:46 PM To: MacQueen, Don Cc: r-help at r-project.org Subject: Re: [R] R convert pdf/png to html Or try the brand-new way: http://www.r-pkg.org/search.html?q=html --Ista On Wed, Jun 3, 2015 at 1:06 PM, MacQueen, Don <macqueen1 at llnl.gov> wrote:> When it's as simple as in Boris's example, just use cat() statements. > > Otherwise, go to CRAN, find the packages page ("Table of available > packages, sorted by name"), and search for "html" > > -Don > > -- > Don MacQueen > > Lawrence Livermore National Laboratory > 7000 East Ave., L-627 > Livermore, CA 94550 > 925-423-1062 > > > > > > On 6/3/15, 9:38 AM, "valerio orfano" <ingorfano at hotmail.com> wrote: > >>Hi Boris and thanx a lot >> >>Which library should i be using to create html in R? >> >>rgds valerio >>On 03 Jun 2015, at 18:08, Boris Steipe <boris.steipe at utoronto.ca> wrote: >> >>> ... as in: the png exists in a directory that is accessible to the >>>server? >>> >>> That would be as simple as creating a HTML document with the >>>following >>>contents: >>> >>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" >>>"http://www.w3.org/TR/html4/strict.dtd"> >>> <html> >>> <head><title="Image"></head> >>> <body><img src="myPNGimage.png"></body> </html> >>> >>> >>> B. >>> >>> >>> On Jun 3, 2015, at 11:32 AM, valerio orfano <ingorfano at hotmail.com> >>>wrote: >>> >>>> Hi All >>>> >>>> Is there any chance in R to convert a png and/or pdf file into an html? >>>> Any example? >>>> >>>> I?ve tried htmlize but doesn?t work out! >>>> >>>> Rgds valerio >>>> ______________________________________________ >>>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >>>>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. >>> >> >>______________________________________________ >>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >>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. > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.
I have the following code: setwd("C:/Users/Administrator/Desktop") cat("<!DOCTYPE html>",file="treemap.html", append=TRUE,sep='\n') cat("<html>",file="treemap.html", append=TRUE,sep='\n') cat("<body>",file="treemap.html", append=TRUE,sep='\n') cat("<h1>TreeMap</h1>",file="treemap.html", append=TRUE,sep='\n') cat("<img src='Storage001.png'>","treemap.html", append=TRUE,sep='\n') cat("</body>",file="treemap.html", append=TRUE,sep='\n') cat("</html>",file="treemap.html", append=TRUE,sep='\n') but this tag is not getting written in html file cat("<img src='Storage001.png'>","treemap.html", append=TRUE,sep='\n?) so i cannot display the img my html belowe the resulting html <!DOCTYPE html> <html> <body> <h1>TreeMap</h1> </body> </html> <!DOCTYPE html> <html> <body> <h1>TreeMap</h1> </body> </html> Any help rgds valerio On 03 Jun 2015, at 19:06, MacQueen, Don <macqueen1 at llnl.gov> wrote:> When it's as simple as in Boris's example, just use cat() statements. > > Otherwise, go to CRAN, find the packages page ("Table of available > packages, sorted by name"), and search for "html" > > -Don > > -- > Don MacQueen > > Lawrence Livermore National Laboratory > 7000 East Ave., L-627 > Livermore, CA 94550 > 925-423-1062 > > > > > > On 6/3/15, 9:38 AM, "valerio orfano" <ingorfano at hotmail.com> wrote: > >> Hi Boris and thanx a lot >> >> Which library should i be using to create html in R? >> >> rgds valerio >> On 03 Jun 2015, at 18:08, Boris Steipe <boris.steipe at utoronto.ca> wrote: >> >>> ... as in: the png exists in a directory that is accessible to the >>> server? >>> >>> That would be as simple as creating a HTML document with the following >>> contents: >>> >>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" >>> "http://www.w3.org/TR/html4/strict.dtd"> >>> <html> >>> <head><title="Image"></head> >>> <body><img src="myPNGimage.png"></body> >>> </html> >>> >>> >>> B. >>> >>> >>> On Jun 3, 2015, at 11:32 AM, valerio orfano <ingorfano at hotmail.com> >>> wrote: >>> >>>> Hi All >>>> >>>> Is there any chance in R to convert a png and/or pdf file into an html? >>>> Any example? >>>> >>>> I?ve tried htmlize but doesn?t work out! >>>> >>>> Rgds valerio >>>> ______________________________________________ >>>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >>>> 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. >>> >> >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> 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. >
I forgot to use fie= treemap.html :) On 04 Jun 2015, at 10:53, valerio orfano <ingorfano at hotmail.com> wrote:> I have the following code: > > setwd("C:/Users/Administrator/Desktop") > cat("<!DOCTYPE html>",file="treemap.html", append=TRUE,sep='\n') > cat("<html>",file="treemap.html", append=TRUE,sep='\n') > cat("<body>",file="treemap.html", append=TRUE,sep='\n') > cat("<h1>TreeMap</h1>",file="treemap.html", append=TRUE,sep='\n') > cat("<img src='Storage001.png'>","treemap.html", append=TRUE,sep='\n') > cat("</body>",file="treemap.html", append=TRUE,sep='\n') > cat("</html>",file="treemap.html", append=TRUE,sep='\n') > > > but this tag is not getting written in html file > cat("<img src='Storage001.png'>","treemap.html", append=TRUE,sep='\n?) > > so i cannot display the img my html > > belowe the resulting html > > <!DOCTYPE html> > <html> > <body> > <h1>TreeMap</h1> > </body> > </html> > <!DOCTYPE html> > <html> > <body> > <h1>TreeMap</h1> > </body> > </html> > > > Any help > > rgds valerio > On 03 Jun 2015, at 19:06, MacQueen, Don <macqueen1 at llnl.gov> wrote: > >> When it's as simple as in Boris's example, just use cat() statements. >> >> Otherwise, go to CRAN, find the packages page ("Table of available >> packages, sorted by name"), and search for "html" >> >> -Don >> >> -- >> Don MacQueen >> >> Lawrence Livermore National Laboratory >> 7000 East Ave., L-627 >> Livermore, CA 94550 >> 925-423-1062 >> >> >> >> >> >> On 6/3/15, 9:38 AM, "valerio orfano" <ingorfano at hotmail.com> wrote: >> >>> Hi Boris and thanx a lot >>> >>> Which library should i be using to create html in R? >>> >>> rgds valerio >>> On 03 Jun 2015, at 18:08, Boris Steipe <boris.steipe at utoronto.ca> wrote: >>> >>>> ... as in: the png exists in a directory that is accessible to the >>>> server? >>>> >>>> That would be as simple as creating a HTML document with the following >>>> contents: >>>> >>>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" >>>> "http://www.w3.org/TR/html4/strict.dtd"> >>>> <html> >>>> <head><title="Image"></head> >>>> <body><img src="myPNGimage.png"></body> >>>> </html> >>>> >>>> >>>> B. >>>> >>>> >>>> On Jun 3, 2015, at 11:32 AM, valerio orfano <ingorfano at hotmail.com> >>>> wrote: >>>> >>>>> Hi All >>>>> >>>>> Is there any chance in R to convert a png and/or pdf file into an html? >>>>> Any example? >>>>> >>>>> I?ve tried htmlize but doesn?t work out! >>>>> >>>>> Rgds valerio >>>>> ______________________________________________ >>>>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >>>>> 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. >>>> >>> >>> ______________________________________________ >>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >>> 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. >> >