[adegenet-commits] r229 - in pkg: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Jan 24 21:01:03 CET 2009
Author: jombart
Date: 2009-01-24 21:01:03 +0100 (Sat, 24 Jan 2009)
New Revision: 229
Modified:
pkg/R/auxil.R
pkg/R/classes.R
pkg/man/as.genind.Rd
Log:
moved some uxil functions
Modified: pkg/R/auxil.R
===================================================================
--- pkg/R/auxil.R 2009-01-24 19:47:14 UTC (rev 228)
+++ pkg/R/auxil.R 2009-01-24 20:01:03 UTC (rev 229)
@@ -148,7 +148,45 @@
+
#######################
+# Function rmspaces
+#######################
+# removes spaces and tab at the begining and the end of each element of charvec
+.rmspaces <- function(charvec){
+ charvec <- gsub("^([[:blank:]]*)([[:space:]]*)","",charvec)
+ charvec <- gsub("([[:blank:]]*)([[:space:]]*)$","",charvec)
+ return(charvec)
+}
+
+
+
+
+
+###################
+# Function .genlab
+###################
+# recursive function to have labels of constant length
+# base = a character string
+# n = number of labels
+.genlab <- function(base, n) {
+ f1 <- function(cha,n){
+ if(nchar(cha)<n){
+ cha <- paste("0",cha,sep="")
+ return(f1(cha,n))
+ } else {return(cha)}
+ }
+ w <- as.character(1:n)
+ max0 <- max(nchar(w))
+ w <- sapply(w, function(cha) f1(cha,max0))
+ return(paste(base,w,sep=""))
+}
+
+
+
+
+
+#######################
# Function adegenetWeb
#######################
adegenetWeb <- function(){
Modified: pkg/R/classes.R
===================================================================
--- pkg/R/classes.R 2009-01-24 19:47:14 UTC (rev 228)
+++ pkg/R/classes.R 2009-01-24 20:01:03 UTC (rev 229)
@@ -55,6 +55,8 @@
+
+
###############################################################
###############################################################
# CLASSES DEFINITION
Modified: pkg/man/as.genind.Rd
===================================================================
--- pkg/man/as.genind.Rd 2009-01-24 19:47:14 UTC (rev 228)
+++ pkg/man/as.genind.Rd 2009-01-24 20:01:03 UTC (rev 229)
@@ -20,8 +20,8 @@
}
\usage{
-genind(tab,pop=NULL,prevcall=NULL, ploidy=2, type=c("codom","PA"))
-as.genind(tab,pop=NULL,prevcall=NULL, ploidy=2, type=c("codom","PA"))
+genind(tab,pop=NULL,prevcall=NULL, ploidy=2, type=c("codom","domin"))
+as.genind(tab,pop=NULL,prevcall=NULL, ploidy=2, type=c("codom","domin"))
is.genind(x)
}
More information about the adegenet-commits
mailing list