R Studio not using the newest R version on my computer - r

I installed R 3.5.3, then restarted my Windows 7 computer. Next I launched R Studio and ran the command sessionInfo() and am informed that R Studio is still utilizing R version 3.5.1.
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
I went to the Tools > Global Options > General > R Version and get a screen like this
(source: rstudio.com)
Although I could simply select the specific version of R I'd like to use (eg 3.5.3) I want R Studio to use the default version of R on my machine, which I'd always want to be the most current version of R on my machine.
How do I achieve this? I'm using the installr package to update R every six months or so. It seems installr doesn't force Windows 7 to realize I've got a new R version on my system.

Related

Why changing R version from global options won't affect R version used in the console?

I am trying to figure out which version of R is currently being used by Rstudio. I changed the R version under: tools/global options/general/ R sessions/ R version.
But the version being used by the console seems not affected. I also tried restarting the R session under: Session/ Restart R. Running R.version in console prints the version 4.0.5 yet I have changed the version of R from global options.
here is a screenshot of what I see on Rsutio.

Why does not trace() function work in R-Studio?

I am trying to see the source code of the ga function from the GA package in R in order to edit it. R-Studio is trying to open a window but, nothing comes up. When I tried for the mutate function, it can open a window. Also, when I tried trace(ga, edit = TRUE) in base R, it works. I am using the newest version of R-Studio, too. I wonder what I am doing wrong.
Here is the sessionInfo for both base R and R-Studio.
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

knit to PDF not working R V4.0.0 RStudio V1.2.5042

Unable to get RStudio to knit to PDF post-RV4.0.0 update HTML, WORD work).
Error returned: Searching for luatex.dll, which does not seem to install following (i) install.packages('tinytex') (ii) tinytex::install_tinytex().
Curiously, luatex.dll is found in my older 3.5.3 and 3.6.3 .\TinyTeX\bin\win32 directories. rTools is current for R4.0.0, with path added per website. Similarly, pdflatex.fmt mising in install from 4.0.0. In all cases followed advice from Yihui Xie et al. websites.
Have tried several re-installs, including a full install of MikTeX. No joy.
tinytex Version is 0.22. basic session info is:
sessionInfo()
R version 4.0.0 (2020-04-24)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
I am puzzled because I have successfully installed tinytext etc on 3.X.X R and previous versions of RStudio, and knited PDFs (including use of bookkdown) with no problems. Thx in advance.

Two different R versions and invoking of older R version

I recently installed latest version of R(3.3.1) on my mac but somehow the R is still pointing to the old R version which I had. When R is invoked in command line it show the new version but on typing version in R environmnet the older(3.0.2) is shown.
What changes should be made so as to update to newer R version?
Also I deleted previous versions directories from Frameworks.
Additionally probably because of this issue I get an error when I start R studio.
ls /Library/Frameworks/R.framework/Versions/
3.3 Current
===========================
user1#my-mac:~$ R
Error in objects(db.pos, all.names = TRUE) :
2 arguments passed to .Internal(ls) which requires 3
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)
....
....
Error in gzfile(file) : invalid 'encoding' argument
During startup - Warning message:
unable to restore saved data in .RData
> version
_
platform x86_64-apple-darwin10.8.0
arch x86_64
os darwin10.8.0
system x86_64, darwin10.8.0
status
major 3
minor 0.2
year 2013
month 09
day 25
svn rev 63987
language R
version.string R version 3.0.2 (2013-09-25)
nickname Frisbee Sailing
In Mac, point rstudio to the newer version of R using the RSTUDIO_WHICH_R environment variable.
export RSTUDIO_WHICH_R=/usr/local/bin/R

RODBC and Access - odbcConnectAccess on Ubuntu 14.04

I'm having a similar problem as this one:
RODBC and Access - Loading data
but I'm working on Ubuntu 14.04 OS.
As stated, I need to query an Access file I have. I've tried
db <- "foo.accdb"
con <- odbcConnect(db)
which obviously doesn't work as the function I should use is odbcConnectAccess2007(), which is not available for package RODBC and is not listed on the manual:
http://cran.r-project.org/web/packages/RODBC/RODBC.pdf
I'm using RStudio Version 0.98.1091 with
R version 3.1.2 (2014-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
My question is:
Is there any way I can access an Access database in a file using R from an Ubuntu computer?

Resources