How properly use knit2html? - r

I'm trying to produce a HTML using that script:
title: "SQL"
date: "`r format(Sys.time(), '%Y-%m-%d')`"
output:
html_document:
keep_md: yes
---
```{r setup, echo = FALSE}
library(knitr)
path <- "drive"
extension <- "sql"
```
This document contains the code from all files with extension ``r extension`` in ``r paste0(getwd(), "/", path)``.
```{r, results = "asis", echo = FALSE}
fileNames <- list.files(path, pattern = sprintf(".*%s$", extension))
fileInfos <- file.info(paste0(path, fileNames))
for (fileName in fileNames) {
filePath <- paste0(path, fileName)
cat(sprintf("## File `%s` \n\n### Meta data \n\n", fileName))
cat(sprintf(
"| size (KB) | mode | modified |\n|---|---|---|\n %s | %s | %s\n\n",
round(fileInfos[filePath, "size"]/1024, 2),
fileInfos[filePath, "mode"],
fileInfos[filePath, "mtime"]))
cat(sprintf("### Content\n\n```\n%s\n```\n\n", paste(readLines(filePath), collapse = "\n")))
Using the same setup & R-scripts and same directories on a Windows machine works well. I suppose there is a problem with encoding.
Sometimes the execution begins with:
During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C"
2: Setting LC_COLLATE failed, using "C"
3: Setting LC_TIME failed, using "C"
4: Setting LC_MESSAGES failed, using "C"
5: Setting LC_MONETARY failed, using "C"
6: Setting LC_PAPER failed, using "C"
7: Setting LC_MEASUREMENT failed, using "C"
and the execution just hangs
Then I have to:
Sys.setenv(LANG="de_DE.UTF-8")
and re-execute. Following output appears:
processing file: all_SQLs.Rmd
|................ | 25%
inline R code fragments
|................................ | 50%
label: setup (with options)
List of 2
$ echo : logi FALSE
$ indent: chr " "
|................................................. | 75%
inline R code fragments
|.................................................................| 100%
label: unnamed-chunk-1 (with options)
List of 2
$ results: chr "asis"
$ echo : logi FALSE
output file:SQL.knit.md
/usr/lib/rstudio-server/bin/pandoc/pandoc +RTS -K512m -RTS SQL.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash- implicit_figures --output all_SQLs.html --smart --email-obfuscation none --self-contained --standalone --section-divs --template /usr/local/lib/R/site-library /rmarkdown/rmd/h/default.html --variable 'theme:bootstrap' --include-in-header /tmp/RtmpBkTBSH/rmarkdown-str50021b4e910.html --mathjax --variable 'mathjax- url:https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX- AMS-MML_HTMLorMML' --no-highlight --variable highlightjs=/usr/local/lib/R/site- library/rmarkdown/rmd/h/highlight
pandoc: Cannot decode byte '\xfc': Data.Text.Internal.Encoding.Fusion.streamUtf8: Invalid UTF-8 stream
Error: pandoc document conversion failed with error 1
I suppose there is a problem with encodings. However I tried all I could by setting the locale in R as well as in Ubuntu to one standard:
locale R
[1] LC_CTYPE=de_DE.UTF-8 LC_NUMERIC=C LC_TIME=de_DE.UTF-8
[4] LC_COLLATE=de_DE.UTF-8 LC_MONETARY=de_DE.UTF-8 LC_MESSAGES=de_DE.UTF-8
[7] LC_PAPER=de_DE.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C
Locale Ubuntu
LANG=de_DE.UTF-8
LANGUAGE=
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=
When using knit2html() instead of the Knit HTMLbutton in Rstudio `I'll get the following:
warning:
1: In readlines (con):
incomplete last line in '/SQL.Rmd'
2: In RegExpr (".. '? [Hh] [1-6] *> (*) </ [Hh] [1-6] *.?>", Html, perl = TRUE):
Input string 1 is incorrect UTF-8
3: In Grepl (i, html, perl = TRUE):
Input string 1 is incorrect UTF-8
4: In Grepl (i, html, perl = TRUE):
Input string 1 is incorrect UTF-8

Related

create PDF with preamble from rmarkdown::render

