[Rcolony-commits] r39 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue May 5 19:08:39 CEST 2009


Author: jonesor
Date: 2009-05-05 19:08:39 +0200 (Tue, 05 May 2009)
New Revision: 39

Modified:
   pkg/R/build.colony.input.R
Log:
Fixed annoying bracket-related bugs

Modified: pkg/R/build.colony.input.R
===================================================================
--- pkg/R/build.colony.input.R	2009-05-05 16:49:13 UTC (rev 38)
+++ pkg/R/build.colony.input.R	2009-05-05 17:08:39 UTC (rev 39)
@@ -744,7 +744,7 @@
 
 #Futher checks
 #if this is true, then all offspring in the diad file are present in the offspring genotype file
-if(sum(colonyfile$maternal.sibships$V1%in%colonyfile$mothers[,1])==length(colonyfile$maternal.sibships$V1))}{}else{
+if(sum(colonyfile$maternal.sibships$V1%in%colonyfile$mothers[,1])==length(colonyfile$maternal.sibships$V1) ){}else{
 colonyfile<-colonyfile[which(names(colonyfile)!="maternal.sibs.PATH")];
 flush.console();
 warning(paste("Mothers in maternal sibships file are not present in the mothers genotype data:",paste(colonyfile$maternal.sibships$V1[which(colonyfile$maternal.sibships$V1%in%colonyfile$mothers[,1]==FALSE)], collapse=", ")))
@@ -853,7 +853,7 @@
 
 os<-na.omit(as.vector(as.matrix(colonyfile$excluded.paternities[,2:dim(colonyfile$excluded.paternities)[2]])))
 
-if(sum(os%in%colonyfile$fathers[,1]))==length(os)}{}else{
+if(sum(os%in%colonyfile$fathers[,1])==length(os)){}else{
 colonyfile<-colonyfile[which(names(colonyfile)!="excluded.paternities.PATH")];
 flush.console();
 warning(paste("Fathers in excluded paternities file are not present in the fathers genotype data:",paste(os[which(os%in%colonyfile$fathers[,1]==FALSE)], collapse=", ")))}
@@ -944,7 +944,7 @@
 
 os<-na.omit(as.vector(as.matrix(colonyfile$excluded.maternities[,2:dim(colonyfile$excluded.maternities)[2]])))
 
-if(sum(os%in%colonyfile$mothers[,1]))==length(os)}{}else{
+if(sum(os%in%colonyfile$mothers[,1])==length(os)){}else{
 colonyfile<-colonyfile[which(names(colonyfile)!="excluded.maternities.PATH")];
 flush.console();
 warning(paste("Fathers in excluded maternities file are not present in the mothers genotype data:",paste(os[which(os%in%colonyfile$mothers[,1]==FALSE)], collapse=", ")))}
@@ -1023,7 +1023,7 @@
 #Further checks - do excluded sibs appear in offspring file
 os<-na.omit(as.vector(as.matrix(colonyfile$excluded.paternal.sibships[,2:dim(colonyfile$excluded.paternal.sibships)[2]])))
 
-if(sum(os%in%colonyfile$mothers[,1]))==length(os)}{}else{
+if(sum(os%in%colonyfile$mothers[,1])==length(os)){}else{
 colonyfile<-colonyfile[which(names(colonyfile)!="excluded.paternal.sibships.PATH")];
 flush.console();
 warning(paste("Offspring in excluded paternal sibships file are not present in the offspring genotype data:",paste(os[which(os%in%colonyfile$Offspring[,1]==FALSE)], collapse=", ")))}
@@ -1104,7 +1104,7 @@
 #Further checks - do excluded sibs appear in offspring file
 os<-na.omit(as.vector(as.matrix(colonyfile$excluded.maternal.sibships[,2:dim(colonyfile$excluded.maternal.sibships)[2]])))
 
-if(sum(os%in%colonyfile$mothers[,1]))==length(os)}{}else{
+if(sum(os%in%colonyfile$mothers[,1])==length(os)){}else{
 colonyfile<-colonyfile[which(names(colonyfile)!="excluded.maternal.sibships.PATH")];
 flush.console();
 warning(paste("Offspring in excluded maternal sibships file are not present in the offspring genotype data:",paste(os[which(os%in%colonyfile$Offspring[,1]==FALSE)], collapse=", ")))}



More information about the Rcolony-commits mailing list