An open API service indexing awesome lists of open source software.

https://github.com/zankrut20/selection.index

Analysis of Selection Index in Plant Breeding
https://github.com/zankrut20/selection.index

agriculture animal-science cran plant-breeding r rstudio selection-index selection-indices smith-selection-index

Last synced: about 2 months ago
JSON representation

Analysis of Selection Index in Plant Breeding

Awesome Lists containing this project

README

        

---
output: github_document
editor_options:
markdown:
wrap: 72
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# selection.index

[![R-CMD-check](https://github.com/zankrut20/selection.index/workflows/R-CMD-check/badge.svg)](https://github.com/zankrut20/selection.index/actions)
[![CRAN checks](https://cranchecks.info/badges/summary/selection.index)](https://cran.r-project.org/web/checks/check_results_selection.index.html)
[![status](https://www.r-pkg.org/badges/version/selection.index)](https://CRAN.R-project.org/package=selection.index)
[![Dependencies](https://tinyverse.netlify.com/badge/selection.index)](https://cran.r-project.org/package=selection.index)
[![Total downloads](http://cranlogs.r-pkg.org/badges/grand-total/selection.index?color=blue)](https://cran.r-project.org/package=selection.index)
[![Last-Month downloads](http://cranlogs.r-pkg.org/badges/last-month/selection.index?color=green)](https://cran.r-project.org/package=selection.index)
[![Last-Week downloads](http://cranlogs.r-pkg.org/badges/last-week/selection.index?color=green)](https://cran.r-project.org/package=selection.index)
[![CodeFactor](https://www.codefactor.io/repository/github/zankrut20/selection.index/badge)](https://www.codefactor.io/repository/github/zankrut20/selection.index)
[![R-CMD-check](https://github.com/zankrut20/selection.index/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/zankrut20/selection.index/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/zankrut20/selection.index/branch/master/graph/badge.svg)](https://app.codecov.io/gh/zankrut20/selection.index?branch=master)

The goal of selection.index is to easily construct the selection index
and based on the these indices select the plant traits for the overall
improvement of the plant.

## Installation

You can install the released version of selection.index from
[CRAN](https://CRAN.R-project.org) with:

``` r
install.packages("selection.index")
```
from [github](https://github.com/zankrut20/selection.index) with:
``` r
devtools::install_github("zankrut20/selection.index")
```

## Example

This is a basic example which shows you how to solve a common problem:
Dataset `seldata` is included in package.

```{r example}
library(selection.index)
head(seldata)
```

### Genotypic Variance-Covariance Matrix

```{r}
genMat<- gen.varcov(data = seldata[,3:9], genotypes = seldata[,2],
replication = seldata[,1])
print(genMat)
```

### Phenotypic Variance-Covariance Matrix

```{r}
phenMat<- phen.varcov(data = seldata[,3:9], genotypes = seldata[,2],
replication = seldata[,1])
print(phenMat)
```

### Weight Matrix - Data is included in package `weight`

```{r}
weightMat <- weight.mat(weight)
weightMat
```

- Genetic gain of Yield

```{r}
GAY<- gen.advance(phen_mat = phenMat[1,1], gen_mat = genMat[1,1],
weight_mat = weightMat[1,1])
print(GAY)
```

### Construction of selection index/indices

For the construction of selection index we requires **phenotypic &
genotypic variance-covariance matrix as well weight matrix.**

### Construction of all possible selection indices for a character combinations

```{r}
comb.indices(ncomb = 1, pmat = phenMat, gmat = genMat, wmat = weight[,2:3], wcol = 1, GAY = GAY)
```

### Construction of selection indices by removing desired single character from the combinations

```{r}
rcomb.indices(ncomb = 1, i = 1, pmat = phenMat, gmat = genMat, wmat = weight[,2:3], wcol = 1, GAY = GAY)
```