-
Notifications
You must be signed in to change notification settings - Fork 11
Developer How To's
Pavel Balazki edited this page Aug 2, 2019
·
12 revisions
https://github.com/Open-Systems-Pharmacology/Suite/blob/develop/CODING_STANDARDS_R.md
Examples of packages that can serve as inspiration:
- Show all shortcuts:
Alt+Shift+K
- Reload package:
Cmd + Shift + L
- Navigate to:
Ctrl + .
- Generate Doc:
Ctrl + Shift + D
- Run unit tests:
Ctrl + Shift + T
- Navigate to implementation:
Mouse over + F2
orCTRL + Mouse Click
- Un-/Comment line/selection:
Ctrl + Shift + C
- Multi-select:
CTRL+SHIFT+ALT+M
Profiling of code can be done within R-Studio with the package profvis
, a descirption of the process is given here. In short, pass the code to be profiled as argument to the function profvis
:
profvis({
data(diamonds, package = "ggplot2")
plot(price ~ carat, data = diamonds)
m <- lm(price ~ carat, data = diamonds)
abline(m, col = "red")
})
- Download Ubuntu from https://ubuntu.com/download/desktop
- Tutorial: https://www.youtube.com/watch?v=oyNjjzg-UXo = >This is a very good intro to get ubuntu installed from scratch
-
Download R studio from here At the time of writing:
rstudio-1.2.1335-amd64.deb
-
Then perform the followign commands
sudo apt-get install libopenblas-base r-base
sudo apt-get install gdebi
sudo gdebi rstudio-1.2.1335-amd64.deb
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libssl-dev
sudo apt-get install libxml2-dev libxslt-dev
- Open R studio
- Enter command
install.packages("devtools")
https://dotnet.microsoft.com/download/linux-package-manager/ubuntu18-04/sdk-current