[Rcolony-commits] r61 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Aug 10 15:06:31 CEST 2009
Author: jonesor
Date: 2009-08-10 15:06:31 +0200 (Mon, 10 Aug 2009)
New Revision: 61
Modified:
pkg/R/build.colony.input.R
pkg/R/plotsibs.R
Log:
Fixed build.colony.input and plotsibs bindings in subset commands.
Modified: pkg/R/build.colony.input.R
===================================================================
--- pkg/R/build.colony.input.R 2009-08-06 15:44:22 UTC (rev 60)
+++ pkg/R/build.colony.input.R 2009-08-10 13:06:31 UTC (rev 61)
@@ -473,7 +473,7 @@
#split the file up
-colonyfile$paternal.dyads<-subset(colonyfile$paternities.and.sibships,X1!=0)
+colonyfile$paternal.dyads<-subset(colonyfile$paternities.and.sibships,colonyfile$X1!=0)
dyad<-NULL
for(i in 1:dim(colonyfile$paternal.dyads)[1]){
@@ -484,7 +484,7 @@
rm(dyad)
#Sibships
-colonyfile$paternal.sibships<-subset(colonyfile$paternities.and.sibships,X1==0)
+colonyfile$paternal.sibships<-subset(colonyfile$paternities.and.sibships,colonyfile$X1==0)
colonyfile$paternal.sibships[,2:dim(colonyfile$paternal.sibships)[2]]
for(i in 1:dim(colonyfile$paternal.sibships)[1]){
@@ -561,7 +561,7 @@
#split the file up
-colonyfile$maternal.dyads<-subset(colonyfile$maternities.and.sibships,X1!=0)
+colonyfile$maternal.dyads<-subset(colonyfile$maternities.and.sibships,colonyfile$X1!=0)
dyad<-NULL
for(i in 1:dim(colonyfile$maternal.dyads)[1]){
@@ -572,7 +572,7 @@
rm(dyad)
#Sibships
-colonyfile$maternal.sibships<-subset(colonyfile$maternities.and.sibships,X1==0)
+colonyfile$maternal.sibships<-subset(colonyfile$maternities.and.sibships,colonyfile$X1==0)
colonyfile$maternal.sibships[,2:dim(colonyfile$maternal.sibships)[2]]
for(i in 1:dim(colonyfile$maternal.sibships)[1]){
Modified: pkg/R/plotsibs.R
===================================================================
--- pkg/R/plotsibs.R 2009-08-06 15:44:22 UTC (rev 60)
+++ pkg/R/plotsibs.R 2009-08-10 13:06:31 UTC (rev 61)
@@ -36,13 +36,13 @@
title(main=maintitle)
#Plot the data.
- hs<-subset(sibs,type=="Half"&Probability>prob)
+ hs<-subset(sibs,sibs$type=="Half"&sibs$Probability>prob)
for (i in 1:dim(hs)[1]){
#If Halfsib, then put the greater number first
if(hs[i,5]>hs[i,6]){points(hs[i,5],hs[i,6],pch=16,col="#33CCFF98")}else{points(hs[i,6],hs[i,5],pch=16,col="#33CCFF98")}
}
- fs<-subset(sibs,type=="Full"&Probability>prob)
+ fs<-subset(sibs,sibs$type=="Full"&sibs$Probability>prob)
for (i in 1:dim(fs)[1]){
#If Halfsib, then put the greater number first
if(fs[i,5]<fs[i,6]){points(fs[i,5],fs[i,6],pch=16,col="#FF669998")}else{points(fs[i,6],fs[i,5],pch=16,col="#FF669998")}
More information about the Rcolony-commits
mailing list