Show Menu
Cheatography

R Problem Solutions Cheat Sheet (DRAFT) by

These are problems I encounter frequently enough to have looked for a solution before, but not so frequently that I remember how to solve them without scratching my head over it.

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Section 1

PROBLEM
SOLUTION
I've got multiple columns of partial data with some NA values, and I want to merge them into a single column.
coalesce (dplyr)
If I want to check for confli­cting values before merging. Select the columns of interest in the df, then:
`df %>% rowwise() %.%
 

Section 2