Note 1) This instruction is based on sellorm.com plus my own trial and error experience. His/her instruction was awesome other than a couple of minor typos that would cause some confusion during the installation. 2) I assume that you are planning to use the Linux environment that came with your Chromebook.
Installation environment
- Chromebook: HP Chromebook 15.6 (4GB RAM)
- ChromeOS: Version 80.0.3987.128 (Official Build) (64-bit)
- Linux Distribution: Debian 9
- To turn on the Linux environment in your Chromebook, please refer to this link.
Linux Code – Installing R
sudo apt search r-base | grep ^r-base
sudo apt install -y gnupg2
sudo apt-key adv --keyserver keys.gnupg.net --recv-key 'E19F5F87128899B192B1A2C2AD5F960A256A04AF'
sudo vi /etc/apt/sources.list
The line of code above will open up a document where you will need to add a line of code at the end of the document. The code is shown below (the original instruction from sellorm.com omitted the ‘/’ at the end, which I am not sure whether it is a typo or because he/she is using a different system). In case I did not add the last ‘/’, it reported an error and the source is not recognized during the subsequent use.
It adds the repository to the existing pool of the repository. In case you have never used a vi text editor.
1) ‘shift+g’ will take you to the last line;
2) ‘o’ will add a new line and the editor will turn into the insert mode;
3) ‘esc’ will exist the insert mode;
4) ‘:wq’ will save and exit.
deb https://cran.rstudio.com/bin/linux/debian stretch-cran35/
sudo apt update
sudo apt upgrade
Finally, installing r base.
sudo apt install -y r-base r-base-dev
Linux Code – Installing RStudio
Download the latest RStudio package from rstudio.org and save it as rstudio.deb. You can replace the URL with the lastest one from rstudio.org website.
curl -o rstudio.deb https://download1.rstudio.org/desktop/debian9/x86_64/rstudio-1.2.5033-amd64.deb
Then, I install the package.
sudo dpkg -i rstudio.deb
Mine encountered a problem after the installation. Specifically, when clicked on the icon, RStudio won’t start and a loading circle continues to hover on the surface of the RStudio icon. When tried to use the terminal to load, the terminal showed the following message.
#This part is an error message, not code.
rstudio: error while loading shared libraries: libsmime3.so: cannot open shared object file: No such file or directory
The problem is fixed by the following line of code.
sudo apt install libnss3
References:
https://blog.sellorm.com/2018/12/20/installing-r-and-rstudio-on-a-chromebook/
https://community.rstudio.com/t/installation-error-cannot-find-libsmime3-so/30646/3

Nice writeup, thank you!
This was very much needed. Thank You!!
I had to install and uninstall a couple of times before it got to working. Initially it would just appear and then disappear.