Reputation: 724
I want to create a data.frame in R which has all the possible combinations of the following columns:-
Upvotes: 0
Views: 146
Reputation: 1780
Its not exactly clear to me what you would like to achieve. For example you can use expand.grid()
to create a data.frame with all possible combinations:
items <- 1:200
weeks <- 1:52
place <- c("Top", "Center", "Bottom")
price <- 1:200
expand.grid(items, weeks, place, price)
Upvotes: 1