I’m using the computional cluster to run R enviroment. But I haven’t got the access to the root or sudoers.
Usually, I will choose Docker to set up a totally independent enviroment. This doesn’t work right now, because to launch a docker daemon, you have to get the permission to access root.
I use linuxbrew to set up the enviroment at first. But sometimes it won’t work as well when it comes to the library dependencies.
The mainly reason is that linuxbrew just installs some softwares into the user’s directory, but we still depend on some system libraries and so on. For example, I found that the version of libstdc++ does not meet a software.
I installed all version of gcc and tried to substitute all correlated library to these system ones. However, even vim refuse to work right now.
Good news are that I recently Anaconda can support building a R enviroment friendly.
First of all, download the Anaconda3-2018.12-Linux-x86_64.sh according your operating system.
Then install softwares, I need library Seurat, so some softwares are needed:
Then install all library you need inner R
It is easy to generate html using through knit. However, sometimes pdf generating will be an obstacle. The most common advise is Pandoc.
However, when I try to generate pdfs, I found all format good in html became really unacceptable. After some search, I decided to generate PDF through webshot library in R. The installation step is as follows:
Now you can generate pdf through Rscript:
Problems emerged when opened the pdf file due to the pages. Because webshot generates pdf with a huge page without break, it is hard for pdf viewer to load a page. So I had to find anothe software. html-pdf can solve the pages problem, to install:
conda install nodejs
I just improve a script from stackoverflow