r - Add JavaScript to R2HTML -
can add javascript r2html?
adding sample <script> tags r2html code below
htmlheadertext ="sample report" htmlfile =htmlinitfile(outdir = getwd() , filename = "sample" , extension = "html" , title = "r output" , cssfile = paste(getwd(), "/html_tables.css", sep="") , htmlframe = false , usegrid = false , uselatex = false) html(htmlheadertext, file = htmlfile) html(dataset, row.names = false) htmlendfile() thanks ahead
sure, give string usual.
html('<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>', file = htmlfile) it wrapped in <p class="character">. if don't want that, append file manually
cat('<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>', file = htmlfile, append = true, sep = " ")
Comments
Post a Comment