I am trying to create a PDF from R. I am successful from within RStudio (choosing "Knit to PDF"), but I get an error invoking from R (either with ctl-enter in Rstudio or with Rscript --vanilla invoke_from_R.R from the command line). My actual need is to create from the command line.
For example:
invoke_from_R.Rmd
---
title: "Lumber Jacks"
author: "Washington Irving"
date: "2022-09-19"
output:
pdf_document:
keep_tex: true
keep_md: true
dev: pdf
includes:
in_header: invoke_from_R_preamble.tex
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Where are we?
Dove siamo?
invoke_from_R_preamble.tex
\newcommand\T{\rule{0pt}{2.6ex}} % Top strut
\newcommand\B{\rule[-1.2ex]{0pt}{0pt}} % Bottom strut
invoke_from_R.R
rmarkdown::render(
input = "invoke_from_R.Rmd"
, output_file = "invoke_from_R.pdf"
, output_format = rmarkdown::pdf_document(
rmarkdown::includes(in_header = "invoke_from_R_preamble.tex"),
toc = TRUE
, toc_depth = 2
, number_sections = FALSE
, keep_md = TRUE
, keep_tex = TRUE
, fig_width = 6.5
, fig_height = 4.5
, fig_crop = FALSE
)
)
The error that I get is:
$ Rscript --vanilla invoke_from_R.R
Error in !implicit_figures : invalid argument type
Calls: <Anonymous> ... <Anonymous> -> output_format -> pandoc_options -> from_rmarkdown
Execution halted
I have not yet found a workaround.
When I comment out this line:
rmarkdown::includes(in_header = "invoke_from_R_preamble.tex"),
I don't get the error, but I need to use the preamble because some of my LaTeX macros get processed even when I use the setting that is supposed to prevent this.
I am using (on Linux):
R version 4.2.1 (2022-06-23)
rmarkdown 2.14
Suggestions?
Thank you.

Adding additional lua-filter into YAML

I'm trying to add an additional lua-filter into the YAML:
---
title: "TITLE"
subtitle: "SUBTITLE"
date: "07/04/2022"
output:
pdf_document:
pandoc_args:
- --lua-filter=/Users/user/.local/share/pandoc/filters/wordcount.lua
latex_engine: pdflatex
includes:
in_header: style.sty
#keep_tex: true
bookdown::pdf_book:
citation_package: biblatex
bibliography: literature.bib
csl: my.csl
lang: de
fontsize: 12pt
---
ok, now when I try to knit the document I'm getting this erorr:
/usr/local/bin/pandoc +RTS -K512m -RTS mother.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output mother.tex --lua-filter /Users/user/Library/R/x86_64/4.1/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Users/user/Library/R/x86_64/4.1/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --highlight-style tango --pdf-engine pdflatex --include-in-header style.sty --variable graphics --lua-filter=/Users/user/.local/share/pandoc/filters/wordcount.lua --variable 'geometry:margin=1in' --citeproc
655 words in body
4171 characters in body
4791 characters in body (including spaces)
Error in readLines(con, warn = FALSE) : cannot open the connection
In addition: Warning message:
In readLines(con, warn = FALSE) :
cannot open file 'mother.tex': No such file or directory
What is wrong with the mother.tex? Why it's not been created?
Hope someone can help. Thanks already.
Ok, I struggled a little bit to find the right position for the wordcout: process argument.
But a solution for those one who try to achive a workaround could be the following:
edit the following file from https://github.com/pandoc/lua-filters/blob/04e2d663dcb374d2c79ad1a42a30714843cb4e40/wordcount/wordcount.lua
notice the comment-out lines in line 39-42 and 43-45
-- counts words in a document
words = 0
characters = 0
characters_and_spaces = 0
process_anyway = false
wordcount = {
Str = function(el)
-- we don't count a word if it's entirely punctuation:
if el.text:match("%P") then
words = words + 1
end
characters = characters + utf8.len(el.text)
characters_and_spaces = characters_and_spaces + utf8.len(el.text)
end,
Space = function(el)
characters_and_spaces = characters_and_spaces + 1
end,
Code = function(el)
_,n = el.text:gsub("%S+","")
words = words + n
text_nospace = el.text:gsub("%s", "")
characters = characters + utf8.len(text_nospace)
characters_and_spaces = characters_and_spaces + utf8.len(el.text)
end,
CodeBlock = function(el)
_,n = el.text:gsub("%S+","")
words = words + n
text_nospace = el.text:gsub("%s", "")
characters = characters + utf8.len(text_nospace)
characters_and_spaces = characters_and_spaces + utf8.len(el.text)
end
}
-- check if the `wordcount` variable is set to `process-anyway`
--function Meta(meta)
-- if meta.wordcount and (meta.wordcount=="process-anyway"
-- or meta.wordcount=="process" or meta.wordcount=="convert") then
process_anyway = true
-- end
--end
function Pandoc(el)
-- skip metadata, just count body:
pandoc.walk_block(pandoc.Div(el.blocks), wordcount)
print(words .. " words in body")
print(characters .. " characters in body")
print(characters_and_spaces .. " characters in body (including spaces)")
if not process_anyway then
os.exit(0)
end
end
The problem is that the filter stops the conversion process, so no output is created.
I'm assuming you are using the wordcount filter from https://github.com/pandoc/lua-filters. That filter will abort the document conversion unless the metadata field wordcount is set to the string process or convert.
So you can add --metadata=wordcount=process this to pandoc_args setting:
pandoc_args:
- --lua-filter=/Users/user/.local/share/pandoc/filters/wordcount.lua
- --metadata=wordcount=process
or modify the filter to always process the document regardless of whether the metadata field is set or not.

