rpresentation vs mathjax & preview pane

I'm trying to embed math in an Rpresentation, then show it in the Rstudio PRESENTATION pane.

Code sample...

solve() for systems of equations
========================================================
author: Mark Niemann-Ross
date: 
autosize: true


Solve a system of equations
===
As an example, start with this system of equations:

$$
2x_1 - 3x_2 - 1x_3 = 2\\
1x_1 + 2x_2 + 3x_3 = 15\\
5x_1 + 1x_2 - 1x_3 = 4\\
$$

Then I click on the Preview tab. The presentation (not the viewer) pane correctly shows the title slide. Then the second slide shows the latex instead of the rendered formula. i.e.

As an example, start with this system of equations:

[ 2x_1 - 3x_2 - 1x_3 = 2\ 1x_1 + 2x_2 + 3x_3 = 15\ 5x_1 + 1x_2 - 1x_3 = 4\ ]

…when converted to a matrix…

[ \begin{pmatrix} 2 & -3 & -1\ 1 & 2 & 3\ 5 & 1 & -1\ \end{pmatrix} \begin{pmatrix} x_1\ x_2\ x_3\ \end{pmatrix} = \begin{pmatrix} 2\ 15\ 4\ \end{pmatrix} ]

If I open the intermediate .md file (created from the .Rpres file) then knit, the equations and math are rendered correctly in the VIEWER pane (but not the presentation pane)

Here is a screen shot showing the presentation pane and the viewer pane. Note the equation is rendered in the viewer - but not the presentation..

It is rendered correctly when I open the file in a system browser such as Chrome.

I'm using windows 10, Rstudio 1.3.959, R version 4.0.0 (2020-04-24) -- "Arbor Day"

Sys.getenv() returns (abbreviated)...
RMARKDOWN_MATHJAX_PATH C:/Program Files/RStudio/resources/mathjax-27. All files in that directory appear to be intact.

This was working as expected before I updated R & Rstudio. It continues to work on my older linux machine with Rstudio 1.1.456/R 3.6.3

I'm not sure where to start troubleshooting - can anyone help with some debugging guidance?

Thanks!
Mark Niemann-Ross

Here is the diagnostics report:

RStudio Diagnostics Report

WARNING: This report may contain sensitive security information and / or
personally identifiable information. Please audit the below and redact any
sensitive information before submitting your diagnostics report.

Generated: Wed Jun 03 18:47:46 2020

RStudio Version

1.3.959

Session Information

R version 4.0.0 (2020-04-24)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] compiler_4.0.0 htmltools_0.4.0 tools_4.0.0 yaml_2.2.1
[5] Rcpp_1.0.4.6 rmarkdown_2.2 knitr_1.28 xfun_0.14
[9] digest_0.6.25 packrat_0.5.0 rlang_0.4.6 evaluate_0.14

System Information

sysname : Windows
release : 10 x64
version : build 18363
nodename : OOPSKAYAK
machine : x86-64
login : mnr
user : mnr
effective_user : mnr

Platform Information

OS.type : windows
file.sep : /
dynlib.ext : .dll
GUI : RStudio
endian : little
pkgType : win.binary
path.sep : ;
r_arch : x64

Environment Variables

