I have attempted to use the following code to come up with a table of unique combinations of a bunch of variables.
V1=as.vector(CRmarch30[1])
V2=as.vector(CRmarch30[2])
V3=as.vector(CRmarch30[3])
V4=as.vector(CRmarch30[4])
V5=as.vector(CRmarch30[5])
V6=as.vector(CRmarch30[6])
V7=as.vector(CRmarch30[7])
As you may have already guessed, CRmarch30 is a dataframe with 7 columns. I converted each column into a vector. Then, i used the following code to create all unique combination of the 7 variables:
combo=expand.grid(V1,V2,V3,V4,V5,V6,V7)
combo
Instead of getting the output, I get the following error message:
Warning message:
In format.data.frame(x, digits = digits, na.encode = FALSE) :
corrupt data frame: columns will be truncated or padded with NAs
Could someone please help me with this please?