choose randomly

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

choose randomly

Bert, I am very grateful for your clear explanation!!!
  Bert Gunter
  If n = N, then this is unnecessarily complicated.
  is all you need (see ?sample).
  If n < N, then the "trick" is not done.
  sample(mydata$Temperature, n)
  is what is wanted.

Thank you, Jim, you always come to the rescue!
  Jim Lemon
  should do the trick. You will just get a pseudo-randomly shuffled set
  of the same values.

Medic <[hidden email]> wrote:
> > Variable temperature:
> > mydata$temperature
> > has N values.
> > With what code to —Āhoice (without return) n values from them RANDOMLY?

[hidden email] mailing list -- To UNSUBSCRIBE and more, see
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.