13 Matching Annotations
  1. Aug 2023
  2. May 2022
    1. A shiny tag is defined by: A name such as span, div, h1 …, accessed with tag$name. Some attributes, which can be accessed with tag$attribs. Children, which can be accessed with tag$children. A class, namely shiny.tag.

      Shiny tags are stored in R as a list with three name values: name ( name of tag), attribute (list of key pairs), children (other html components inside), class usually R object class shiny.tag

    2. nterestingly, if you want to convert raw HTML to R code, there is a Shiny App developed by Alan Dipert from RStudio, namely html2R, shown Figure 2.3. Non-standard attributes (like data-toggle) are not correctly processed, but there are solutions. This will save you precious time! A more recent approach is developed in Chapter 21 and has been used internally to develop some of the RinteRface templates.

      This may be useful for FIGMA to shiny conversion.

    3. When building custom templates, you will be writing a lot of tags. It might seem too much work to always write tags$<TAG_NAME>. There exists a function called withTags(), which allows you to get rid of all tags$. Hence, the whole code is much easier to write and read:

      withTags( ) looks to be a easy way to avoid using tags$<TAG_NAME> too often.