Base R's paste and paste0 functions: how to use the sep and collapse arguments (CC285)

May 23, 2024 • PD Schloss • 1 min read

The paste and paste0 functions are powerful tools for creating strings in base R that don’t require dependencies. You can even paste together two vectors element-wise separating the values with the sep argument and then paste together all elements of the resulting vector with the collapse argument. Pat will use paste and other base R functions to filter taxonomy data by confidence score and then output the result in an attractive string using paste. This episode is part of an ongoing effort to develop an R package that implements the naive Bayesian classifier.

Code

You can browse the state of the repository at the