I'd like to create a new data table using the following vectors. I have two tables, a list of 100 people, and a list of 5 tests. I want to combine the tables, however, I want a row for each test for each subject, so in the new table i'll have 500 rows. I used simplified example below. This is in R
person <- data.frame(c("a", "b", "c", "d"))
test <- data.frame(c("1", "2", "3", "4", "5"))
I want to make a new table from this like below
person test
a 1
a 2
a 3
a 4
a 5
b 1
b 2
b 3
b 4
b 5
... etc.
I initially tried joining, but there are no variables to match on, and also tried pasting with no luck. I feel i'm missing something because this sounds simple. Any help would be appreciated!