First published: 13 Nov 2016
Last updated: 13 Nov 2016
The easiest and quickest way to install R on Debian is to download and install the latest RStudio package as follows.
Copy the link to the latest version of RStudio from https://www.rstudio.com/products/rstudio/download/.
For example, this will look like
Download it using
wget, for example,
wget https://download1.rstudio.org/rstudio-0.99.878-amd64.deb. Finally, install it using
dpkg as follows:
sudo dpkg -i rstudio-0.99.878-amd64.deb
Suppose that for this example we are using a data frame with 2 columns, country and age, for instance. To keep the data for say country Italy, we use
italy_only = filter(data, country=="Italy"). This filters out all the other data except for the ones where country is equal to Italy.
To select only one column, say age, use
It is useful to combine commands on one line by using pipes as follows:
Italy_age_only = filter(data, country=="Italy") %>% select(age) %>% unlist
mean(averages <= high) - mean(averages < low), where
averages is an array of values, and
high are the respective limits.