 

Dear all,

I sample without replacement elements of a vector and generate a new
vector:

 

kl<-c(1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,5,5,5,5,5,6,6,6,6,6,7,7,8,8,
8,8,8,8,8,8,8)

 

the_index<-c(sample(40,35))

 

for(fs in
1:length(the_index)){if(fs==1){s<-c(kl[the_index[fs]])}else{s<-
append(s, kl[the_index[fs]], after = length(s))}}

 

I am running in BATCH mode this script in a cluster that is able to run
two processes at the same time. I am invoking the script 10 times and I
have 5 different values of the the_index (that is the sample command
generates two repeats of its values 5 times and regularly). What I want
is to have 10 different values of the the_index.

 

I do not know why this happens,  but could I use Random.seed to avoid
this problem. How?

Regards,

Itziar


 
 
 
Este correo electronico se ha enviado desde CIC bioGUNE. Su contenido, y el de cualquier fichero que le acompane, son confidenciales y de uso exclusivo de la persona fisica o juridica a la que va destinado. Esta estrictamente prohibida, y puede ser ilegal, la copia o difusion no autorizada de este correo, o de sus documentos adjuntos, o revelar cualquier informacion que pudieran contener. Si ha recibido este correo electronico por error, por favor notifiquelo al remitente o contacte con el telefono + 34 944 06 13 00 y borrelo de su sistema informatico.

Posta elektroniko bidezko mezu hau CIC bioGUNEtik bidali da. Bertako edukia, eta erantsita egon daitekeen edozein fitxategirena, konfidentziala da, mezuaren hartzaile den pertsona fisikoak edo juridikoak bakarrik erabiltzekoa. Erabat debekatuta dago, eta legez kanpokoa ere izan daiteke, mezu hau edo erantsitako fitxategiak baimenik gabe kopiatzea edo zabaltzea, bai eta bertako informazioa besteri jakinaraztea ere. Mezu hau zuretzat ez bada, adieraz iezaiozu bidaltzaileari, edo deitu + 34 944 06 13 00 telefono-zenbakira eta ezabatu zure ordenagailutik.

This e-mail is from CIC bioGUNE. The e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any unauthorised dissemination or copying of this e-mail or its attachments, and any use or disclosure of any information contained in them, is strictly prohibited and may be illegal. If you have received this e-mail in error, please notify or telephone + 34 944 06 13 00 and delete it from your system.



	[[alternative HTML version deleted]]

