[R] AMOVA error: 'bin' must be numeric or a factor
Ben Bolker
bbolker at gmail.com
Sun Feb 12 17:26:31 CET 2012
Hanne Ballestad <hanne.ballestad <at> bio.uio.no> writes:
> I am trying to analyse my data using amova
> (http://www.oga-lab.net/RGM2/func.php?rd_id=pegas:amova):
>
> My input to R is a DNA sequence file, format=fasta
> dna<- read.dna("XX.fasta", format="fasta") #left other options as
> default
> d<- dist.dna(dna, model="raw")
> g<- read.table("XXX.design")
>
> Load necessary libraries:
> library(pegas)
[snip]
> Running Amova:
> amova(d ~ g, nperm = 100)
> Error in FUN(X[[1L]], ...) : 'bin' must be numeric or a factor
>
> How can I solve this "bin" problem?
[snip]
> My input file for g looks like this:
>
> sequenceA 1
> sequenceB 1
> sequenceC 1
[snip]
>
I think the "proper manual" you're looking for is actually the
introductory R material -- try looking at the Introduction to R
that comes with R. You can look up specific commands such as
"c" and "rep" by using ?c or ?rep .
I'm not sure of the structure of your
data, but I think you probably want g[[2]] (i.e. the second
column of g) as your predictor variable.
You might get more specific help on the bioconductor mailing
list.
More information about the R-help
mailing list