<html>
<body>
Hello,<br><br>
I'm stuck with probably a very simple error. I keep getting the truenames
error, although when I check truenames(datagen), it refers to the correct
elements. It would be great if anyone could help me out!<br>
Thanks,<br>
Sofie Vandewoestijne<br><br>
error message<br>
> summary(mySPCA2)<br><br>
Spatial principal component analysis<br><br>
Call: spca(obj = datagen, xy = datagen$other$xy, cn = cn2, scale = FALSE,
<br>
scannf = TRUE, nfposi = 1, nfnega = 1, type = NULL,
ask = TRUE, <br>
plot.nb = TRUE, edit.nb = FALSE, truenames = TRUE, d1
= NULL, <br>
d2 = NULL, k = NULL, a = NULL, dmin = NULL)<br>
<font color="#0000FF">Error in if (truenames) { : argument is not
interpretable as logical<br><br>
</font>for info, entire procedure:<br>
> data <-
read.genepop("microsats_pararge_28_04_09.gen")<br><br>
Converting data from a Genepop .gen file to a genind object...
<br><br>
<br>
File description: microsatellite data phylo study
30/04/09
<br><br>
...done.<br><br>
> datagen=genind2genpop(data)<br><br>
C213 D221 <br>
2 2 <br><br>
Converting data from a genind to a genpop object... <br><br>
...done.<br><br>
Warning message:<br>
In validityMethod(object) : <br>
duplicate names in ind.names:<br><br>
> dataID <- read.table("PaIDpop.txt",header=TRUE,
sep="\t")<br>
> colnames(dataID)<br>
[1] "pop" "region"
"habitat" "X"
"Y" <br>
> # conversion of lat/long data into ulm data<br>
> LL=dataID[,4:5]<br>
> attr(LL,"projection") <- "LL"<br>
> dataULM <- convUL(LL)<br>
Warning message:<br>
In convUL(LL) : For the UTM conversion, automatically detected zone
39.<br><br>
> xy=dataULM<br>
> datagen$other$xy=xy<br>
> datagen$other$xy<br>
X Y<br>
1 635.926951 601.7774<br>
2 650.283947 673.4652<br>
3 632.100233 622.1934<br>
4 626.815317 664.1664<br>
5 512.720689 533.8739<br>
6 521.772138 547.5091<br>
7 515.556688 522.4521<br>
8 525.868004 547.2340<br>
9 475.761671 539.6493<br>
10 461.440868 540.7914<br>
11 479.175718 522.9447<br>
12 463.920431 508.6416<br>
13 357.665999 613.7382<br>
14 347.481265 640.2679<br>
15 356.447826 619.5458<br>
16 244.134995 497.6459<br>
17 255.662775 485.2579<br>
18 258.906401 527.6824<br>
19 232.054698 518.7366<br>
20 -28.533087 543.7054<br>
21 -12.953761 566.3001<br>
22 -34.345305 547.7221<br>
23 -7.574944 575.5029<br>
> obj=dataID[,1:3]<br>
> datagen$other$obj=obj<br>
> datagen$other$obj<br>
pop region habitat<br>
1 A1
A A<br>
2 A2
A A<br>
3 A3
A W<br>
4 A4
A W<br>
5 B1
B A<br>
6 B2
B A<br>
7 B3
B W<br>
8 B4
B W<br>
9 C1
C A<br>
10 C2
C A<br>
11 C3
C W<br>
12 C4
C W<br>
13 D1
D A<br>
14 D2
D W<br>
15 D3
D W<br>
16 E1
E A<br>
17 E2
E A<br>
18 E3
E W<br>
19 E4
E W<br>
20 F1
F A<br>
21 F2
F A<br>
22 F3
F W<br>
23 F4
F W<br>
> cn2 <- chooseCN(datagen$other$xy,ask=FALSE,type=2)<br>
> mySPCA2 <- spca(datagen, xy = datagen$other$xy, cn = cn2, scale =
FALSE, scannf = TRUE, nfposi = 1, nfnega = 1, type = NULL,<br>
+ ask = TRUE, plot.nb = TRUE, edit.nb = FALSE, truenames = TRUE,<br>
+ d1 = NULL, d2 = NULL, k = NULL, a = NULL, dmin = NULL)<br>
Select the first number of axes (>=1): 1<br>
Select the second number of axes (>=0): 2<br>
> summary(mySPCA2)<br><br>
Spatial principal component analysis<br><br>
Call: spca(obj = datagen, xy = datagen$other$xy, cn = cn2, scale = FALSE,
<br>
scannf = TRUE, nfposi = 1, nfnega = 1, type = NULL,
ask = TRUE, <br>
plot.nb = TRUE, edit.nb = FALSE, truenames = TRUE, d1
= NULL, <br>
d2 = NULL, k = NULL, a = NULL, dmin = NULL)<br>
Error in if (truenames) { : argument is not interpretable as logical<br>
> <br><br>
<br><br>
</body>
</html>