Re: [R] Create a numeric series in an efficient way

2024-06-13 Thread avi.e.gross
quot;Smith" "Smith" "Smith" "Smith" "Jones" "Jones" "Jones" "Gunter" If that remains unclear, I am doing something wrong today. It is nice to see alternatives but some people just want one answer. Read my first mes

Re: [R] Create a numeric series in an efficient way

2024-06-13 Thread Bert Gunter
"If you want a much more compact solution that handles arbitrary pairs of "what to copy", number_of_copies, you can write a function that evaluates two arguments at a time or takes two vectors as arguments like this one I wrote quickly and crudely:" Please! -- The "times" argument of rep can be a

Re: [R] Create a numeric series in an efficient way

2024-06-13 Thread avi.e.gross
For the particular example you asked for, consider the "each" you can use with rep() rep(1:13, each=84) This is what it does for a shorter version of 4 each: > rep(1:13, each=4) [1] 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10

Re: [R] Create a numeric series in an efficient way

2024-06-13 Thread Ebert,Timothy Aaron
Bert Gunter Sent: Thursday, June 13, 2024 9:13 PM To: Ebert,Timothy Aaron Cc: Francesca PANCOTTO ; r-help@r-project.org Subject: Re: [R] Create a numeric series in an efficient way [External Email] Nope. She would have wanted the 'each' argument = 84. See ?rep. -- Bert On Thu, Jun 13,

Re: [R] Create a numeric series in an efficient way

2024-06-13 Thread Bert Gunter
> To: r-help@r-project.org > Subject: Re: [R] Create a numeric series in an efficient way > > [External Email] > > I apologize, I solved the problem, sorry for that. > f. > > > > Il giorno gio 13 giu 2024 alle ore 16:42 Francesca PANCOTTO < > francesca.panco

Re: [R] Create a numeric series in an efficient way

2024-06-13 Thread Ebert,Timothy Aaron
rom: R-help On Behalf Of Francesca PANCOTTO via R-help Sent: Thursday, June 13, 2024 2:22 PM To: r-help@r-project.org Subject: Re: [R] Create a numeric series in an efficient way [External Email] I apologize, I solved the problem, sorry for that. f. Il giorno gio 13 giu 2024 alle ore 16:42 Fra

Re: [R] Create a numeric series in an efficient way

2024-06-13 Thread Francesca PANCOTTO via R-help
I apologize, I solved the problem, sorry for that. f. Il giorno gio 13 giu 2024 alle ore 16:42 Francesca PANCOTTO < francesca.panco...@unimore.it> ha scritto: > Dear Contributors > I am trying to create a numeric series with repeated numbers, not > difficult task, but I do not seem to find an e