[R] R to HTML problem

Jim Lemon drjimlemon at gmail.com
Sun Jun 7 07:39:18 CEST 2015


Hi Pijush,
Does this do what you want?

#title~"Output of Class Prediction"
cat("The output result is given below\n")
iris.df<-cbind(iris[1:10,1:4],rep("",10),iris[1:10,1:4])
names(iris.df)<-c(names(iris)[1:4],"",names(iris)[1:4])
delim.table(iris.df,html=TRUE)

Save the result as "sample.R" in the R working directory and then:

library(prettyR)
htmlize("sample.R")

Jim


On Fri, Jun 5, 2015 at 8:57 PM, Pijush Das <topijush at gmail.com> wrote:
> Hi r-help,
>
>
> I am trying to develop a program in R where I want to display the
> out put result in a HTML page. But I unable to put two tables side by side
> which is required to me. Another problem is that I unable to put the title
> in the center of the
> page. The code is given below.
>
>
> Please help me.
>
> library(R2HTML)
> filepath<-"C:/Users/Desktop/Selection"
> target <- HTMLInitFile(filepath,filename="sample",
> BackGroundColor="#FFFFFF")
> HTML.title("Output of Class Prediction",file=target, HR=3)
> HTML("<br>",file=target)
> HTML("The output result is given below:",file=target)
> HTML(iris[1:10,1:4], file=target,align = "left",Border = 1, innerBorder = 1)
> HTML(iris[1:10,1:4], file=target,align = "left",Border = 1, innerBorder = 1)
> HTMLEndFile()
>
>
> Thank you.
>
> Regards
> Pijush
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.



More information about the R-help mailing list