Displaying 1 result from an estimated 1 matches for "sample_data_tx".
2012 May 01
2
Question about expand.grid function in R
Hi,
I am extremely new to R, and was wondering if someone would be able to help me with a question regarding the expand.grid function. When I input
expand.grid.rep <- function(x, n=1) do.call(expand.grid, rep(list(x),n))
expand.grid.rep(c("a", "b", "c"), 3)
my output is as follows,
Var1 Var2 Var3
1 a a a
2 b a a
3 c a a
4 a