How To Install R-highlight on CentOS 8

R-highlight is R Syntax Highlighter

Introduction

In this tutorial we learn how to install R-highlight on CentOS 8.

What is R-highlight

Syntax highlighter for R code based on the results of the R parser. Rendering in HTML and latex markup. Custom Sweave driver performing syntax highlighting of R code chunks.

We can use yum or dnf to install R-highlight on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install R-highlight.

Install R-highlight on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install R-highlight using dnf by running the following command:

sudo dnf -y install R-highlight

Install R-highlight on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install R-highlight using yum by running the following command:

sudo yum -y install R-highlight

How To Uninstall R-highlight on CentOS 8

To uninstall only the R-highlight package we can use the following command:

sudo dnf remove R-highlight

R-highlight Package Contents on CentOS 8

/usr/lib/.build-id
/usr/lib/.build-id/00
/usr/lib/.build-id/00/efeb30adb262a468399135bdb7f66e6553c2d6
/usr/lib64/R/library/highlight
/usr/lib64/R/library/highlight/DESCRIPTION
/usr/lib64/R/library/highlight/INDEX
/usr/lib64/R/library/highlight/Meta
/usr/lib64/R/library/highlight/Meta/Rd.rds
/usr/lib64/R/library/highlight/Meta/features.rds
/usr/lib64/R/library/highlight/Meta/hsearch.rds
/usr/lib64/R/library/highlight/Meta/links.rds
/usr/lib64/R/library/highlight/Meta/nsInfo.rds
/usr/lib64/R/library/highlight/Meta/package.rds
/usr/lib64/R/library/highlight/NAMESPACE
/usr/lib64/R/library/highlight/NEWS
/usr/lib64/R/library/highlight/NEWS.md
/usr/lib64/R/library/highlight/R
/usr/lib64/R/library/highlight/R/highlight
/usr/lib64/R/library/highlight/R/highlight.rdb
/usr/lib64/R/library/highlight/R/highlight.rdx
/usr/lib64/R/library/highlight/help
/usr/lib64/R/library/highlight/help/AnIndex
/usr/lib64/R/library/highlight/help/aliases.rds
/usr/lib64/R/library/highlight/help/highlight.rdb
/usr/lib64/R/library/highlight/help/highlight.rdx
/usr/lib64/R/library/highlight/help/paths.rds
/usr/lib64/R/library/highlight/highlight
/usr/lib64/R/library/highlight/highlight/filetypes.conf
/usr/lib64/R/library/highlight/highlight/langDefs
/usr/lib64/R/library/highlight/highlight/langDefs/4gl.lang
/usr/lib64/R/library/highlight/highlight/langDefs/a4c.lang
/usr/lib64/R/library/highlight/highlight/langDefs/abnf.lang
/usr/lib64/R/library/highlight/highlight/langDefs/abp.lang
/usr/lib64/R/library/highlight/highlight/langDefs/ada.lang
/usr/lib64/R/library/highlight/highlight/langDefs/agda.lang
/usr/lib64/R/library/highlight/highlight/langDefs/ahk.lang
/usr/lib64/R/library/highlight/highlight/langDefs/ampl.lang
/usr/lib64/R/library/highlight/highlight/langDefs/amtrix.lang
/usr/lib64/R/library/highlight/highlight/langDefs/applescript.lang
/usr/lib64/R/library/highlight/highlight/langDefs/arc.lang
/usr/lib64/R/library/highlight/highlight/langDefs/arm.lang
/usr/lib64/R/library/highlight/highlight/langDefs/as.lang
/usr/lib64/R/library/highlight/highlight/langDefs/asm.lang
/usr/lib64/R/library/highlight/highlight/langDefs/asp.lang
/usr/lib64/R/library/highlight/highlight/langDefs/aspect.lang
/usr/lib64/R/library/highlight/highlight/langDefs/ats.lang
/usr/lib64/R/library/highlight/highlight/langDefs/au3.lang
/usr/lib64/R/library/highlight/highlight/langDefs/avenue.lang
/usr/lib64/R/library/highlight/highlight/langDefs/awk.lang
/usr/lib64/R/library/highlight/highlight/langDefs/bat.lang
/usr/lib64/R/library/highlight/highlight/langDefs/bb.lang
/usr/lib64/R/library/highlight/highlight/langDefs/bbcode.lang
/usr/lib64/R/library/highlight/highlight/langDefs/bib.lang
/usr/lib64/R/library/highlight/highlight/langDefs/bms.lang
/usr/lib64/R/library/highlight/highlight/langDefs/bnf.lang
/usr/lib64/R/library/highlight/highlight/langDefs/boo.lang
/usr/lib64/R/library/highlight/highlight/langDefs/c.lang
/usr/lib64/R/library/highlight/highlight/langDefs/cb.lang
/usr/lib64/R/library/highlight/highlight/langDefs/cfc.lang
/usr/lib64/R/library/highlight/highlight/langDefs/chl.lang
/usr/lib64/R/library/highlight/highlight/langDefs/clipper.lang
/usr/lib64/R/library/highlight/highlight/langDefs/clojure.lang
/usr/lib64/R/library/highlight/highlight/langDefs/clp.lang
/usr/lib64/R/library/highlight/highlight/langDefs/cob.lang
/usr/lib64/R/library/highlight/highlight/langDefs/cs.lang
/usr/lib64/R/library/highlight/highlight/langDefs/css.lang
/usr/lib64/R/library/highlight/highlight/langDefs/d.lang
/usr/lib64/R/library/highlight/highlight/langDefs/diff.lang
/usr/lib64/R/library/highlight/highlight/langDefs/dot.lang
/usr/lib64/R/library/highlight/highlight/langDefs/dylan.lang
/usr/lib64/R/library/highlight/highlight/langDefs/e.lang
/usr/lib64/R/library/highlight/highlight/langDefs/ebnf.lang
/usr/lib64/R/library/highlight/highlight/langDefs/erl.lang
/usr/lib64/R/library/highlight/highlight/langDefs/euphoria.lang
/usr/lib64/R/library/highlight/highlight/langDefs/exp.lang
/usr/lib64/R/library/highlight/highlight/langDefs/f77.lang
/usr/lib64/R/library/highlight/highlight/langDefs/f90.lang
/usr/lib64/R/library/highlight/highlight/langDefs/flx.lang
/usr/lib64/R/library/highlight/highlight/langDefs/frink.lang
/usr/lib64/R/library/highlight/highlight/langDefs/fs.lang
/usr/lib64/R/library/highlight/highlight/langDefs/go.lang
/usr/lib64/R/library/highlight/highlight/langDefs/haskell.lang
/usr/lib64/R/library/highlight/highlight/langDefs/hcl.lang
/usr/lib64/R/library/highlight/highlight/langDefs/html.lang
/usr/lib64/R/library/highlight/highlight/langDefs/httpd.lang
/usr/lib64/R/library/highlight/highlight/langDefs/hx.lang
/usr/lib64/R/library/highlight/highlight/langDefs/icl.lang
/usr/lib64/R/library/highlight/highlight/langDefs/icn.lang
/usr/lib64/R/library/highlight/highlight/langDefs/idl.lang
/usr/lib64/R/library/highlight/highlight/langDefs/idlang.lang
/usr/lib64/R/library/highlight/highlight/langDefs/ili.lang
/usr/lib64/R/library/highlight/highlight/langDefs/inc_luatex.lang
/usr/lib64/R/library/highlight/highlight/langDefs/ini.lang
/usr/lib64/R/library/highlight/highlight/langDefs/inp.lang
/usr/lib64/R/library/highlight/highlight/langDefs/io.lang
/usr/lib64/R/library/highlight/highlight/langDefs/iss.lang
/usr/lib64/R/library/highlight/highlight/langDefs/j.lang
/usr/lib64/R/library/highlight/highlight/langDefs/java.lang
/usr/lib64/R/library/highlight/highlight/langDefs/js.lang
/usr/lib64/R/library/highlight/highlight/langDefs/jsp.lang
/usr/lib64/R/library/highlight/highlight/langDefs/lbn.lang
/usr/lib64/R/library/highlight/highlight/langDefs/ldif.lang
/usr/lib64/R/library/highlight/highlight/langDefs/lgt.lang
/usr/lib64/R/library/highlight/highlight/langDefs/lhs.lang
/usr/lib64/R/library/highlight/highlight/langDefs/lisp.lang
/usr/lib64/R/library/highlight/highlight/langDefs/lotos.lang
/usr/lib64/R/library/highlight/highlight/langDefs/ls.lang
/usr/lib64/R/library/highlight/highlight/langDefs/lsl.lang
/usr/lib64/R/library/highlight/highlight/langDefs/lua.lang
/usr/lib64/R/library/highlight/highlight/langDefs/ly.lang
/usr/lib64/R/library/highlight/highlight/langDefs/m.lang
/usr/lib64/R/library/highlight/highlight/langDefs/make.lang
/usr/lib64/R/library/highlight/highlight/langDefs/mel.lang
/usr/lib64/R/library/highlight/highlight/langDefs/mercury.lang
/usr/lib64/R/library/highlight/highlight/langDefs/mib.lang
/usr/lib64/R/library/highlight/highlight/langDefs/miranda.lang
/usr/lib64/R/library/highlight/highlight/langDefs/ml.lang
/usr/lib64/R/library/highlight/highlight/langDefs/mo.lang
/usr/lib64/R/library/highlight/highlight/langDefs/mod2.lang
/usr/lib64/R/library/highlight/highlight/langDefs/mod3.lang
/usr/lib64/R/library/highlight/highlight/langDefs/mpl.lang
/usr/lib64/R/library/highlight/highlight/langDefs/ms.lang
/usr/lib64/R/library/highlight/highlight/langDefs/mssql.lang
/usr/lib64/R/library/highlight/highlight/langDefs/n.lang
/usr/lib64/R/library/highlight/highlight/langDefs/nas.lang
/usr/lib64/R/library/highlight/highlight/langDefs/nbc.lang
/usr/lib64/R/library/highlight/highlight/langDefs/nice.lang
/usr/lib64/R/library/highlight/highlight/langDefs/nrx.lang
/usr/lib64/R/library/highlight/highlight/langDefs/nsi.lang
/usr/lib64/R/library/highlight/highlight/langDefs/nut.lang
/usr/lib64/R/library/highlight/highlight/langDefs/nxc.lang
/usr/lib64/R/library/highlight/highlight/langDefs/oberon.lang
/usr/lib64/R/library/highlight/highlight/langDefs/objc.lang
/usr/lib64/R/library/highlight/highlight/langDefs/octave.lang
/usr/lib64/R/library/highlight/highlight/langDefs/oorexx.lang
/usr/lib64/R/library/highlight/highlight/langDefs/os.lang
/usr/lib64/R/library/highlight/highlight/langDefs/oz.lang
/usr/lib64/R/library/highlight/highlight/langDefs/pas.lang
/usr/lib64/R/library/highlight/highlight/langDefs/php.lang
/usr/lib64/R/library/highlight/highlight/langDefs/pike.lang
/usr/lib64/R/library/highlight/highlight/langDefs/pl.lang
/usr/lib64/R/library/highlight/highlight/langDefs/pl1.lang
/usr/lib64/R/library/highlight/highlight/langDefs/pov.lang
/usr/lib64/R/library/highlight/highlight/langDefs/pro.lang
/usr/lib64/R/library/highlight/highlight/langDefs/progress.lang
/usr/lib64/R/library/highlight/highlight/langDefs/ps.lang
/usr/lib64/R/library/highlight/highlight/langDefs/ps1.lang
/usr/lib64/R/library/highlight/highlight/langDefs/psl.lang
/usr/lib64/R/library/highlight/highlight/langDefs/pure.lang
/usr/lib64/R/library/highlight/highlight/langDefs/py.lang
/usr/lib64/R/library/highlight/highlight/langDefs/pyx.lang
/usr/lib64/R/library/highlight/highlight/langDefs/q.lang
/usr/lib64/R/library/highlight/highlight/langDefs/qmake.lang
/usr/lib64/R/library/highlight/highlight/langDefs/qu.lang
/usr/lib64/R/library/highlight/highlight/langDefs/r.lang
/usr/lib64/R/library/highlight/highlight/langDefs/rb.lang
/usr/lib64/R/library/highlight/highlight/langDefs/rebol.lang
/usr/lib64/R/library/highlight/highlight/langDefs/rexx.lang
/usr/lib64/R/library/highlight/highlight/langDefs/rnc.lang
/usr/lib64/R/library/highlight/highlight/langDefs/s.lang
/usr/lib64/R/library/highlight/highlight/langDefs/sas.lang
/usr/lib64/R/library/highlight/highlight/langDefs/sc.lang
/usr/lib64/R/library/highlight/highlight/langDefs/scala.lang
/usr/lib64/R/library/highlight/highlight/langDefs/scilab.lang
/usr/lib64/R/library/highlight/highlight/langDefs/sh.lang
/usr/lib64/R/library/highlight/highlight/langDefs/sma.lang
/usr/lib64/R/library/highlight/highlight/langDefs/smalltalk.lang
/usr/lib64/R/library/highlight/highlight/langDefs/sml.lang
/usr/lib64/R/library/highlight/highlight/langDefs/sno.lang
/usr/lib64/R/library/highlight/highlight/langDefs/spec.lang
/usr/lib64/R/library/highlight/highlight/langDefs/spn.lang
/usr/lib64/R/library/highlight/highlight/langDefs/sql.lang
/usr/lib64/R/library/highlight/highlight/langDefs/sybase.lang
/usr/lib64/R/library/highlight/highlight/langDefs/tcl.lang
/usr/lib64/R/library/highlight/highlight/langDefs/tcsh.lang
/usr/lib64/R/library/highlight/highlight/langDefs/test_re.lang
/usr/lib64/R/library/highlight/highlight/langDefs/tex.lang
/usr/lib64/R/library/highlight/highlight/langDefs/ttcn3.lang
/usr/lib64/R/library/highlight/highlight/langDefs/txt.lang
/usr/lib64/R/library/highlight/highlight/langDefs/vala.lang
/usr/lib64/R/library/highlight/highlight/langDefs/vb.lang
/usr/lib64/R/library/highlight/highlight/langDefs/verilog.lang
/usr/lib64/R/library/highlight/highlight/langDefs/vhd.lang
/usr/lib64/R/library/highlight/highlight/langDefs/xml.lang
/usr/lib64/R/library/highlight/highlight/langDefs/xpp.lang
/usr/lib64/R/library/highlight/highlight/langDefs/y.lang
/usr/lib64/R/library/highlight/highlight/langDefs/yaiff.lang
/usr/lib64/R/library/highlight/highlight/langDefs/znn.lang
/usr/lib64/R/library/highlight/highlight/themes
/usr/lib64/R/library/highlight/highlight/themes/acid.style
/usr/lib64/R/library/highlight/highlight/themes/bipolar.style
/usr/lib64/R/library/highlight/highlight/themes/blacknblue.style
/usr/lib64/R/library/highlight/highlight/themes/bright.style
/usr/lib64/R/library/highlight/highlight/themes/contrast.style
/usr/lib64/R/library/highlight/highlight/themes/darkblue.style
/usr/lib64/R/library/highlight/highlight/themes/darkness.style
/usr/lib64/R/library/highlight/highlight/themes/desert.style
/usr/lib64/R/library/highlight/highlight/themes/easter.style
/usr/lib64/R/library/highlight/highlight/themes/emacs.style
/usr/lib64/R/library/highlight/highlight/themes/golden.style
/usr/lib64/R/library/highlight/highlight/themes/greenlcd.style
/usr/lib64/R/library/highlight/highlight/themes/ide-anjuta.style
/usr/lib64/R/library/highlight/highlight/themes/ide-codewarrior.style
/usr/lib64/R/library/highlight/highlight/themes/ide-eclipse.style
/usr/lib64/R/library/highlight/highlight/themes/ide-kdev.style
/usr/lib64/R/library/highlight/highlight/themes/ide-msvs2008.style
/usr/lib64/R/library/highlight/highlight/themes/ide-xcode.style
/usr/lib64/R/library/highlight/highlight/themes/jedit.style
/usr/lib64/R/library/highlight/highlight/themes/kwrite.style
/usr/lib64/R/library/highlight/highlight/themes/lucretia.style
/usr/lib64/R/library/highlight/highlight/themes/matlab.style
/usr/lib64/R/library/highlight/highlight/themes/moe.style
/usr/lib64/R/library/highlight/highlight/themes/navy.style
/usr/lib64/R/library/highlight/highlight/themes/nedit.style
/usr/lib64/R/library/highlight/highlight/themes/neon.style
/usr/lib64/R/library/highlight/highlight/themes/night.style
/usr/lib64/R/library/highlight/highlight/themes/orion.style
/usr/lib64/R/library/highlight/highlight/themes/pablo.style
/usr/lib64/R/library/highlight/highlight/themes/peachpuff.style
/usr/lib64/R/library/highlight/highlight/themes/print.style
/usr/lib64/R/library/highlight/highlight/themes/rand01.style
/usr/lib64/R/library/highlight/highlight/themes/seashell.style
/usr/lib64/R/library/highlight/highlight/themes/the.style
/usr/lib64/R/library/highlight/highlight/themes/typical.style
/usr/lib64/R/library/highlight/highlight/themes/vampire.style
/usr/lib64/R/library/highlight/highlight/themes/vim-dark.style
/usr/lib64/R/library/highlight/highlight/themes/vim.style
/usr/lib64/R/library/highlight/highlight/themes/whitengrey.style
/usr/lib64/R/library/highlight/highlight/themes/zellner.style
/usr/lib64/R/library/highlight/html
/usr/lib64/R/library/highlight/html/00Index.html
/usr/lib64/R/library/highlight/html/HighlightWeaveLatex.html
/usr/lib64/R/library/highlight/html/Hweave.html
/usr/lib64/R/library/highlight/html/R.css
/usr/lib64/R/library/highlight/html/boxes_latex.html
/usr/lib64/R/library/highlight/html/css.parser.html
/usr/lib64/R/library/highlight/html/external_highlight.html
/usr/lib64/R/library/highlight/html/formatter_html.html
/usr/lib64/R/library/highlight/html/formatter_latex.html
/usr/lib64/R/library/highlight/html/getStyleFile.html
/usr/lib64/R/library/highlight/html/header_html.html
/usr/lib64/R/library/highlight/html/header_latex.html
/usr/lib64/R/library/highlight/html/highlight-package.html
/usr/lib64/R/library/highlight/html/highlight.html
/usr/lib64/R/library/highlight/html/highlight_output_types.html
/usr/lib64/R/library/highlight/html/highlight_themes.html
/usr/lib64/R/library/highlight/html/renderer.html
/usr/lib64/R/library/highlight/html/renderer_html.html
/usr/lib64/R/library/highlight/html/renderer_latex.html
/usr/lib64/R/library/highlight/html/simple_detective.html
/usr/lib64/R/library/highlight/html/styler.html
/usr/lib64/R/library/highlight/html/styler_assistant_latex.html
/usr/lib64/R/library/highlight/html/translator_latex.html
/usr/lib64/R/library/highlight/libs
/usr/lib64/R/library/highlight/libs/highlight.so
/usr/lib64/R/library/highlight/stylesheet
/usr/lib64/R/library/highlight/stylesheet/default.css

References

Summary

In this tutorial we learn how to install R-highlight on CentOS 8 using yum and dnf.