ALLUSERSPROFILE : C:\ProgramData
APPDATA : C:\Users\mnr\AppData\Roaming
CLICOLOR_FORCE : 1
CommonProgramFiles : C:\Program Files\Common Files
CommonProgramFiles(x86) : C:\Program Files (x86)\Common Files
CommonProgramW6432 : C:\Program Files\Common Files
COMPUTERNAME : OOPSKAYAK
ComSpec : C:\WINDOWS\system32\cmd.exe
configsetroot : C:\WINDOWS\ConfigSetRoot
DISPLAY : :0
DriverData : C:\Windows\System32\Drivers\DriverData
FPS_BROWSER_APP_PROFILE_STRING : Internet Explorer
FPS_BROWSER_USER_PROFILE_STRING : Default
GFORTRAN_STDERR_UNIT : -1
GFORTRAN_STDOUT_UNIT : -1
HOME : C:\Users\mnr\Documents
HOMEDRIVE : C:
HOMEPATH : \Users\mnr
LOCALAPPDATA : C:\Users\mnr\AppData\Local
LOGONSERVER : \OOPSKAYAK
MPLENGINE : tkAgg
MSYS2_ENV_CONV_EXCL : R_ARCH
NUMBER_OF_PROCESSORS : 8
OneDrive : C:\Users\mnr\OneDrive
OS : Windows_NT
PATH : C:\Users\mnr\Documents\R\R-4.0.0\bin\x64;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Calibre2;C:\Users\mnr\AppData\Local\Microsoft\WindowsApps;C:\Users\mnr\AppData\Local\Programs\Git\cmd;C:\Users\mnr\AppData\Local\Pandoc;C:\Users\mnr\AppData\Roaming\TinyTeX\bin\win32
PATHEXT : .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE : AMD64
PROCESSOR_IDENTIFIER : Intel64 Family 6 Model 142 Stepping 12, GenuineIntel
PROCESSOR_LEVEL : 6
PROCESSOR_REVISION : 8e0c
ProgramData : C:\ProgramData
ProgramFiles : C:\Program Files
ProgramFiles(x86) : C:\Program Files (x86)
ProgramW6432 : C:\Program Files
PSModulePath : C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
PUBLIC : C:\Users\Public
QT_D3DCREATE_MULTITHREADED : 1
R_ARCH : /x64
R_COMPILED_BY : gcc 8.3.0
R_DOC_DIR : C:/Users/mnr/DOCUME~1/R/R-40~1.0/doc
R_HOME : C:/Users/mnr/DOCUME~1/R/R-40~1.0
R_LIBS_USER : C:/Users/mnr/Documents/R/win-library/4.0
R_PACKRAT_DEFAULT_LIBPATHS : C:/Users/mnr/Documents/R/R-4.0.0/library
R_PACKRAT_SYSTEM_LIBRARY : C:/Users/mnr/DOCUME~1/R/R-40~1.0/library
R_USER : C:/Users/mnr/Documents
RMARKDOWN_MATHJAX_PATH : C:/Program Files/RStudio/resources/mathjax-27
RS_LOCAL_PEER : \.\pipe\41824-rsession
RS_RPOSTBACK_PATH : C:/Program Files/RStudio/bin/rpostback
RS_SHARED_SECRET : *** redacted ***
RSTUDIO : 1
RSTUDIO_CONSOLE_COLOR : 256
RSTUDIO_CONSOLE_WIDTH : 80
RSTUDIO_MSYS_SSH : C:/Program Files/RStudio/bin/msys-ssh-1000-18
RSTUDIO_PANDOC : C:/Program Files/RStudio/bin/pandoc
RSTUDIO_PROGRAM_MODE : desktop
RSTUDIO_SESSION_PORT : 41824
RSTUDIO_USER_IDENTITY : mnr
RSTUDIO_WINUTILS : C:/Program Files/RStudio/bin/winutils
RTOOLS40_HOME : C:\rtools40
SESSIONNAME : Console
SystemDrive : C:
SystemRoot : C:\WINDOWS
TEMP : C:\Users\mnr\AppData\Local\Temp
TERM : xterm-256color
TMP : C:\Users\mnr\AppData\Local\Temp
USERDOMAIN : OOPSKAYAK
USERDOMAIN_ROAMINGPROFILE : OOPSKAYAK
USERNAME : *** redacted ***
USERPROFILE : C:\Users\mnr
windir : C:\WINDOWS

R Version

platform : x86_64-w64-mingw32
arch : x86_64
os : mingw32
system : x86_64, mingw32
status :
major : 4
minor : 0.0
year : 2020
month : 04
day : 24
svn rev : 78286
language : R
version.string : R version 4.0.0 (2020-04-24)
nickname : Arbor Day

R Home

C:/Users/mnr/DOCUME~1/R/R-40~1.0

R Search Path

.GlobalEnv
tools:rstudio
package:stats
package:graphics
package:grDevices
package:utils
package:datasets
package:methods
Autoloads
package:base

R Library Paths

C:/Users/mnr/Documents/R/R-4.0.0/library

Loaded Packages

