With great power comes not only great responsibility, but often great complexity — and that sure can be the case with R. The open-source R Project for Statistical Computing, a programming language and environment, offers immense capabilities to investigate, manipulate and analyze data. But because of its sometimes complicated syntax, beginners may find it challenging to improve their skills after learning some basics.
Getting your data around R
- Adding a column to an existing data frame
- Syntax 1: By equation
- Syntax 2: R’s transform() function
- Syntax 3: R’s apply function
- Syntax 4: mapply()
- Syntax 5: tidyverse's dplyr
- Getting summaries by data subgroups
- Bonus special case: Grouping by date range
- Sorting your results
- Reshaping: Wide to long
- Reshaping: Long to wide
If you're not even at the stage where you feel comfortable doing rudimentary tasks in R, we recommend you head right over to Computerworld's Beginner's Guide to R. But if you've got some basics down and want to take another step in your R skills development — or just want to see how to do one of these four tasks in R — please read on.
To read this article in full, please click here