Reputation: 11
I have the code below;
seq(rep(1, 7, by = 2), times = 7)
which gives an error shown below;
Warning message: In seq.default(rep(1, 7, by = 2), times = 3) : extra argument 'times' will be disregarded Error: 'from' must be of length 1
How do I rectify the error?
Upvotes: 1
Views: 513
Reputation: 16099
You have the functions the wrong way around.
rep(seq(1, 7, by = 2), times = 7)
Upvotes: 2