After using "format code" in the latest RStudio, the parameters of functions are split into different lines and kept aligned.
But I am unable to find the corresponding settings in formatR package. How to do it with formatR?
Consider the source code:
my_sum = function(a = 1, b = 2, c =3) {
return(a + b + c)
}
The desired formatted result (RStudio returns this):
my_sum = function(a = 1,
b = 2,
c = 3) {
return(a + b + c)
}