Questions tagged [formattable]

Use this tag for questions related to the formattable package. The formattable package is designed for applying formatting on vectors and data frames in the R programming language.

The package

is designed for applying formatting on vectors and data frames to make data presentation easier, richer, more flexible and hopefully convey more information.

An overview and introduction to the package can be found on the package website

224 questions
57
votes
2 answers

Difference between String, FormattableString, IFormattable

FormattableString has been Introduced in C# 6.0. As we can use same string formatting using string object why is there need of using FormattableString or IFormattable. Whats difference between three? My Code var name = "Pravin"; var…
Nitin Varpe
  • 10,450
  • 6
  • 36
  • 60
28
votes
2 answers

Controlling column widths with Format-Table

I am trying to get the last reboot time of some PCs from a list. When I use foreach ($pc in $pclist) { Get-CimInstance -ClassName win32_operatingsystem -ComputerName $pc | select csname, lastbootuptime } The output comes as…
screenslaver
  • 563
  • 1
  • 8
  • 17
14
votes
1 answer

How to use R package "formattable" in shiny dashboard?

Below is the code I have written. I am not able to use formattable in my shiny. formattable helps in formatting the tables and improves the visualization also. library("shinydashboard") library("shiny") library("formattable") body <-…
Akshit
  • 349
  • 1
  • 3
  • 10
11
votes
2 answers

Is the sample on java.util.Formattable incorrect?

Using the example given for java.util.Formattable (modified to actually set values in the constructor), things seem to work mostly correctly: import java.nio.CharBuffer; import java.util.Formatter; import java.util.Formattable; import…
Pokechu22
  • 4,984
  • 9
  • 37
  • 62
9
votes
2 answers

printing blanks instead of NA's when using formattable in R

Consider the example data.frame df <- data.frame( id = 1:4, name = c("Bob", "Ashley", "James", "David"), age = c(48, NA, 40, 28), test1_score = c(18.9, 19.5, NA, 12.9), stringsAsFactors = FALSE) I'm using the R package formattable to…
bmacGTPM
  • 577
  • 3
  • 12
7
votes
1 answer

Command for exporting/saving table made with Formattable package in R

https://cran.r-project.org/web/packages/formattable/formattable.pdf I've been using the Formattable package to make some nice looking tables in R. I'm trying to save the tables as images (or really any file format) but can't find a command that…
Laura D
  • 71
  • 1
  • 1
  • 4
6
votes
1 answer

How to collapse groups of row values within a table using formattable?

I am interested in using tools within the formattable R package, but I want to only shows in the table where there is a change. That is, I want hierarchical row labeling that is offered in the kableExtra package via the collapse_rows() function. For…
Kalin
  • 1,691
  • 2
  • 16
  • 22
6
votes
1 answer

Possible to combine DT, formattable and shiny?

Formattable have some easy options to format table, for example: library(shiny) library(DT) library(formattable) df <- formattable(iris, lapply(1:4, function(col){ area(col = col) ~ color_tile("red", "green") This can later be coverted to a…
MLEN
  • 2,162
  • 2
  • 20
  • 36
5
votes
0 answers

R- How to add html formatting to a table that works with blastula?

Blastula appears to not respect the