I have found the following solution on here about the post: https://stackoverflow.com/a/34327262/2994949
The user eipi10 uses =
insted of <-
to assign a value to the corrFunc
function. Why does he do this?
Also, he/she creates the data.frame in the next line, but does not use a return
to have that data.frame returned from the code. The function works, so I wonder why and how.
EDIT
Does it provide any advantages to used or not to use the return
command? This is something that has not been answered before, that's why I think this is not a duplicate.
I tried to ask this in a comment, but I need 50 reputation to put comments and why I put an answer in the initial thread, it was immediately deleted. Could anybody tell me, how to ask about a solution I find in a thread when I can not comment and can not post an answer?
Thank you.
EDIT
The first part of my question has been answered partly by the link but I still do not understand why the return
is avoided. thanks :)