Re: [R] Finding which seed resulted in a specific sample

2015-04-13 Thread Prof Brian Ripley
On 13/04/2015 10:12, Isabel Natario wrote: Hello! I was wanting to find out which random seed could generate the characters in the word "love", for example, when I sample with replacement from the vector of the letters. So I've written the code below: seed=0 set.seed=0 x<-sample(letters,4,repla

Re: [R] Finding which seed resulted in a specific sample

2015-04-13 Thread Thierry Onkelinx
you need set.seed(seed) instead of set.seed = seed ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance Kliniekstraat 25 1070 Anderlecht Belgium To call in the statistician afte

[R] Finding which seed resulted in a specific sample

2015-04-13 Thread Isabel Natario
Hello! I was wanting to find out which random seed could generate the characters in the word "love", for example, when I sample with replacement from the vector of the letters. So I've written the code below: seed=0 set.seed=0 x<-sample(letters,4,replace=T) while (sum(x==c("l","o","v","e"))<4){ s