I want to write a script in R for the following equation and make dataframe for each corresponding result.
x<-c(1:5)
y<-c(1:5)
z<-4*(x+2*y)
I need to locate each result of different combination of value of X & Y, just like an excel table format with Rows/ Columns list from 1 to 5. How can I achieve by using a for loop function. Thanks a lot.