Data Challenge Lab Home

Row-wise operations [wrangle]

(Builds on: Vector functions)

Until now, you’ve been using vector functions inside mutate() to create new columns. In Vector functions, you learned how to convert some scalar functions into vector functions. Sometimes, however, you’ll want to use a scalar function to create a new column, and you won’t be able to convert that scalar function into a vector function.

In this reading, you’ll learn how to use row-wise operations to call a scalar function multiple times with varying arguments. These operations can also be used for row-wise aggregates and working with list-columns.

Readings