[adegenet-forum] data import problems

Vikram Chhatre crypticlineage at gmail.com
Sat May 7 19:34:55 CEST 2011


Dear Dr. Thibaut,

Thanks.  That worked.  In fact, I used obj1 <-
read.genepop("mydata.gen") and the data was read correctly in the
genind object.  Now off to exploring what the program can do.

Vikram



On Sat, May 7, 2011 at 12:29 PM, Jombart, Thibaut
<t.jombart at imperial.ac.uk> wrote:
> Hello,
>
> the "system.file" instruction is used to access files installed with R and packages. It is useful in examples, and useless otherwise.
> The right command would be:
> obj1 <- import2genind("mydata.gen")
>
> Cheers
>
> Thibaut
>
> --
> ######################################
> Dr Thibaut JOMBART
> MRC Centre for Outbreak Analysis and Modelling
> Department of Infectious Disease Epidemiology
> Imperial College - Faculty of Medicine
> St Mary’s Campus
> Norfolk Place
> London W2 1PG
> United Kingdom
> Tel. : 0044 (0)20 7594 3658
> t.jombart at imperial.ac.uk
> http://sites.google.com/site/thibautjombart/
> http://adegenet.r-forge.r-project.org/
>
> ________________________________________
> From: adegenet-forum-bounces at r-forge.wu-wien.ac.at [adegenet-forum-bounces at r-forge.wu-wien.ac.at] on behalf of Vikram Chhatre [crypticlineage at gmail.com]
> Sent: 06 May 2011 19:12
> To: adegenet-forum at r-forge.wu-wien.ac.at
> Subject: [adegenet-forum] data import problems
>
> Hello,
>
> I am a new user of the adegenet package.  Following the instructions
> in the manual for importing data in genepop and structure format, I
> have been experiencing difficulties.  Here is the error I get:
>
>> obj1 <- import2genind(system.file("mydata.gen", package="adegenet"))
> Error in if (ext == "GTX") return(read.genetix(file, missing = missing,  :
>  argument is of length zero
>
> This example is for data in genepop format.  I have verified that the
> data file can be read correctly in genepop, so there are no formatting
> errors.  I have been getting exact same error when I try to import
> structure files.
>
> Thank you for your help.
> Vikram
> _______________________________________________
> 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
>


More information about the adegenet-forum mailing list