Rstudio pandoc issue

This example will knit on my laptop but not my desktop. Both are using the same RStudio and R versions. I have tried uninstalling R and RStudio, changing R and RStudio versions, changing 32/64 bit R, trying to install a variety of pandoc versions, setting the path to pandoc manually with Sys.setenv()... I am sort of at a loss here.
Both machines have the following:
> rmarkdown::pandoc_version()
[1] ‘1.19.2.1’
> version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 4.3
year 2017
month 11
day 30
svn rev 73796
language R
version.string R version 3.4.3 (2017-11-30)
nickname Kite-Eating Tree
Here is a minimum non/working example. Again, it works on the laptop but not the desktop.
---
title: "Pandoc testing sandbox"
output:
html_document:
df_print: paged
number_sections: yes
toc: yes
toc_float:
collapsed: no
smooth_scroll: no
---
Here is a chunk of code to test:
```{r, results = "asis", echo = FALSE, message = FALSE}
tex2markdown <- function(texstring) {
writeLines(text = texstring,
con = myfile <- tempfile(fileext = ".tex"))
texfile <- knitr::pandoc(input = myfile, format = "html")
cat(readLines(texfile), sep = "\n")
unlink(c(myfile, texfile))
}
textable <- "
\\begin{table}[]
\\centering
\\begin{tabular}{l | c | c}
& without replacement & with replacement \\\\ \\hline
order matters & permutation: $\\frac{n!}{(n-k)!}$ & $n^k$ \\\\ \\hline
order does not matter & combination: ${n\\choose k}=\\frac{n!}{k!(n-k)!}$ & (\\textit{special case}) \\hline
\\end{tabular}
\\end{table}
"
tex2markdown(textable)
```
The error text on the desktop machine is:
Line 17 Error in knitr::pandoc(input = myfile, format = "html") :
Please install pandoc first: http://pandoc.org
Calls: <Anonymous> ... withVisible -> eval -> eval ->
tex2markdown -> <Anonymous> Execution halted
Any help with this would be greatly appreciated!
===
Edit: I did a bit more testing and ran:
rmarkdown::render("pandoctest.Rmd", "html_document")
And there was an option to "Rerun with Debug", so I did that, and the error is happening in "Function pandoc (namespace:knitr)" The line of code where the break happens in what I suppose is the pandoc function in the knitr package is:
...
if (Sys.which("pandoc") == "")
stop("Please install pandoc first: http://pandoc.org")
...
So it seems like pandoc is checking to see if it is installed itself? Or somehoe this is a pandoc function in the knitr package that is calling an actual pandoc program from somewhere else? SO it seems I need to get knitr to somehow see that I have pandoc installed.

Execute multiline R expression from shell (with indentation)

