[adegenet-forum] importing annex information within the Genind object (@other)
Michael C Fontaine
michael.fontaine at u-psud.fr
Mon Dec 1 14:20:01 CET 2008
Dear Thibaut,
I am Michaël, I have a problem with Adegenet when I want to import my
dataset from a data.frame. The problematic point is to import annex
information within the Genind object. I am not very use to that kind
of object. Specifically my data are imported in R as a data.frame
( read.table() ), and I would like to add information within the
Genind object, such as the population, the geographic coordinates, and
other factors, such as the year.
Here is an example of the kind of script I am using:
> #My data
> ampelo_gp<- cbind(AQmalus3, AQmalus4, AQmalus8, AQmalus10, AQmalus11)
> head(ampelo_gp)
> ampelo_ID <- cbind(ID, DNAsamples,Populations,X,Y, Country, Year)
> head(ampelo_ID)
>
> #the Genind object
> amp_ade <- df2genind(X=ampelo_gp, ind.names=ID, pop=Populations,
> ploidy=1)
> amp_ade at pop=Populations #it works, but is this the best way to
> proceed?
>
> #here I am trying to add annex information in the class @other est
> définie comme NULL.
> amp_ade at other@xy=cbind(X,Y)
> amp_ade at other@coutry=Country
Here this doesn't work, R return that "amp_ade at other" is defined as
NULL.
How can I import these information within the @other?
Thank you in advance for your answer,
All the best,
Michaël
--
Michael C. Fontaine
PostDoc
UMR CNRS/Universite Paris Sud/AgroParisTech 8079
Universite Paris-Sud, Batiment 360
F-91405 Orsay cedex
FRANCE
Phone +33169155662
Fax +33169154697
E-Mail: michael.fontaine at u-psud.fr
Personal webpage: http://users.skynet.be/fb683753/michaelcfontaine/Home.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20081201/2b6678a8/attachment.htm
More information about the adegenet-forum
mailing list