Description Usage Arguments Details Examples
The main function that calls imageKinship2 or histKinship2
depending on value of y argument.
1 2 3 4 5 | plotKinship2(x, y = c("image", "hist"))
imageKinship2(x)
histKinship2(x)
|
x |
A square matrix of double kinship coefficients. |
y |
A character, the type of the plot.
Possible values are |
imageKinship2 function calls image function from Matrix package.
histKinship2 function plots a histogram based on ggplot2 package.
1 2 3 4 5 6 7 | # load `kin` kinship matrix from `dat50` data set
data(dat50)
kin2 <- 2* kin # double kinship matrix
plotKinship2(kin2) # equivalent to `imageKinship2(kin2)`
plotKinship2(kin2, "hist") # equivalent to `histKinship2(kin2)`
|

`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.