I have a csv file which contains two columns: A1 and A2. Supposing I have the following function:
WKH <- function(A, B){
S <- ((B-A)-(B+A)/2
return(S)
}
So how can I loop through the columns A and B so that the corresponding WKH can be estimated for all values under the two columns.