I am trying to do the following in R.
Along the rows, I have a set values for a variable X. Along the columns, I have a set values for variable y.
For each combination of X and Y, I would like to perform a calculation and then summarize the results in a two-way data table.
One way I thought of was to create a row matrix containing the combination of row and column. Then rbind all the rows. But the process would be tedious and time-consuming. Is there a more efficient way to build this able using R?
Thanks.