The R base pipe is a recent development of R and increases the performance of the code. However, it requires changes in the way we code.
Main changes:
%>% has been replaced with |>
if statements within pipes are not supported by |>. Therefore pipes have been split, which is sometime good when the pipe is too long.
dots (.) to refer to an argument are not supported by |>. Therefore, they have been deleted when possible (sometimes the dots were not really needed) and only if needed the R base replacement for the dot was used: argumentName = _. Unlike with dots, _ always requires the argument name to work properly.
Main win:
The speed of performance increased very much. 270,000 iterations require 2 seconds instead of 5 seconds!
The R base pipe is a recent development of R and increases the performance of the code. However, it requires changes in the way we code.
Main changes:
%>%
has been replaced with|>
|>
. Therefore pipes have been split, which is sometime good when the pipe is too long.|>
. Therefore, they have been deleted when possible (sometimes the dots were not really needed) and only if needed the R base replacement for the dot was used:argumentName = _
. Unlike with dots,_
always requires the argument name to work properly.Main win: The speed of performance increased very much. 270,000 iterations require 2 seconds instead of 5 seconds!