Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Data Science by (18.4k points)
edited by

How can I insert tabulators in R with markdown code? I wanted to display .sth as shown:

attendees:  33

sick leave:    1

presenters:  5

The above text is in the format of markdown text and the number is in the form of inline R code.  If we use space it won't work since there is variably spaced font.

I am working on both HTML and PDF output. I have a windows-10 platform.

When I tried researching on markdown table it gave me too big a markdown table. If I get a huge markdown table on how to create tabs and tabbed browsing. This is very complicated. So I tried using \t even this didn't work.

1 Answer

0 votes
by (36.8k points)

You can use add-inBeautifyR which gives a beautiful table as the output.

To get it you need to go to the banner under Tools. There is an option called as Add-ins button load BeautifyR

OR

You can use the Kable. You need to install the Kable package

Code to install is as follows:

install.packages("Kable")

WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/

Installing package into ‘C:/Users/Documents/R/win-library/3.6’

(as ‘lib’ is unspecified)

Warning in install.packages :

  package ‘Kable’ is not available (for R version 3.6.3)

Improve your knowledge in data science from scratch using Data Science tutorial  

Related questions

0 votes
1 answer
asked Apr 26, 2020 in Data Science by blackindya (18.4k points)
0 votes
1 answer
asked Oct 11, 2020 in Data Science by blackindya (18.4k points)

Browse Categories

...