Re: [R] error message

2011-11-07 Thread JulianaMF
As I mentioned, the archives with the exact thread were back at the lab.
Here they are:
> read.structure(file = "SimStru.str")

 How many genotypes are there?
820

 How many markers are there?
10

 Which column contains labels for genotypes ('0' if absent)?
0

 Which column contains the population factor ('0' if absent)?
2

 Which other optional columns should be read (press 'return' when done)?
1:

 Which row contains the marker names ('0' if absent)?
1

 Are genotypes coded by a single row (y/n)?
n

 Converting data from a STRUCTURE .stru file to a genind object...

Error in txt[(lastline - n + 1):lastline] :
  only 0's may be mixed with negative subscripts


>
> Errr, what are you referring to? You also forgot to read the posting
> guide of this mailing list that asks you to cite the original thread,
>
> Uwe Ligges
>
>
> > Juliana
> >
>
-- 
Juliana Machado Ferreira
TED Senior Fellow 2010-2012
Laboratory of Evolutionary Biology and Vertebrate Conservation
(LABEC, USP)
www.sosfauna.org/


--
View this message in context: 
http://r.789695.n4.nabble.com/error-message-tp3223412p3998488.html
Sent from the R help mailing list archive at Nabble.com.
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] error message

2011-11-05 Thread JulianaMF
Humm... I was using adegenet / ade4 packages and both R and R studio prompted
the questions. 
Sorry, I did so many searches on R help and Adegenet help that I forgot to
mention the packages I was using...
Juliana

--
View this message in context: 
http://r.789695.n4.nabble.com/error-message-tp3223412p3994158.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] error message

2011-11-05 Thread JulianaMF
Hello Michael,
Sorry, I am just starting to lear all this.
Here is one of my input files (from a .str file) in which the first column
are the individuals, the second is the pop info (in this case I am stating
that I have one pop because I am still trying to find out which are the
clusters in my sample) and the others are the 10 loci. The genotypes for
each individual are in 2 rows and missing data is -9. I tried both R and R
studio and I am working from a Mac. I followed all the routine
SimStru <- read.structure(file = "SimStru.str")
and then I answered all the prompted questions (I am writing from my memory
because the files are back at the lab): 82 individuals (820 genotypes), 10
loci, no column with marker name, column with pop info = 2, other column = 1
(names for each sample), row with marker names = 1, missing data = -9. I
didn't change any of the other default settings. And once I answered all the
questions, I got that error message.
Thank you so much to be willing to help and sorry about my ignorance, I am
new to this! 
Ind  Pop 134   220  28   18   414   24   42   58423  12
S3 1  349  163  267  316  287  412  275  234  164  351
S3 1  369  165  267  336  287  424  275  238  188  351
S5 1  345  163  271  316  287  360  187  234  152  343
S5 1  365  163  283  336  287  388  187  246  152  615
S9 1  353  163  275  300  287  400  231  234  164  347
S9 1  361  163  279  336  287  416  275  234  170  351
S101  325   -9  259  316  287  384  299  234  140  331
S101  357   -9  279  328  287  400  299  234  152  351
S151  377  163  267  316  287  416  259  234  134  339
S151  385  163  283  344  287  416  267  254  164  363
S171  333  163  263  316  285  380  179  234  164  355
S171  381  163  287  328  287  400  179  238  164  399
S211  333  163  271  356  285  388  219  250  158  335
S211  377  165  271  360  285  416  219  270  200  355
S221  373  163  251  316  285  404  211  234  158  335
S221  377  163  279  352  287  404  211  234  158  355
S261  377  163  259  324  285  424   -9  254  170  327
S261  405  163  283  324  287  424   -9  254  188  351
S281  333  163  267  324  287  380  187  246  164  351
S281  333  163  267  336  287  416  295  246  164  355
S321  321  163  259  300  285  396  291  250  152  343
S321  365  165  259  348  285  396  291  250  164  351
S331  325  163  263   -9  287  408  231  238  140  371
S331  357  163  263   -9  287  432  251  246  146  371
S371  361  163  267  320  285  416  195  254  164  343
S371  361  165  275  320  287  420  195  254  170  355
S381  377  163  267  348  287  416  223  234  164  339
S381  385  165  275  388  287  416  223  254  164  363
S401  373  163  255  336  287  384  191  234  158  347
S401  381  163  267  348  287  416  239  250  170  495
S441  333  163  279  300  287  408  255  238  146  351
S441  333  163  283  316  287  416  255  246  146  387
S451  345  163   -9   -9  287  412  187  234  158   -9
S451  389  163   -9   -9  287  416  215  234  176   -9
S491  349  163  271  312  285  388  191  238  164  351
S491  357  163  283  344  287  400  191  238  182  495
S521  353  163  259  300  287  380  195  258   -9  335
S521  385  163  279  320  287  424  195  258   -9  351
S561  325  163  267  300  287  400  263  226  146  355
S561  389  163  283  316  287  400  263  238  188  407
S571  357  163  263  300  287  412  199  234  146  343
S571  389  163  271  316  287  412  199  242  176  391
S611  369  163  287  316  287  380  175  246  164  339
S611  393  163  287  316  287  432  191  250  182  347
S621  377  163  275  316  287  392   -9  254  164  363
S621  385  165  275  348  287  392   -9  254  164  363
S631  333  163  267  332  285  388  175  234  158  347
S631  401  163  271  340  287  408  199  234  164  355
S671  377  163  251  320  287  412  187  246  158  351
S671  377  163  275  352  287  416  187  246  158  379
S681  377  163  287  332  287  404  291  238  164  339
S681  405  163  287  348  287  420  291  246  176  591
S691  325  163  255  308  285  364  191  226   -9  343
S691  353  163  279  316  285  416  307  242   -9  359
S711  385  163  255  328  285  384  251  230  164  343
S711  385  165  267  352  287  424  251  230  168  363
S731  341  159  259  308  285  416  191  230  164  335
S731  369  163  259  324  285  416  191  230  176  467
S741   -9   -9  271  320  287  384  183  226  152  347
S741   -9   -9  271  348  287  408  227  226  170  455
S751  373  163  251  308  285  380  195  234  158  351
S751  385  163  279  348  287  400  195  234  164  591
S791  333  163  275  304  287  400  211  218  170  339
S791  369  163  279  348  287  400  267  234  176  339
S801  393  163  259  316  287  388  255  230  170  407
S801  401  163  267  332  287  388  255  266  176  587
S

Re: [R] error message

2011-11-04 Thread JulianaMF
Hello,
I am a PhD candidate at University of Sao Paulo, finishing the thesis and
know nothing about R language... I am trying to analyze a structure data set
(STRs) with 82 samples and 10 loci (missing data = -9) and I keep getting
the same Error in text[(last line - n + 1):last line] : only 0's may be
mixed with negative subscripts message. I read this thread and tried the
traceback () function, but all I got after I typed it was 1:
read.structure(file = "SimStru3.str")...
When I import the data using the read.table function, it works well, but
then I am not being able to transform the data frame in a genind object... I
know I may be asking very stupid things, but I really could use the help...
Thank you so much!
Juliana

--
View this message in context: 
http://r.789695.n4.nabble.com/error-message-tp3223412p3991100.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.