Can a function in R return two vectors?

Viewed 16336

Can a function in R return not one, but two vectors?

(I am really beginning with R, so I might be overlooking something simple)

1 Answers

Return them in a list:

return(list(v1 = v1, v2 = v2))
Related