breed | R Documentation |
This methods applies column-wise on the coe
of any
Coe object but relies on a function that can be used on any matrix. It
simply uses rnorm with the mean and sd calculated for every column (or row).
For a Coe
object, on every colum, randomly generates coefficients values
centered on the mean of the column, and with a sd equals to it standard deviates
multiplied by rate
.
breed(x, ...)
## Default S3 method:
breed(x, fac, margin = 2, size, rate = 1, ...)
## S3 method for class 'Coe'
breed(x, fac, size, rate = 1, ...)
x |
the object to permute |
... |
useless here |
fac |
a column, a formula or a column id from |
margin |
numeric whether 1 or 2 (rows or columns) |
size |
numeric the required size for the final object, same size by default |
rate |
numeric the number of sd for rnorm, 1 by default. |
a Coe object of same class
Other farming:
perm()
m <- matrix(1:12, nrow=3)
breed(m, margin=2, size=4)
breed(m, margin=1, size=10)
bot.f <- efourier(bot, 12)
bot.m <- breed(bot.f, size=80)
bot.m %>% PCA %>% plot
# breed fac wise
# bot.f %>% breed(~type, size=50) %>% PCA %>% plot(~type)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.