base : C:/Users/mnr/DOCUME~1/R/R-40~1.0/library/base
compiler : C:/Users/mnr/Documents/R/R-4.0.0/library/compiler
datasets : C:/Users/mnr/Documents/R/R-4.0.0/library/datasets
digest : C:/Users/mnr/Documents/R/R-4.0.0/library/digest
evaluate : C:/Users/mnr/Documents/R/R-4.0.0/library/evaluate
graphics : C:/Users/mnr/Documents/R/R-4.0.0/library/graphics
grDevices : C:/Users/mnr/Documents/R/R-4.0.0/library/grDevices
htmltools : C:/Users/mnr/Documents/R/R-4.0.0/library/htmltools
knitr : C:/Users/mnr/Documents/R/R-4.0.0/library/knitr
methods : C:/Users/mnr/Documents/R/R-4.0.0/library/methods
packrat : C:/Users/mnr/Documents/R/R-4.0.0/library/packrat
Rcpp : C:/Users/mnr/Documents/R/R-4.0.0/library/Rcpp
rlang : C:/Users/mnr/Documents/R/R-4.0.0/library/rlang
rmarkdown : C:/Users/mnr/Documents/R/R-4.0.0/library/rmarkdown
stats : C:/Users/mnr/Documents/R/R-4.0.0/library/stats
tools : C:/Users/mnr/Documents/R/R-4.0.0/library/tools
utils : C:/Users/mnr/Documents/R/R-4.0.0/library/utils
xfun : C:/Users/mnr/Documents/R/R-4.0.0/library/xfun
yaml : C:/Users/mnr/Documents/R/R-4.0.0/library/yaml

Installed Packages

        Package                                  LibPath  Version

