Questions tagged [htmltools]

htmltools is an R package that contains tools for generating HTML output directly from R.

htmltools provides R users with a means to generate HTML output such as tags and styles directly from R. It provides additional development tools such as dependency identification and tag attribute management. htmltools provides much of the underlying HTML functionality for other common packages like Shiny and rmarkdown.

This tag should be used in questions that directly reference the htmltools package and could also be useful for questions related to other packages (like Shiny and rmarkdown) when the post involves functionality imported into that package from htmltools.

72 questions
2
votes
1 answer

How to to insert R (interactive or not) graphics in the tooltips of a ggiraph?

I'd like ultimately to insert R (interactive or not) graphics in the tooltips of a ggiraph. Using an iframe as I successfully did before with leaflet, it would look like this: library(ggplot2) library(ggiraph) library(htmltools) p <- {ggplot() + …
doana
  • 35
  • 4
2
votes
0 answers

Add an interactive Check Box to a Flexdashboard in R

I'm building a flexdashboard out in an RMarkdown document, but I've run into issues with interactivity. So I've gotten a solution in shiny up and running, but the issue is that at my place of work we don't have any shiny server options out there to…
obewanjacobi
  • 458
  • 2
  • 12
2
votes
0 answers

Package ‘htmltools’ version 0.5.0 cannot be unloaded

I am trying to launch a RShiny App but each time i get this message error: Package ‘htmltools’ version 0.5.0 cannot be unloaded: Error in unloadNamespace(package) : l'espace de noms ‘htmltools’ est importé par ‘shinydashboard’, ‘DT’, ‘htmlwidgets’,…
Sophie Cvl
  • 21
  • 1
2
votes
0 answers

The shiny package will not load after installation

I tried: install.packages('shiny') library(shiny) Got the following message: Error: package or namespace load failed for ‘shiny’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): there is no package called ‘htmltools’ In…
BHope
  • 135
  • 9
2
votes
1 answer

R code to save shiny.tag.list to html as the viewer->export->save as web page button does

I have a leaflet map that I have modified to have a special CSS for popups following the suggestions here. Now I want to save the result as an HTML web page. The resulting object is of type shiny.tag.list, which I can view with the viewer and export…
user3004015
  • 617
  • 1
  • 7
  • 14
2
votes
1 answer

Rmarkdown - printing a list of objects without showing those pesky [[indices]]

This will be a little wordy, as without proper context I cannot see how I can ask my question. Without going too much into details, in my summarytools package, I have dealt with by() objects by using a wrapper function for print.summarytools,…
Dominic Comtois
  • 10,230
  • 1
  • 39
  • 61
2
votes
1 answer

Boolean attributes in htmltools tags

I can create an HTML option tag using htmltools::tags$option("abc", value = 1) and I get But how do I add the boolean attribute selected to it, to get ?
user2554330
  • 37,248
  • 4
  • 43
  • 90
1
vote
0 answers

How can I correctly resize all plotly plots encapsulated in a javascript tab?

I am new to handling html objects from R and I am having an issue while trying to create html tabs from named lists (the target document is html pages obtained from RMarkdown). Long story short, while I am able to create the tabs that I want using…
MiddleC
  • 11
  • 2
1
vote
1 answer

How to display a SVG image in shiny

I would like to display in my web application an SVG image that I have hosted in the images folder. First I tried to display it with a tag but it didn't work: ui <- fluidPage( tags$img(src = "./images/SVG_Logo.svg", width = "99px") ) Then I used…
Wardiam
  • 127
  • 7
1
vote
1 answer

How to add an icon in front of specific column name of reactable

R Gurus, I am struggling with a unique problem with adding an icon in front of certain column names in a reactable. library(htmltools) library(dplyr) library(tippy) data <- as_tibble(mtcars[1:6, ], rownames = "car") %>% select(car:hp) # See the…
M.Qasim
  • 1,827
  • 4
  • 33
  • 58
1
vote
1 answer

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 refresh the map. It takes about 10 seconds Digging…
Spruce
  • 13
  • 3
1
vote
0 answers

Add dependencies of shinydashboardplus in shiny

Below is the code for shiny app that I am using. shiny::shinyApp(fluidPage( # Give the page a title titlePanel("Telephones by region"), # Generate a row with a sidebar sidebarLayout( # Define the sidebar with one…
Williams86
  • 320
  • 1
  • 11
1
vote
1 answer

How to use htmltools::attachDependencies?

Here is an example of how I "manually" add a HTML dependency to a datatable. This works fine. When I try with attachDependencies, the dependency is not attached. library(DT) library(htmltools) dep <- htmlDependency( name = "colResize", version…
Stéphane Laurent
  • 75,186
  • 15
  • 119
  • 225
1
vote
1 answer

How to align and draw borders on complex header for datatable in R shiny?

I am using the container to create the header using the example from here. I am looking to center align the 'Overall' and 'In-patient' header. I tried adding the align = 'left' parameter in th function. It considers only two columns while center…
sutsabs
  • 431
  • 2
  • 11
1
vote
1 answer

How to style reactable cell background with custom grouping select

I have some data I'm trying to present using reactable. I am styling the background of cells based on the value. There are a number of groups in the data which are useful, but the groups themselves do not have an aggregated value that is useful. The…
TrainingPizza
  • 1,090
  • 3
  • 12