[adegenet-forum] Fwd: PCoA

Roman Luštrik roman.lustrik at biolitika.si
Thu Nov 24 10:27:47 CET 2016


Max is asking on how to remove the labels. 

This example was taken from the adegenet vignette ( see page 57 ) and it gets you pretty close to what you want. 

library(adegenet) 

data(microbov) 

mb <- scaleGen(microbov, NA.method = "mean") 
pca.cows <- dudi.pca(mb, center = FALSE, scale = FALSE, scannf = FALSE, nf = 3) 

par(mfrow = c(2, 1)) 
s.class(pca.cows$li, pop(microbov), 
xax = 1, yax = 3, col = transp(funky(15), .6), axesell=FALSE, 
cstar=0, cpoint=3, grid=FALSE) 

colorplot(pca.cows$li[c(1,3)], pca.cows$li, transp=TRUE, cex=3, xlab="PC 1", ylab="PC 3") 
title("PCA of microbov dataset\naxes 1-3") 
abline(v=0,h=0,col="grey", lty=2) 



Cheers, 
Roman 

---- 
In god we trust, all others bring data. 


From: "mw14533 2014" <mw14533.2014 at my.bristol.ac.uk> 
To: "Roman Luštrik" <roman.lustrik at biolitika.si> 
Sent: Thursday, November 24, 2016 9:39:45 AM 
Subject: Re: [adegenet-forum] PCoA 

Hello Roman 

The question i meant to ask was how do i remove the labels from the graph? sorry i seem to have been quite unhelpful and forgot to put that in my initial email. 

Many thanks 
Max 

On Thu, Nov 24, 2016 at 7:48 AM, Roman Luštrik < roman.lustrik at biolitika.si > wrote: 



Hello Max, 

is there a question here? If you have problems with your code, it's best to provide a reproducible example. Feel free to use any of the datasets that comes shipped with adegenet or perhaps you could simulate your own data. 

Cheers, 
Roman 

---- 
In god we trust, all others bring data. 


From: "Max Williams" < mw14533.2014 at my.bristol.ac.uk > 
To: adegenet-forum at lists.r-forge.r-project.org 
Sent: Wednesday, November 23, 2016 9:05:17 PM 
Subject: [adegenet-forum] PCoA 

Dear All 

I have recently used PCoA in adegenet to produce the following graph, using the s.class function (shown in attachment). Once i defined my PCoA data as the variable "pca.kelp" i inputted this into adegenet: 

s.class(pca.cows$li, fac=pop(microbov), col=funky(15)) 

s.class(pca.kelp$li, fac=pop(genind1), 
+col=transp(funky(15),.6), 
+axesel=FALSE, cstar=0, cpoint=3) 

I am fairly new to R statistics and would appreciate your time. 

Many thanks 
Max 

_______________________________________________ 
adegenet-forum mailing list 
adegenet-forum at lists.r-forge.r-project.org 
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum 

_______________________________________________ 
adegenet-forum mailing list 
adegenet-forum at lists.r-forge.r-project.org 
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum 




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20161124/b5a2f5f3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Rplot.jpeg
Type: image/jpeg
Size: 140648 bytes
Desc: not available
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20161124/b5a2f5f3/attachment-0001.jpeg>


More information about the adegenet-forum mailing list