[adegenet-commits] r525 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Jan 8 15:49:52 CET 2010
Author: jombart
Date: 2010-01-08 15:49:52 +0100 (Fri, 08 Jan 2010)
New Revision: 525
Modified:
pkg/R/seqTrack.R
Log:
conversion seqTrack obj -> graphNEL
Modified: pkg/R/seqTrack.R
===================================================================
--- pkg/R/seqTrack.R 2010-01-08 14:46:24 UTC (rev 524)
+++ pkg/R/seqTrack.R 2010-01-08 14:49:52 UTC (rev 525)
@@ -1123,6 +1123,16 @@
+##########################
+## as("seqTrack", "graphNEL")
+##########################
+setOldClass("seqTrack")
+setAs("seqTrack", "graphNEL", def=function(from){
+ N <- nrow(from)
+ from <- from[!is.na(from$ances), ]
+ res <- ftM2graphNEL(cbind(from$ances, from$id))
+ return(res)
+})
@@ -1169,6 +1179,8 @@
+
+
#########################
## OLD ADD-HOC VERSION
#########################
More information about the adegenet-commits
mailing list