1 askpass C:/Users/mnr/Documents/R/R-4.0.0/library 1.1
2 assertthat C:/Users/mnr/Documents/R/R-4.0.0/library 0.2.1
3 backports C:/Users/mnr/Documents/R/R-4.0.0/library 1.1.7
4 base C:/Users/mnr/Documents/R/R-4.0.0/library 4.0.0
5 base64enc C:/Users/mnr/Documents/R/R-4.0.0/library 0.1-3
6 benchmarkme C:/Users/mnr/Documents/R/R-4.0.0/library 1.0.4
7 benchmarkmeData C:/Users/mnr/Documents/R/R-4.0.0/library 1.0.4
8 BH C:/Users/mnr/Documents/R/R-4.0.0/library 1.72.0-3
9 bitops C:/Users/mnr/Documents/R/R-4.0.0/library 1.0-6
10 blob C:/Users/mnr/Documents/R/R-4.0.0/library 1.2.1
11 bookdown C:/Users/mnr/Documents/R/R-4.0.0/library 0.19
12 boot C:/Users/mnr/Documents/R/R-4.0.0/library 1.3-25
13 broom C:/Users/mnr/Documents/R/R-4.0.0/library 0.5.6
14 callr C:/Users/mnr/Documents/R/R-4.0.0/library 3.4.3
15 cellranger C:/Users/mnr/Documents/R/R-4.0.0/library 1.1.0
16 checkmate C:/Users/mnr/Documents/R/R-4.0.0/library 2.0.0
17 class C:/Users/mnr/Documents/R/R-4.0.0/library 7.3-17
18 cli C:/Users/mnr/Documents/R/R-4.0.0/library 2.0.2
19 clipr C:/Users/mnr/Documents/R/R-4.0.0/library 0.7.0
20 cluster C:/Users/mnr/Documents/R/R-4.0.0/library 2.1.0
21 codetools C:/Users/mnr/Documents/R/R-4.0.0/library 0.2-16
22 colorspace C:/Users/mnr/Documents/R/R-4.0.0/library 1.4-1
23 compiler C:/Users/mnr/Documents/R/R-4.0.0/library 4.0.0
24 crayon C:/Users/mnr/Documents/R/R-4.0.0/library 1.3.4
25 curl C:/Users/mnr/Documents/R/R-4.0.0/library 4.3
26 datasets C:/Users/mnr/Documents/R/R-4.0.0/library 4.0.0
27 DBI C:/Users/mnr/Documents/R/R-4.0.0/library 1.1.0
28 dbplyr C:/Users/mnr/Documents/R/R-4.0.0/library 1.4.4
29 desc C:/Users/mnr/Documents/R/R-4.0.0/library 1.2.0
30 digest C:/Users/mnr/Documents/R/R-4.0.0/library 0.6.25
31 doParallel C:/Users/mnr/Documents/R/R-4.0.0/library 1.0.15
32 dplyr C:/Users/mnr/Documents/R/R-4.0.0/library 1.0.0
33 ellipsis C:/Users/mnr/Documents/R/R-4.0.0/library 0.3.1
34 evaluate C:/Users/mnr/Documents/R/R-4.0.0/library 0.14
35 fansi C:/Users/mnr/Documents/R/R-4.0.0/library 0.4.1
36 farver C:/Users/mnr/Documents/R/R-4.0.0/library 2.0.3
37 fastmap C:/Users/mnr/Documents/R/R-4.0.0/library 1.0.1
38 forcats C:/Users/mnr/Documents/R/R-4.0.0/library 0.5.0
39 foreach C:/Users/mnr/Documents/R/R-4.0.0/library 1.5.0
40 foreign C:/Users/mnr/Documents/R/R-4.0.0/library 0.8-80
41 fs C:/Users/mnr/Documents/R/R-4.0.0/library 1.4.1
42 generics C:/Users/mnr/Documents/R/R-4.0.0/library 0.0.2
43 ggplot2 C:/Users/mnr/Documents/R/R-4.0.0/library 3.3.1
44 glue C:/Users/mnr/Documents/R/R-4.0.0/library 1.4.1
45 graphics C:/Users/mnr/Documents/R/R-4.0.0/library 4.0.0
46 grDevices C:/Users/mnr/Documents/R/R-4.0.0/library 4.0.0
47 grid C:/Users/mnr/Documents/R/R-4.0.0/library 4.0.0
48 gtable C:/Users/mnr/Documents/R/R-4.0.0/library 0.3.0
49 haven C:/Users/mnr/Documents/R/R-4.0.0/library 2.3.0
50 highr C:/Users/mnr/Documents/R/R-4.0.0/library 0.8
51 hms C:/Users/mnr/Documents/R/R-4.0.0/library 0.5.3
52 htmltab C:/Users/mnr/Documents/R/R-4.0.0/library 0.7.1.1
53 htmltools C:/Users/mnr/Documents/R/R-4.0.0/library 0.4.0
54 htmlwidgets C:/Users/mnr/Documents/R/R-4.0.0/library 1.5.1
55 httpuv C:/Users/mnr/Documents/R/R-4.0.0/library 1.5.3.1
56 httr C:/Users/mnr/Documents/R/R-4.0.0/library 1.4.1
57 installr C:/Users/mnr/Documents/R/R-4.0.0/library 0.22.0
58 isoband C:/Users/mnr/Documents/R/R-4.0.0/library 0.2.1
59 iterators C:/Users/mnr/Documents/R/R-4.0.0/library 1.0.12
60 jpeg C:/Users/mnr/Documents/R/R-4.0.0/library 0.1-8.1
61 jsonlite C:/Users/mnr/Documents/R/R-4.0.0/library 1.6.1
62 KernSmooth C:/Users/mnr/Documents/R/R-4.0.0/library 2.23-17
63 knitr C:/Users/mnr/Documents/R/R-4.0.0/library 1.28
64 labeling C:/Users/mnr/Documents/R/R-4.0.0/library 0.3
65 later C:/Users/mnr/Documents/R/R-4.0.0/library 1.0.0
66 lattice C:/Users/mnr/Documents/R/R-4.0.0/library 0.20-41
67 learnr C:/Users/mnr/Documents/R/R-4.0.0/library 0.10.1
68 lifecycle C:/Users/mnr/Documents/R/R-4.0.0/library 0.2.0
69 lubridate C:/Users/mnr/Documents/R/R-4.0.0/library 1.7.8
70 magrittr C:/Users/mnr/Documents/R/R-4.0.0/library 1.5
71 markdown C:/Users/mnr/Documents/R/R-4.0.0/library 1.1
72 MASS C:/Users/mnr/Documents/R/R-4.0.0/library 7.3-51.6
73 Matrix C:/Users/mnr/Documents/R/R-4.0.0/library 1.2-18
74 methods C:/Users/mnr/Documents/R/R-4.0.0/library 4.0.0
75 mgcv C:/Users/mnr/Documents/R/R-4.0.0/library 1.8-31
76 mime C:/Users/mnr/Documents/R/R-4.0.0/library 0.9
77 modelr C:/Users/mnr/Documents/R/R-4.0.0/library 0.1.8
78 munsell C:/Users/mnr/Documents/R/R-4.0.0/library 0.5.0
79 nlme C:/Users/mnr/Documents/R/R-4.0.0/library 3.1-148
80 nnet C:/Users/mnr/Documents/R/R-4.0.0/library 7.3-14
81 nycflights13 C:/Users/mnr/Documents/R/R-4.0.0/library 1.0.1
82 openssl C:/Users/mnr/Documents/R/R-4.0.0/library 1.4.1
83 packrat C:/Users/mnr/Documents/R/R-4.0.0/library 0.5.0
84 parallel C:/Users/mnr/Documents/R/R-4.0.0/library 4.0.0
85 pillar C:/Users/mnr/Documents/R/R-4.0.0/library 1.4.4
86 pkgbuild C:/Users/mnr/Documents/R/R-4.0.0/library 1.0.8
87 pkgconfig C:/Users/mnr/Documents/R/R-4.0.0/library 2.0.3
88 pkgload C:/Users/mnr/Documents/R/R-4.0.0/library 1.1.0
89 plogr C:/Users/mnr/Documents/R/R-4.0.0/library 0.2.0
90 plyr C:/Users/mnr/Documents/R/R-4.0.0/library 1.8.6
91 praise C:/Users/mnr/Documents/R/R-4.0.0/library 1.0.0
92 prettyunits C:/Users/mnr/Documents/R/R-4.0.0/library 1.1.1
93 processx C:/Users/mnr/Documents/R/R-4.0.0/library 3.4.2
94 progress C:/Users/mnr/Documents/R/R-4.0.0/library 1.2.2
95 promises C:/Users/mnr/Documents/R/R-4.0.0/library 1.1.0
96 ps C:/Users/mnr/Documents/R/R-4.0.0/library 1.3.3
97 purrr C:/Users/mnr/Documents/R/R-4.0.0/library 0.3.4
98 R6 C:/Users/mnr/Documents/R/R-4.0.0/library 2.4.1
99 rappdirs C:/Users/mnr/Documents/R/R-4.0.0/library 0.3.1
100 RColorBrewer C:/Users/mnr/Documents/R/R-4.0.0/library 1.1-2
101 Rcpp C:/Users/mnr/Documents/R/R-4.0.0/library 1.0.4.6
102 RCurl C:/Users/mnr/Documents/R/R-4.0.0/library 1.98-1.2
103 readr C:/Users/mnr/Documents/R/R-4.0.0/library 1.3.1
104 readxl C:/Users/mnr/Documents/R/R-4.0.0/library 1.3.1
105 rematch C:/Users/mnr/Documents/R/R-4.0.0/library 1.0.1
106 renv C:/Users/mnr/Documents/R/R-4.0.0/library 0.10.0
107 reprex C:/Users/mnr/Documents/R/R-4.0.0/library 0.3.0
108 reshape2 C:/Users/mnr/Documents/R/R-4.0.0/library 1.4.4
109 rlang C:/Users/mnr/Documents/R/R-4.0.0/library 0.4.6
110 rmarkdown C:/Users/mnr/Documents/R/R-4.0.0/library 2.2
111 rpart C:/Users/mnr/Documents/R/R-4.0.0/library 4.1-15
112 rprojroot C:/Users/mnr/Documents/R/R-4.0.0/library 1.3-2
113 rsconnect C:/Users/mnr/Documents/R/R-4.0.0/library 0.8.16
114 rstudioapi C:/Users/mnr/Documents/R/R-4.0.0/library 0.11
115 rvest C:/Users/mnr/Documents/R/R-4.0.0/library 0.3.5
116 scales C:/Users/mnr/Documents/R/R-4.0.0/library 1.1.1
117 selectr C:/Users/mnr/Documents/R/R-4.0.0/library 0.4-2
118 shiny C:/Users/mnr/Documents/R/R-4.0.0/library 1.4.0.2
119 sourcetools C:/Users/mnr/Documents/R/R-4.0.0/library 0.1.7
120 spatial C:/Users/mnr/Documents/R/R-4.0.0/library 7.3-12
121 splines C:/Users/mnr/Documents/R/R-4.0.0/library 4.0.0
122 stats C:/Users/mnr/Documents/R/R-4.0.0/library 4.0.0
123 stats4 C:/Users/mnr/Documents/R/R-4.0.0/library 4.0.0
124 stringi C:/Users/mnr/Documents/R/R-4.0.0/library 1.4.6
125 stringr C:/Users/mnr/Documents/R/R-4.0.0/library 1.4.0
126 survival C:/Users/mnr/Documents/R/R-4.0.0/library 3.1-12
127 sys C:/Users/mnr/Documents/R/R-4.0.0/library 3.3
128 tcltk C:/Users/mnr/Documents/R/R-4.0.0/library 4.0.0
129 testthat C:/Users/mnr/Documents/R/R-4.0.0/library 2.3.2
130 tibble C:/Users/mnr/Documents/R/R-4.0.0/library 3.0.1
131 tidyr C:/Users/mnr/Documents/R/R-4.0.0/library 1.1.0
132 tidyselect C:/Users/mnr/Documents/R/R-4.0.0/library 1.1.0
133 tidyverse C:/Users/mnr/Documents/R/R-4.0.0/library 1.3.0
134 tinytex C:/Users/mnr/Documents/R/R-4.0.0/library 0.23
135 tools C:/Users/mnr/Documents/R/R-4.0.0/library 4.0.0
136 translations C:/Users/mnr/Documents/R/R-4.0.0/library 4.0.0
137 utf8 C:/Users/mnr/Documents/R/R-4.0.0/library 1.1.4
138 utils C:/Users/mnr/Documents/R/R-4.0.0/library 4.0.0
139 vctrs C:/Users/mnr/Documents/R/R-4.0.0/library 0.3.0
140 viridisLite C:/Users/mnr/Documents/R/R-4.0.0/library 0.3.0
141 whisker C:/Users/mnr/Documents/R/R-4.0.0/library 0.4
142 withr C:/Users/mnr/Documents/R/R-4.0.0/library 2.2.0
143 xfun C:/Users/mnr/Documents/R/R-4.0.0/library 0.14
144 XML C:/Users/mnr/Documents/R/R-4.0.0/library 3.99-0.3
145 xml2 C:/Users/mnr/Documents/R/R-4.0.0/library 1.3.2
146 xtable C:/Users/mnr/Documents/R/R-4.0.0/library 1.8-4
147 yaml C:/Users/mnr/Documents/R/R-4.0.0/library 2.2.1

