Description Usage Arguments Details Value Author(s) See Also Examples
These functions combine objects of class "loci"
by binding
their rows or their columns.
1 2 3 4 |
... |
some object(s) of class |
These two methods call [rc]bind.data.frame
and take care to
respect the attribute “locicol” of the returned object.
You can pass a data frame in the ...
, but then you should
bypass the generic by calling cbind.loci
directly. Do not try
to pass a vector: this will mess the “locicol” attribute. Instead,
make a data frame with this vector (see examples).
An object of class "loci"
.
Emmanuel Paradis
[.loci
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | a <- as.loci(data.frame(x = "A/a", y = 1), col.loci = 1)
b <- as.loci(data.frame(y = 2, x = "A/A"), col.loci = 2)
## rbind.loci reorders the columns if necessary:
str(rbind(a, b))
## cbind sets "locicol" correctly:
str(cbind(a, b))
str(cbind(b, a))
## Unexpected result...
str(cbind(a, data.frame(z = 10)))
## ... bypass the generic:
str(cbind.loci(a, data.frame(z = 10)))
## Here "locicol" is not correct...
str(cbind.loci(z = 10, a))
## ... instead
str(cbind.loci(data.frame(z = 10), a))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.