Hello compadRes, I'm developing a script that selects "cells" over a certain metabolic rate to kill them. A rate between 9 and 12 means that the cells are candidates for death.
I'll show you what I mean: # a would be a vector of cell metabolic rates. a<-c(8, 7, 9, 6, 10, 11, 4, 5, 6) #now identify which cells will be candidates for death, namely those cells with metabolic rates>9 b<-a[a>6] #This would select all cells with rates >6 rbinom(length(b), size=1, prob=1) #This will select cells using a an exponential probability distribution rbinom(length(b), size=1, prob=(seq(0, 1, by=0.1)^2)) I have two questions: 1) Am I correct in my interpretations? 2) I'd actually like to have this probability scaled so that cells with rates of 9 are unlikely to be selected and those near 12 are highly likely. How can I code this? Thanks in advance, Wyatt > sessionInfo() R version 2.11.1 (2010-05-31) i386-pc-mingw32 locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] tools_2.11.1 K. Wyatt McMahon, Ph.D. Postdoctoral Research Associate Department of Internal Medicine 3601 4th St. - Lubbock, TX - 79430 P: 806-743-4072 F: 806-743-3148 [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.