[adegenet-commits] r274 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Apr 1 12:34:24 CEST 2009
Author: jombart
Date: 2009-04-01 12:34:24 +0200 (Wed, 01 Apr 2009)
New Revision: 274
Modified:
pkg/R/basicMethods.R
Log:
fixed show methods
Modified: pkg/R/basicMethods.R
===================================================================
--- pkg/R/basicMethods.R 2009-04-01 10:27:25 UTC (rev 273)
+++ pkg/R/basicMethods.R 2009-04-01 10:34:24 UTC (rev 274)
@@ -20,9 +20,25 @@
cat("\n at ind.names: vector of ", length(x at ind.names), "individual names")
cat("\n at loc.names: vector of ", length(x at loc.names), "locus names")
- cat("\n at loc.nall: number of alleles per locus")
- cat("\n at loc.fac: locus factor for the ", ncol(x at tab), "columns of @tab")
- cat("\n at all.names: list of ", length(x at all.names), "components yielding allele names for each locus")
+
+ if(!is.null(x at loc.nall)){
+ cat("\n at loc.nall: number of alleles per locus")
+ } else {
+ cat("\n at loc.nall: NULL")
+ }
+
+ if(!is.null(x at loc.fac)){
+ cat("\n at loc.fac: locus factor for the ", ncol(x at tab), "columns of @tab")
+ } else {
+ cat("\n at loc.fac: NULL")
+ }
+
+ if(!is.null(x at all.names)){
+ cat("\n at all.names: list of ", length(x at all.names), "components yielding allele names for each locus")
+ } else {
+ cat("\n at all.names: NULL")
+ }
+
cat("\n at ploidy: ",x at ploidy)
cat("\n at type: ",x at type)
@@ -66,9 +82,25 @@
cat("\n at pop.names: vector of ", length(x at pop.names), "population names")
cat("\n at loc.names: vector of ", length(x at loc.names), "locus names")
- cat("\n at loc.nall: number of alleles per locus")
- cat("\n at loc.fac: locus factor for the ", ncol(x at tab), "columns of @tab")
- cat("\n at all.names: list of ", length(x at all.names), "components yielding allele names for each locus")
+
+ if(!is.null(x at loc.nall)){
+ cat("\n at loc.nall: number of alleles per locus")
+ } else {
+ cat("\n at loc.nall: NULL")
+ }
+
+ if(!is.null(x at loc.fac)){
+ cat("\n at loc.fac: locus factor for the ", ncol(x at tab), "columns of @tab")
+ } else {
+ cat("\n at loc.fac: NULL")
+ }
+
+ if(!is.null(x at all.names)){
+ cat("\n at all.names: list of ", length(x at all.names), "components yielding allele names for each locus")
+ } else {
+ cat("\n at all.names: NULL")
+ }
+
cat("\n at ploidy: ",x at ploidy)
cat("\n at type: ",x at type)
More information about the adegenet-commits
mailing list