I summed two colums, Sweden.pymen and Swede.pywomen, and created Sweden.pyall - the entries are numbers. This is the code i used:
Sweden_py.all <- (Sweden$py.men + Sweden$py.women)
but i need to have it stored as a column with one value under the other and not all in the same cell.
Any help would be great! Cheers
I think you want dplyr::mutate
for this:
require(dplyr)
Sweden <- Sweden %>%
mutate(py.all = py.men + py.women)
You should check out this intro for basic data wrangling: https://dplyr.tidyverse.org/articles/dplyr.html