What I want to do would be as follows in C#:
for (int i = 1; i <= 44; i++)
{
for (int j = i + 1; j <= 44; j++)
{
System.Diagnostics.Debug.WriteLine(i + " " + j);
}
}
This produces 1,...,44 then 2,...44 etc.
I tried to replicate this in R via:
for (i in 1:44) for (j in i+1:44) print(paste(i, " ", j))
Results are completely wrong. I would appreciate if someone could explain to me how to emulate the results I get in C# in R - I find the syntax in R very unintuitive.
Thanks in advance.