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
0
votes
2 answers

Subscript in R DT's footer with withTags()

I'm trying to add a superscript to a DataTables footer in a Shiny app (similar as here to the rownames/body). library(shiny) library(DT) ui <- fluidPage(dataTableOutput("table")) server <- function(input, output) { output$table <-…
bathyscapher
  • 1,615
  • 1
  • 13
  • 18
0
votes
1 answer

How to evaluate a list of cards in bslib::layout_column_wrap?

I am trying to display a list of cards in a 2d grid using the function bslib::layout_column_wrap(). However, I get a 1d grid with the cards positioned in one column instead of multiple columns. See a minimal reproducible example…
Gion Mors
  • 313
  • 1
  • 3
  • 20
0
votes
1 answer

Can't seem to install the "devtools" package

I need to install Devtools so i can download the 0.5.4 htmltools package from github, almost every package i try to install gives an error stating that the htmltools version i have is 0.5.2 but the package requires the 0.5.4 version, which i think…
0
votes
1 answer

R - markdown how to print list of dataframes to "Tabbed sections"

According bookdown documentation in 3.3, there is functionality to hide chunks in to the tabs. https://bookdown.org/yihui/rmarkdown/html-document.html I occasionally use it, but I can't figure out how to do it if I print dataframes via loops.…
prdel99
  • 159
  • 6
0
votes
0 answers

How to link to CSS with htmltools?

I understand htmltools can be used to link to a JavaScript file: htmltools::tags$script(src = "https://unpkg.com/mapbox-gl-leaflet/leaflet-mapbox-gl.js") But how would I link to a CSS file, for example:
DiamondJoe12
  • 1,879
  • 7
  • 33
  • 81
0
votes
1 answer

How do I attach a CSS dependency to my Shiny app with htmlDependency() and tagList() from htmltools

I'm trying to attach a custom css stylesheet to style my shiny app. However I haven't had much success. I know that there is many ways to do it, but according to chapter 4 of Outstanding UI with Shiny (right after figure 4.3) the best way to do so…
0
votes
0 answers

compress file size of exported leaflet html

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 information in the HTML. The data is the same for…
Beni
  • 191
  • 9
0
votes
1 answer

How to generate simple html table using Shiny and R without using renderTable function?

I'm really new to R/Shiny, I'm working on a project and I'm having a problem. Indeed, according to what I learned on the documentation, the renderTable function makes it possible to generate a datatable from a dataframe for example but, I do not…
0
votes
1 answer

R Shiny DT 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 following two approaches. How can I do…
Ed_Gravy
  • 1,841
  • 2
  • 11
  • 34
0
votes
1 answer

Print HTML formatted text in Jupyter with R from the list of citations of loaded packages

I have a R variable containing some html content inside, for exemple : myvar = "

Section Title

" I would like to print it not as

Section Title

but as a formated h3 title in html or markdown that jupyter notebook understands. I have…
vinalti
  • 966
  • 5
  • 26
0
votes
1 answer

How do I put a GLSL script into an `htmlDependency()`?

The htmltools::htmlDependency function allows me to set Javascript and CSS files as a dependency of a tag. This means I can have tags on a page that use the code without including multiple copies of it, and in rmarkdown, if I set self_contained:…
user2554330
  • 37,248
  • 4
  • 43
  • 90
0
votes
1 answer

Boostrap Buttons Wrapping when they shouldn't be

I can't see why the Search and Clear Buttons wrap onto the following line after Postcode. I've used the last example from the Button Addons code from here. https://getbootstrap.com/docs/4.0/components/input-group/. Whilst I have not included…
Chris
  • 1,449
  • 1
  • 18
  • 39
0
votes
0 answers

Looking for a pretty way to create expandable rows for columns with a lot of text

I was hoping to make a table that has expandable rows that may stay open when toggled. I wanted to put the columns with long amounts of text as expandable row details. The problem is when I use "details" in reactable to expand that column it's so…
s.libes
  • 61
  • 3
0
votes
0 answers

Package installation issue with R version 3.6.0

I have R 3.6.0 (and I'm currently obliged to use this version of R) and I'm facing the following problem. My goal is to install the 'shiny' package. I run install.packages("shiny",checkBuilt=TRUE, ask=FALSE) and this triggers the following…
Angelo
  • 1,594
  • 5
  • 17
  • 50
0
votes
0 answers

how to direct to the link via .tabsetpill

I would like to direct to the relevant link when I click on the .tabsetpill is there any way to get around this? Many thanks in advance. --- title: "" output: html_document --- # Quarterly Results {.tabset .tabset-fade .tabset-pills} ## [Caret…
Seyma Kalay
  • 2,037
  • 10
  • 22