1

I have a df with one column and I would like to make combinations with the values of this column in order to have a new df with two columns, like he simple example below: (Obs: my df has ~5000 rows)

df

CG
1
2
3

##I would like a result similar to this:
> head(df1)
C1 C2
1   1
1   2
1   3
2   1
2   2
2   3
3   1
3   2
3   3

Does someone could help me? Thank you in advance

pete
  • 129
  • 5

0 Answers0