[R-sig-eco] Help with a function

Rodrigues rodriguesmsb at gmail.com
Sat Jun 7 00:48:47 CEST 2014


Hello,

I would like to thanks everyone for the help.
I did this one:

blinding=function(sampling){
  sort1=sample(idf[casod==1],30,replace=F)
  sort2=sample(idf[casod==3],30,replace=F)
  var1=factor(c(rep(1,30),rep(2,30)),labels=c("Positivo","Negativo"))
  var2=cbind(c(pos=sort1,neg=sort2))
  var3=sample(1:60,replace=F)
  df=data.frame(Status=var1,IDF=var2,TRP=var3) 
  return(write.csv(df,file="Piloto.csv",row.names=F))

It`s not exactly a function but works for me. 
BTW I found this site:
http://manuals.bioinformatics.ucr.edu/home/programming-in-r
I`ll try to learn a little more about r functions


Regards,
Moreno




--
View this message in context: http://r-sig-ecology.471788.n2.nabble.com/Help-with-a-function-tp7578931p7578939.html
Sent from the r-sig-ecology mailing list archive at Nabble.com.



More information about the R-sig-ecology mailing list