When subsetting by individual, if ind
is numeric, they're
assumed to be numeric indices; if character strings, they're
assumed to be individual IDs. ind
can be numeric or logical
only if the genotype, phenotype, and covariate data all have the
same individuals in the same order.
When subsetting by chromosome, chr
is always
converted to character strings and treated as chromosome IDs. So if
there are three chromosomes with IDs "18"
, "19"
, and
"X"
, mycross[,18]
will give the first of the
chromosomes (labeled "18"
) and mycross[,3]
will give
an error.
When using character string IDs for ind
or chr
, you
can use "negative" subscripts to indicate exclusions, for example
mycross[,c("-18", "-X")]
or mycross["-Mouse2501",]
.
But you can't mix "positive" and "negative" subscripts, and if any
of the individuals has an ID that begins with "-"
, you can't
use negative subscripts like this.