R System Profile: C:/Users/mnr/DOCUME~1/R/R-40~1.0/library/base/R/Rprofile

This is the system Rprofile file. It is always run on startup.

Additional commands can be placed in site or user Rprofile files

(see ?Rprofile).

Copyright (C) 1995-2015 The R Core Team

Notice that it is a bad idea to use this file as a template for

personal startup files, since things will be executed twice and in

the wrong environment (user profiles are run in .GlobalEnv).

.GlobalEnv <- globalenv()
attach(NULL, name = "Autoloads")
.AutoloadEnv <- as.environment(2)
assign(".Autoloaded", NULL, envir = .AutoloadEnv)
T <- TRUE
F <- FALSE
R.version <- structure(R.Version(), class = "simple.list")
version <- R.version # for S compatibility

for backwards compatibility only

R.version.string <- R.version$version.string

NOTA BENE: options() for non-base package functionality are in places like

--------- ../utils/R/zzz.R

options(keep.source = interactive())
options(warn = 0)

options(repos = c(CRAN="@CRAN@"))

options(BIOC = "http://www.bioconductor.org")

options(timeout = 60)
options(encoding = "native.enc")
options(show.error.messages = TRUE)

keep in sync with PrintDefaults() in ../../main/print.c :

options(scipen = 0)
options(max.print = 99999)# max. #{entries} in internal printMatrix()
options(add.smooth = TRUE)# currently only used in 'plot.lm'

