Questions tagged [htmltools]
htmltools is an R package that contains tools for generating HTML output directly from R.
htmltools
82
questions
0
votes
1
answer
69
views
How to write/share an html document created in R using crosstalk and leaflet
I've created a filterable map using crosstalk and leaflet in R, and I'd like to share this with coworkers as a standalone document:
library(leaflet)
library(htmltools)
library(htmlwidgets)
#example ...
0
votes
0
answers
27
views
How to have a ReactShinyInput inside a ReactShinyWidget?
I have just started playing with the reactR package in the hope of having React elements usable with Shiny R.
I have got project with the scaffoldReactWidget function setup and working quite nicely so ...
0
votes
1
answer
51
views
Print single charts via loop with highcharter in rmarkdown
I would like to print single charts created in a for loop as tabbed content using the packages rmarkdown and highcharter.
So far i have only succeeded in displaying all the graphics in one tab.
The ...
2
votes
1
answer
531
views
How to create an adaptative list (ul+li) using htmltools?
In the context of a Shiny application, I'm trying to display warnings thrown by some call as an HTML list.
I could get all warnings as a character vector thanks to this answer, and I'm now actually ...
0
votes
1
answer
398
views
Change column header color
I have a Shiny app that displays a DT table. I would like to be able to change the color of the column headers (not the column header text color) from black to something else say #34a8eb. I tried the ...
0
votes
1
answer
31
views
appendContent can't be used in a Shiny render call
The funciton addSearchGoogle from leaflet.extras is throwing this error in a Shiny-app:
Warning in renderWidget(instance) : Ignoring appended content;
appendContent can't be used in a Shiny render ...
1
vote
1
answer
301
views
Shiny Leaflet Slow with HTML Labels
I'm building a shiny app with a leaflet map that updates based on user selection. When I got to working on the labels for shiny, I noticed my performance dropped upon hitting my action button to ...
0
votes
1
answer
51
views
Saving svg generated in shiny
I am trying to save an .svg that I generate inside a shiny app using htmltools (MRE below). This requires adding the svg namespace to the svg tag with xmlns:xlink="http://www.w3.org/1999/xlink&...
0
votes
0
answers
434
views
reduce file size of exported leaflet html by linking several layers to the same data (json) instead of keeping the information separately
Generating leaflet html's easily results in a 50-75 MB file (depending on the number of layers). However, they can be zipped to reduce the file size by factors. So i guess there is lots of repetitive ...
1
vote
1
answer
88
views
Why my Html function in R is not working:?
This is my code:
card_function <- function(title,paragraph,tags){
div(
class = "card",
div(class = "header"),
div(
class = "info",
p(class = &...
0
votes
0
answers
879
views
Updated htmltools doesn't install anyway
In Rmarkdown my problem is
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'htmltools' 0.5.6 is already loaded, but >= 0.5.7 is required
Calls: ... ...
2
votes
1
answer
236
views
Apply a recursive function to a nested list while preserving the classes of sublists
I have a nested list called inputs:
library(htmltools)
library(shiny)
inputs = tagList(
selectInput('first', 'FIRST', letters),
checkboxInput('second', 'SECOND')
)
str(inputs, max.level = 1)
...
1
vote
1
answer
54
views
Grandchildren elements are not rendered, using R htmltools::tagList to generate HTML for paged pdf
I am trying to create a paged pdf report in R, using pagedown together with htmltools::tagList. Each page in the report is supposed to bring together field survey results, mainly images ande tables, ...
0
votes
1
answer
982
views
R Shiny & htmltools - Extracting a tag by name
I have a tagList of two Shiny inputs, inputs. I would like to extract the label tag for each input. I was hoping that htmltools had a getter function to achieve this but in the absence of one I've ...
1
vote
2
answers
89
views
Insert image (file or R object) into existing html file from R script
I include two ggplotly() graphics in a html file, eg.
library(ggplot2)
library(plotly)
library(htmltools)
g1 <- ggplot(data=data.frame(x=1:10, y=1:10)) +
geom_point(aes(x=x, y=y))
g2 <- ...