With national characters in username there might be some problems in interaction between R and Rstudio. The root of the problem is the home folder name. For user “Машеньки” the path will be “C:/Users/Машенька/”.
If you use your windows for a long period of time and you would like to keep the username with national characters then follow details of this guide :)
During installation process double check that R and Rstudio are installed into folders without national characters.
We recommend to install R into `C:/R`, and Rstudio into `C:/Rstudio`.
No, we don’t want to instal a virus on your computer :) Just we have encountered some problems during installation if anti-virus is active.
Rstudio — is just a pretty graphical interface to R. Brutal programmers may avoid Rstudio and use neovim or emacs :) Do not confuse Rstudio and R-studio, which is a non-free program for data recovery.
Launch RStudio. Go to Tools — Global options.
In General section:
* remove mark 'Restore .Rdata into workspace in startup'.
* select `Never` in Save workspace to .Rdata on exit
In Sweave section:
* select 'knitr' in 'Weave .Rnw files using'.
In Code - Diagnostics section:
* выставьте все галочки.
These are additional tools, that allow us, for example, to create excel files from R.
7.1. Create special folder to store R pacakges, for example C:/Rlib
. Avoid spaces and national letters!
7.2. In Rstudio console do
system("setx R_LIBS C:/Rlib")
You may replace C:/Rlib
at your wish prodived you use no spaces nor national letters.
7.3. Relaunch Rstudio
7.4. Check that R knows the location to store package. Inside Rstudio console do
.libPaths()
It should point to C:/Rlib
. Now all R packages will install into C:/Rlib
.
Download install_all.R. Open the file in RStudio (File
— Open file
). Run it by selecting Code
— Source with Echo
. Internet connection is required for package installation.
You may encounter question: “Do you want to install from sources the packages which need compilation?”
You should answer “No”!
Explanation: some packages require a working copy of C++ on your computer to install packages from source. Without C++ on your computer installation from source will fail. If your answer “No” precompiled packages will be installed.
Appearing red messages do not signify an error, a sign of an error is the explicit word “Error”.
Rstudio — is just a pretty graphical interface to R. Brutal programmers may avoid Rstudio and use neovim or emacs :) Do not confuse Rstudio and R-studio, which is a non-free program for data recovery.
Launch RStudio. Go to Tools — Global options.
In General section:
* remove mark 'Restore .Rdata into workspace in startup'.
* select `Never` in Save workspace to .Rdata on exit
In Sweave section:
* select 'knitr' in 'Weave .Rnw files using'.
In Code - Diagnostics section:
* check all boxes.
system("defaults write org.R-project.R force.LANG en_US.UTF-8")
This will force the use of english language.
Download install_all.R. Open the file in RStudio (File
— Open file
). Run it by selecting Code
— Source with Echo
. Internet connection is required for package installation.
You may encounter question: “Do you want to install from sources the packages which need compilation?”
You should answer “No”!
Explanation: some packages require a working copy of C++ on your computer to install packages from source. Without C++ on your computer installation from source will fail. If your answer “No” precompiled packages will be installed.
Appearing red messages do not signify an error, a sign of an error is the explicit word “Error”.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'
sudo apt update
Вместо bionic
(для 18.04) должно быть кодовое название версии Ubuntu (disco для 19.04)
sudo apt-get install r-base r-base-dev
Rstudio — это всего лишь удобная красивая графическая оболочка к R. Суровые брутальные программисты могут вполне обойтись и без Rstudio :) Не спутайте Rstudio с R-studio, платной программой для восстановления данных.
Запустите RStudio. Зайдите в раздел Tools — Global options.
В разделе General:
* уберите галочку у Restore .Rdata into workspace in startup.
* выберите `Never` у Save workspace to .Rdata on exit
В разделе Sweave:
* "Weave .Rnw files using" выберите knitr.
В разделе Code - Diagnostics:
* выставьте все галочки.
sudo apt-get install libcurl4-openssl-dev libxml2-dev libssl-dev
Скачайте файл install_all.R. Откройте его в RStudio (File
— Open file
). Запустите, выбрав Code
— Source with Echo
. При этом требуется соединение с Интернетом.
Бегущие красные надписи не означают ошибок, признаком ошибки является только явное сообщение Error.
etc/environ
. Поэтому если в этом файле в переменной PATH нет пути к латеху, то Rstudio не увидит латех. Достаточно добавить путь к латеху в этом файле :)