if(isFALSE(as.logical(Sys.getenv("R_OPTIONS_STRINGS_AS_FACTORS",
"FALSE")))) {
options(stringsAsFactors = FALSE)
} else {
options(stringsAsFactors = TRUE)
}

if(!interactive() && is.null(getOption("showErrorCalls")))
options(showErrorCalls = TRUE)

local({dp <- Sys.getenv("R_DEFAULT_PACKAGES")
if(identical(dp, "")) ## it fact methods is done first
dp <- c("datasets", "utils", "grDevices", "graphics",
"stats", "methods")
else if(identical(dp, "NULL")) dp <- character(0)
else dp <- strsplit(dp, ",")[[1]]
dp <- sub("[[:blank:]]*([[:alnum:]]+)", "\1", dp) # strip whitespace
options(defaultPackages = dp)
})

Expand R_LIBS_* environment variables.

Sys.setenv(R_LIBS_SITE =
.expand_R_libs_env_var(Sys.getenv("R_LIBS_SITE")))
Sys.setenv(R_LIBS_USER =
.expand_R_libs_env_var(Sys.getenv("R_LIBS_USER")))

local({
if(nzchar(tl <- Sys.getenv("R_SESSION_TIME_LIMIT_CPU")))
setSessionTimeLimit(cpu = tl)
if(nzchar(tl <- Sys.getenv("R_SESSION_TIME_LIMIT_ELAPSED")))
setSessionTimeLimit(elapsed = tl)
})

