Re: [poppr] DAPC using find.cluster method (Without a priori assumption)

135 views
Skip to first unread message

Zhian Kamvar

unread,
Apr 17, 2020, 8:23:13 PM4/17/20
to Buddhika Amarasinghe Dahanayaka, poppr
You need to include the number of principal components (n.pc) and the number of discriminant axes (n.da) you want to retain in your dapc call. 

Hope that helps.

Best,
Zhian

On Apr 14, 2020, at 01:17 , Buddhika Amarasinghe Dahanayaka <u110...@umail.usq.edu.au> wrote:

Hi,

I need to conduct DAPC without a priori assumption. My dataset is halpoid and dominant. Data format is GenAlex. I followed this tutorial but could not get it to work.

I ran the following codes and got these error messages: 


genchar_clusters <- find.clusters(genchar, max.n.clust = 120)

70

dapcgenchar <- dapc(genchar, genchar_clusters$grp)

4

scatter(dapcgenchar, col = rainbow(3), clabel = 0.8, cex = 1.5, scree.da = TRUE, scree.pca = TRUE, posi.pca = "topright", posi.da = "bottomright", ratio.da = 0.2, ratio.pca = 0.2, inset.da = 0.01, inset.pca = 0.01)

dapcgenchar

dapcgenchar$grp

 

Results


> genchar_clusters <- find.clusters(genchar, max.n.clust = 120)

Choose the number PCs to retain (>= 1):

70

Choose the number of clusters (>=2: dapcgenchar <- dapc(genchar, genchar_clusters$grp)

4

Warning message:

In find.clusters.data.frame(as.data.frame(x), ...) :

  NAs introduced by coercion

> scatter(dapcgenchar, col = rainbow(3), clabel = 0.8, cex = 1.5, scree.da = TRUE, scree.pca = TRUE, posi.pca = "topright", posi.da = "bottomright", ratio.da = 0.2, ratio.pca = 0.2, inset.da = 0.01, inset.pca = 0.01)

Error in scatter(dapcgenchar, col = rainbow(3), clabel = 0.8, cex = 1.5,  :

  object 'dapcgenchar' not found

> dapcgenchar

Error: object 'dapcgenchar' not found

> dapcgenchar$grp

Error: object 'dapcgenchar' not found

 Herewith I attach a screenshot of the data sheet. I would be very grateful if you can assist me to resolve this problem.

Thank you.
Warm regards
Buddhika.

--
You received this message because you are subscribed to the Google Groups "poppr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to poppr+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/poppr/780ac85b-24bf-486d-b9c9-522dac648ae5%40googlegroups.com.
<dataframe.png>

Reply all
Reply to author
Forward
0 new messages