search for: no_of_gen

Displaying 2 results from an estimated 2 matches for "no_of_gen".

Did you mean: no_of_genes
2012 Nov 08
1
Extract cell of many values from dataframe cells and sample from them.
...Effectors=as.character(Effectors)) But your 6th line of code doesn't work ... there is no object inds2. Ind_Genes<-strsplit(as.character(inds2[1,4]),",") If I use code that you provided in your earlier e-mail to create inds2, I get errors because inds doesn't have a variable No_of_Genes. Genes <- lapply(1:nrow(inds),function(x) sample(1:10000,inds$No_of_Genes,replace=TRUE)) inds2 <- data.frame(inds, Genes=I(Genes)) inds2$No_Expressed_Genes <- round(as.numeric(lapply(1:nrow(inds2),function(x) runif(1, min=10, max=50)))) So, before you hit the send button on your next e...
2012 Nov 06
1
sample from list
Hi all, I have a list of genes present in 500 individuals, the individuals are the elements: Genes <- lapply(1:nrow(inds),function(x) sample(1:10000,inds$No_of_Genes,replace=TRUE)) (This was later written to a dataframe as well as kept as the list object: inds2 <- data.frame(inds,Genes=I(Genes))) I also have a vector of how many of those genes are expressed in the individuals, this can also kept as a vector object or written to a data frame: inds2$No_E...