.First.sys <- function()
{
for(pkg in getOption("defaultPackages")) {
res <- require(pkg, quietly = TRUE, warn.conflicts = FALSE,
character.only = TRUE)
if(!res)
warning(gettextf('package %s in options("defaultPackages") was not found', sQuote(pkg)),
call. = FALSE, domain = NA)
}
}

called at C level in the startup process prior to .First.sys

.OptRequireMethods <- function()
{
pkg <- "methods" # done this way to avoid R CMD check warning
if(pkg %in% getOption("defaultPackages"))
if(!require(pkg, quietly = TRUE, warn.conflicts = FALSE,
character.only = TRUE))
warning('package "methods" in options("defaultPackages") was not found',
call. = FALSE)
}

if(nzchar(Sys.getenv("R_BATCH"))) {
.Last.sys <- function()
{
cat("> proc.time()\n")
print(proc.time())
}
## avoid passing on to spawned R processes
## A system has been reported without Sys.unsetenv, so try this
try(Sys.setenv(R_BATCH=""))
}

local({
if(nzchar(rv <- Sys.getenv("R_RNG_VERSION")))
suppressWarnings(RNGversion(rv))
})
###-- R --

this will break if R is on a network share

.Library <- file.path(chartr("\", "/", R.home()), "library")
.Library.site <- Sys.getenv("R_LIBS_SITE")
.Library.site <- if(!nchar(.Library.site)) file.path(R.home(), "site-library") else unlist(strsplit(.Library.site, ";"))
.Library.site <- .Library.site[file.exists(.Library.site)]

if(!nzchar(Sys.getenv("R_LIBS_USER")))
Sys.setenv(R_LIBS_USER=
file.path(Sys.getenv("R_USER"), "R",
"win-library",
paste(R.version$major,
sub("\..*$", "", R.version$minor),
sep=".")
))

invisible(.libPaths(c(unlist(strsplit(Sys.getenv("R_LIBS"), ";")),
unlist(strsplit(Sys.getenv("R_LIBS_USER"), ";"))
)))

local({
popath <- Sys.getenv("R_TRANSLATIONS", "")
if(!nzchar(popath)) {
paths <- file.path(.libPaths(), "translations", "DESCRIPTION")
popath <- dirname(paths[file.exists(paths)][1])
}
bindtextdomain("R", popath)
bindtextdomain("R-base", popath)
bindtextdomain("RGui", popath)
assign(".popath", popath, .BaseNamespaceEnv)
})

if(nzchar(Sys.getenv("R_PAPERSIZE"))) {
options(papersize = Sys.getenv("R_PAPERSIZE"))
} else {
if(grepl("(canada|united.states)", Sys.getlocale("LC_MONETARY"),
ignore.case = TRUE)) options(papersize = "letter")
else options(papersize = "a4")
}

options(pager = if(length(grep("--ess", commandArgs()))) "console" else "internal",
useFancyQuotes = (.Platform$GUI == "Rgui"),
pdfviewer = Sys.getenv("R_PDFVIEWER", file.path(R.home("bin"), "open.exe")))

if(.Platform$GUI == "Rgui")
Sys.setenv(GFORTRAN_STDOUT_UNIT = "-1", GFORTRAN_STDERR_UNIT = "-1")

local({
br <- Sys.getenv("R_BROWSER", NA_character_)
if(!is.na(br)) options(browser = br)
tests_startup <- Sys.getenv("R_TESTS")
if(nzchar(tests_startup)) source(tests_startup)
ca_cert <- Sys.getenv("CURL_CA_BUNDLE", NA_character_)
if(!is.na(ca_cert) &&
file.exists(ca_path <- file.path(R.home("etc"), "curl-ca-bundle.crt")))
Sys.setenv(CURL_CA_BUNDLE = ca_path)
})

R Site Profile: C:/Users/mnr/DOCUME~1/R/R-40~1.0/etc/Rprofile.site

Things you might want to change

options(papersize="a4")

options(editor="notepad")

options(pager="internal")

set the default help type

options(help_type="text")

options(help_type="html")

set a site library

.Library.site <- file.path(chartr("\", "/", R.home()), "site-library")

set a CRAN mirror

local({r <- getOption("repos")

r["CRAN"] <- "http://my.local.cran"

options(repos=r)})

Give a fortune cookie, but only to interactive sessions

(This would need the fortunes package to be installed.)

if (interactive())

fortunes::fortune()

R User Profile: C:/Users/mnr/Documents/.Rprofile

(File does not exist)

R Site Environ: C:/Users/mnr/DOCUME~1/R/R-40~1.0/etc/Renviron.site

(File does not exist)

R User Environ: C:/Users/mnr/Documents/.Renviron

(File does not exist)

R Temporary Directory

C:\Users\mnr\AppData\Local\Temp\RtmpUPjWrr

Files in R Temporary Directory

rs-graphics-9ede047b-4aae-4a84-a890-07d110d49411
view2570197d2ea8.dir

Log file: C:/Users/mnr/AppData/Local/RStudio-Desktop/log/rdesktop.log

13 Apr 2020 20:32:00 [rdesktop] ERROR generic error -2147023174 (Unknown error); OCCURRED AT: class rstudio::core::Error __cdecl rstudio::desktop::OfficeViewer::getItemFromPath(const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &,struct IDispatch **) C:\jenkins\workspace\IDE\windows-v1.2\src\cpp\desktop\DesktopOfficeViewer.cpp:192; LOGGED FROM: void __cdecl rstudio::desktop::GwtCallback::prepareShowWordDoc(void) C:\jenkins\workspace\IDE\windows-v1.2\src\cpp\desktop\DesktopGwtCallback.cpp:648
13 Apr 2020 20:40:32 [rdesktop] ERROR generic error -2147023174 (Unknown error); OCCURRED AT: class rstudio::core::Error __cdecl rstudio::desktop::OfficeViewer::getItemFromPath(const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &,struct IDispatch **) C:\jenkins\workspace\IDE\windows-v1.2\src\cpp\desktop\DesktopOfficeViewer.cpp:192; LOGGED FROM: void __cdecl rstudio::desktop::GwtCallback::prepareShowWordDoc(void) C:\jenkins\workspace\IDE\windows-v1.2\src\cpp\desktop\DesktopGwtCallback.cpp:648
27 Apr 2020 17:46:22 [rdesktop] ERROR generic error -2147023174 (Unknown error); OCCURRED AT: class rstudio::core::Error __cdecl rstudio::desktop::OfficeViewer::getItemFromPath(const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &,struct IDispatch **) C:\jenkins\workspace\IDE\windows-v1.2\src\cpp\desktop\DesktopOfficeViewer.cpp:192; LOGGED FROM: void __cdecl rstudio::desktop::GwtCallback::prepareShowPptPresentation(void) C:\jenkins\workspace\IDE\windows-v1.2\src\cpp\desktop\DesktopGwtCallback.cpp:659

Log file: C:/Users/mnr/AppData/Local/RStudio-Desktop/log/rsession-mnr.log

04 Jun 2020 01:47:47 [rstudio-diagnostics] ERROR system error 32 (The process cannot access the file because it is being used by another process) [path: C:/Users/mnr/AppData/Local/RStudio-Desktop/log/rsession-mnr.log]; OCCURRED AT auto __cdecl rstudio::core::FilePath::openForRead::<lambda_08754985928f41bffddcf4ccb546a6bb>::operator ()(void) const src/cpp/shared_core/FilePath.cpp:1134; LOGGED FROM: void __cdecl `anonymous-namespace'::writeFile(const class std::basic_string<char,struct std::char_traits,class std::allocator > &,const class rstudio::core::FilePath &,class std::basic_ostream<char,struct std::char_traits > &) src/cpp/diagnostics/DiagnosticsMain.cpp:63
(Empty)

User prefs: C:/Users/mnr/AppData/Roaming/RStudio/rstudio-prefs.json

{
"show_margin": false,
"font_size_points": 14,
"default_project_location": "~",
"document_author": "Mark Niemann-Ross",
"rmd_preferred_template_path": "C:/Users/mnr/Documents/R/R-4.0.0/library/learnr/rmarkdown/templates/tutorial",
"wrap_tab_navigation": false,
"reuse_sessions_for_project_links": true,
"jobs_tab_visibility": "shown"
}

System prefs: C:/ProgramData/RStudio/rstudio-prefs.json

(Not Found)

User state: C:/Users/mnr/AppData/Local/RStudio/rstudio-desktop.json

{
"context_id": "E5B0E511",
"document_outline_width": 193,
"error_handler_type": "traceback"
}

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.