I'm trying to achieve what you might naively write as:
R -e "
rmarkdown::render(
'MyDocument.Rmd',
params = list(
year = 2017
),
output_file = 'ExampleRnotebook.html'
)
"
So that I can make nicely formatted submission scripts to run on a cluster.
I've tried some variants on the below, I'm wondering if there might be an alternative approach to do this with the R -f flag?
read -r -d '' EXP << EOF
rmarkdown::render(
'MyDocument.Rmd',
params = list(
year = 2017
),
output_file = 'ExampleRnotebook.html'
)
EOF
R -e "$EXP"
but I get a series of errors that look like this:
ARGUMENT 'params~+~=~+~list(' __ignored__
for the different lines of the expression, followed by:
> rmarkdown::render(
+
+ Error: unexpected end of input
To reproduce:
MyDocument.Rmd =
---
title: "R Notebook"
output: html_notebook
params:
year: 0000
---
```{r}
params$year
```
This works fine:
read -r -d '' EXP <<- EOF
rmarkdown::render('MyDocument.Rmd', params = list(year = 2017 ), output_file = 'ExampleRnotebook.html')
EOF
R -e "$EXP"
but gets hard to read with longer param lists
This works for me (R version 3.5.0):
R --no-save <<code
for(i in 1:3) {
i +
2
}
print(i)
runif(5,
1,10)
code
Note: line-breaks and paddings are intentional.

compilation error in Knitr in Lyx

I have been using knitr with Lyx (2.1.4) in Windows for past few months. Recently I shifted to Ubuntu with same version for Lyx. I am getting an error during compilation while using the Knitr Module.
1) The copy of the error message (from message pane) :
01:00:48.616: Previewing ...
01:00:48.667: Rscript --verbose --no-save --no-restore "/usr/share/lyx/scripts/lyxknitr.R" "/tmp/lyx_tmpdir.MvERGeak1905/lyx_tmpbuf0/""newfile1.Rnw" "/tmp/lyx_tmpdir.MvERGeak1905/lyx_tmpbuf0/""newfile1.tex" ISO-8859-15 "/home/user/"
01:00:48.674: running
01:00:48.681: '/usr/lib/R/bin/R --slave --no-restore --no-save --no-restore --file=/usr/share/lyx/scripts/lyxknitr.R --args /tmp/lyx_tmpdir.MvERGeak1905/lyx_tmpbuf0/newfile1.Rnw /tmp/lyx_tmpdir.MvERGeak1905/lyx_
01:00:48.691: tmpbuf0/newfile1.tex ISO-8859-15'
01:00:48.695:
01:00:50.579:
01:00:50.580:
01:00:50.582: processing file: /tmp/lyx_tmpdir.MvERGeak1905/lyx_tmpbuf0/newfile1.Rnw
01:00:50.631:
|
| | 0%
|
01:00:50.636:
|...................... | 33%
01:00:50.641: ordinary text without R code
01:00:50.644:
01:00:50.648:
|
|........................................... | 67%
01:00:50.652: label: unnamed-chunk-1
01:00:51.025: Quitting from lines 11-12 (/tmp/lyx_tmpdir.MvERGeak1905/lyx_tmpbuf0/newfile1.Rnw)
01:00:51.031: Error in data.frame(..., check.names = FALSE) :
01:00:51.036: arguments imply differing number of rows: 3, 0
01:00:51.040: Calls: knit ... <Anonymous> -> <Anonymous> -> cbind -> cbind -> data.frame
01:00:51.043: In addition: Warning messages:
01:00:51.047: 1: In is.na(res[, 1]) :
01:00:51.052: is.na() applied to non-(list or vector) of type 'NULL'
01:00:51.056: 2: In is.na(res) : is.na() applied to non-(list or vector) of type 'NULL'
01:00:51.060:
01:00:51.065: Execution halted
01:00:53.236: Error while exporting format: PDF (pdflatex)
01:00:58.250: (dialog-toggle progress)
2) The converter definition:
Rscript --verbose --no-save --no-restore $$s/scripts/lyxknitr.R $$p$$i $$p$$o $$e $$r
3) My code chunk is
<<>>=
2+3
#
Please note that the .Rnw file is created in tmp folder (lyx_tmpbuf0 ) and can be complied successfully by R studio. Also I can successfully compile pdf using sweave module in lyx.
Update 1: According to scottkosty's suggestion I checked the system environment in both R and RStudio and noticed few differences (though I have no idea about them) .
This is the output for R :
"COLORTERM" "gnome-terminal"
"COLUMNS" "80"
"DBUS_SESSION_BUS_ADDRESS" "unix:abstract=/tmp/dbus-3muQCK69fQ,guid=e7edee405375ab42e386699a0000002f"
"DEFAULTS_PATH" "/usr/share/gconf/ubuntu-2d.default.path"
"DESKTOP_SESSION" "ubuntu-2d"
"DISPLAY" ":0"
"EDITOR" "vi"
"GDMSESSION" "ubuntu-2d"
"GNOME_DESKTOP_SESSION_ID" "this-is-deprecated"
"GNOME_KEYRING_CONTROL" "/tmp/keyring-m9K6wh"
"GNOME_KEYRING_PID" "1515"
"GPG_AGENT_INFO" "/tmp/keyring-m9K6wh/gpg:0:1"
"GTK_MODULES" "canberra-gtk-module:canberra-gtk-module"
"HOME" "/home/user"
"LANG" "en_IN"
"LANGUAGE" "en_US:en"
"LC_COLLATE" "en_US.UTF-8"
"LC_CTYPE" "en_US.UTF-8"
"LC_MESSAGES" "en_US.UTF-8"
"LD_LIBRARY_PATH" "/usr/lib/R/lib:/usr/lib/jvm/java-6-openjdk-i386/jre/lib/i386/server"
"LINES" "24"
"LN_S" "ln -s"
"LOGNAME" "user"
"MAKE" "make"
"MANDATORY_PATH" "/usr/share/gconf/ubuntu-2d.mandatory.path"
"PAGER" "/usr/bin/pager"
"PATH" "/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
"PWD" "/home/user"
"R_ARCH" ""
"R_BROWSER" "xdg-open"
"R_BZIPCMD" "/bin/bzip2"
"R_DOC_DIR" "/usr/share/R/doc"
"R_GZIPCMD" "/bin/gzip"
"R_HOME" "/usr/lib/R"
"R_INCLUDE_DIR" "/usr/share/R/include"
"R_LIBS_SITE" "/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library"
"R_LIBS_USER" "~/R/i686-pc-linux-gnu-library/3.1"
"R_PAPERSIZE" "letter"
"R_PAPERSIZE_USER" "a4"
"R_PDFVIEWER" "/usr/bin/xdg-open"
"R_PLATFORM" "i686-pc-linux-gnu"
"R_PRINTCMD" "/usr/bin/lpr"
"R_RD4PDF" "times,inconsolata,hyper"
"R_SESSION_TMPDIR" "/tmp/Rtmpp31WUY"
"R_SHARE_DIR" "/usr/share/R/share"
"R_SYSTEM_ABI" "linux,gcc,gxx,gfortran,?"
"R_TEXI2DVICMD" "/usr/bin/texi2dvi"
"R_UNZIPCMD" "/usr/bin/unzip"
"R_ZIPCMD" "/usr/bin/zip"
"SED" "/bin/sed"
"SESSION_MANAGER" "local/akd-HP-Mini-110-4100:#/tmp/.ICE-unix/1526,unix/akd-HP-Mini-110-4100:/tmp/.ICE-unix/1526"
"SHELL" "/bin/bash"
"SHLVL" "0"
"SSH_AGENT_PID" "1563"
"SSH_AUTH_SOCK" "/tmp/keyring-m9K6wh/ssh"
"TAR" "/bin/tar"
"TERM" "xterm"
"UBUNTU_MENUPROXY" "libappmenu.so"
"USER" "user"
"WINDOWID" "67108870"
"XAUTHORITY" "/home/user/.Xauthority"
"XDG_CONFIG_DIRS" "/etc/xdg/xdg-ubuntu-2d:/etc/xdg"
"XDG_CURRENT_DESKTOP" "Unity"
"XDG_DATA_DIRS" "/usr/share/ubuntu-2d:/usr/share/gnome:/usr/local/share/:/usr/share/"
"XDG_SEAT_PATH" "/org/freedesktop/DisplayManager/Seat0"
"XDG_SESSION_COOKIE" "c143c6cb80cfe9614354b2ab0000000d-1453572539.964572-1541574946"
"XDG_SESSION_PATH" "/org/freedesktop/DisplayManager/Session0"
This is the output for RStudio:
"DBUS_SESSION_BUS_ADDRESS" "unix:abstract=/tmp/dbus-3muQCK69fQ,guid=e7edee405375ab42e386699a0000002f"
"DEFAULTS_PATH" "/usr/share/gconf/ubuntu-2d.default.path"
"DESKTOP_SESSION" "ubuntu-2d"
"DISPLAY" ":0"
"EDITOR" "vi"
"GDMSESSION" "ubuntu-2d"
"GIO_LAUNCHED_DESKTOP_FILE" "/usr/share/applications/rstudio.desktop"
"GIO_LAUNCHED_DESKTOP_FILE_PID" "2397"
"GIT_ASKPASS" "rpostback-askpass"
"GNOME_DESKTOP_SESSION_ID" "this-is-deprecated"
"GNOME_KEYRING_CONTROL" "/tmp/keyring-m9K6wh"
"GNOME_KEYRING_PID" "1515"
"GPG_AGENT_INFO" "/tmp/keyring-m9K6wh/gpg:0:1"
"GTK_MODULES" "canberra-gtk-module:canberra-gtk-module"
"HOME" "/home/user"
"LANG" "en_IN"
"LANGUAGE" "en_US:en"
"LC_COLLATE" "en_US.UTF-8"
"LC_CTYPE" "en_US.UTF-8"
"LC_MESSAGES" "en_US.UTF-8"
"LD_LIBRARY_PATH" "/usr/lib/R/lib:/lib:/usr/lib/jvm/java-6-openjdk-i386/jre/lib/i386/server"
"LN_S" "ln -s"
"LOGNAME" "user"
"MAKE" "make"
"MANDATORY_PATH" "/usr/share/gconf/ubuntu-2d.mandatory.path"
"PAGER" "/usr/bin/pager"
"PATH" "/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
"PWD" "/home/user"
"R_BROWSER" "xdg-open"
"R_BZIPCMD" "/bin/bzip2"
"R_DOC_DIR" "/usr/share/R/doc"
"R_GZIPCMD" "/bin/gzip"
"R_HOME" "/usr/lib/R"
"R_INCLUDE_DIR" "/usr/share/R/include"
"R_LIBS" "/usr/lib/rstudio/R/library"
"R_LIBS_SITE" "/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library"
"R_LIBS_USER" "~/R/i686-pc-linux-gnu-library/3.1"
"R_PAPERSIZE" "letter"
"R_PAPERSIZE_USER" "a4"
"R_PDFVIEWER" "/usr/bin/xdg-open"
"R_PLATFORM" "i686-pc-linux-gnu"
"R_PRINTCMD" "/usr/bin/lpr"
"R_RD4PDF" "times,inconsolata,hyper"
"R_SESSION_TMPDIR" "/tmp/Rtmp7wgloJ"
"R_SHARE_DIR" "/usr/share/R/share"
"RS_PPM_FD_READ" "18"
"RS_PPM_FD_WRITE" "19"
"RS_RPOSTBACK_PATH" "/usr/lib/rstudio/bin/rpostback"
"RS_SHARED_SECRET" "115600967413966338811821464018"
"RSTUDIO" "1"
"RSTUDIO_SESSION_PORT" "20366"
"RSTUDIO_USER_IDENTITY" "user"
"R_SYSTEM_ABI" "linux,gcc,gxx,gfortran,?"
"R_TEXI2DVICMD" "/usr/bin/texi2dvi"
"R_UNZIPCMD" "/usr/bin/unzip"
"R_ZIPCMD" "/usr/bin/zip"
"SED" "/bin/sed"
"SESSION_MANAGER" "local/akd-HP-Mini-110-4100:#/tmp/.ICE-unix/1526,unix/akd-HP-Mini-110-4100:/tmp/.ICE-unix/1526"
"SHELL" "/bin/bash"
"SSH_AGENT_PID" "1563"
"SSH_AUTH_SOCK" "/tmp/keyring-m9K6wh/ssh"
"TAR" "/bin/tar"
"UBUNTU_MENUPROXY" "libappmenu.so"
"USER" "user"
"XAUTHORITY" "/home/user/.Xauthority"
"XDG_CONFIG_DIRS" "/etc/xdg/xdg-ubuntu-2d:/etc/xdg"
"XDG_CURRENT_DESKTOP" "Unity"
"XDG_DATA_DIRS" "/usr/share/ubuntu-2d:/usr/share/gnome:/usr/local/share/:/usr/share/"
"XDG_SEAT_PATH" "/org/freedesktop/DisplayManager/Seat0"
"XDG_SESSION_COOKIE" "c143c6cb80cfe9614354b2ab0000000d-1453572539.964572-1541574946"
"XDG_SESSION_PATH" "/org/freedesktop/DisplayManager/Session0"

Resources