Quick Take: How to Use The Across Function in R Programming

Pierre DeBois
3 min readOct 26, 2022

(Update as of November 19th, 2023: I incorporated the correction mentioned in the comments from Paul Jacobson. Special thanks to Paul for catching my oversight.)

If you are starting out in R and data science, you will find functions that become your go-to tactics in code creation. One function that will likely get the most keyboard action among data scientists and analysts is the across() function. The across() function is designed to apply a calculation or function on one or several columns at once.

--

--

Pierre DeBois

#analytics |#datascience |#JS |#rstats |#marketing services for #smallbiz | #retail | #nonprofits Contrib @CMSWire @smallbiztrends #blackbusiness #BLM