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

https://github.com/aravind-j/rpcss

Constitution of Core Collections by Principal Component Scoring Strategy
https://github.com/aravind-j/rpcss

Last synced: about 1 month ago
JSON representation

Constitution of Core Collections by Principal Component Scoring Strategy

Awesome Lists containing this project

README

        

---
output: rmarkdown::github_document
always_allow_html: true
---

```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "",
fig.path = "man/figures/README-"
)
```

## `rpcss`: Constitution of Core Collections by Principal Component Scoring Strategy logo

```{r,echo = FALSE, message = FALSE}
devtools::load_all(".", quiet = TRUE) # quiet = T for hiding macOS compiler warnings

```

###### Version : [`r getNamespaceVersion("rpcss")`](https://aravind-j.github.io/rpcss/); License: [GPL-2|GPL-3](https://www.r-project.org/Licenses/)

##### Aravind, J.

Division of Germplasm Conservation, ICAR-National Bureau of Plant Genetic Resources, New Delhi.

***
[![minimal R version](https://img.shields.io/badge/R>%3D-3.5.0-6666ff.svg?logo=R)](https://cran.r-project.org/)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version-last-release/rpcss)](https://cran.r-project.org/package=rpcss)
[![Dependencies](https://tinyverse.netlify.app/status/rpcss)](https://cran.r-project.org/package=rpcss)
[![rstudio mirror downloads](https://cranlogs.r-pkg.org/badges/grand-total/rpcss?color=green)](https://CRAN.R-project.org/package=rpcss)
```{r, results='asis', echo=FALSE}
dver <- ifelse(test = gsub("(.\\.)(\\d+)(\\..)", "", getNamespaceVersion("rpcss")) != "",
yes = getNamespaceVersion("rpcss"),
no = gsub("Version:\\s*", "", readLines(paste0("https://raw.githubusercontent.com/", "aravind-j/rpcss", "/master/DESCRIPTION"))[grep("Version:", readLines(paste0("https://raw.githubusercontent.com/", "aravind-j/rpcss", "/master/DESCRIPTION")))]))

cat(paste("[![develVersion](https://img.shields.io/badge/devel%20version-", dver, "-orange.svg)](https://github.com/aravind-j/rpcss)", sep = ""))
```
[![Github Code Size](https://img.shields.io/github/languages/code-size/aravind-j/rpcss.svg)](https://github.com/aravind-j/rpcss)
[![R-CMD-check](https://github.com/aravind-j/rpcss/workflows/R-CMD-check/badge.svg)](https://github.com/aravind-j/rpcss/actions)
[![Project Status: WIP](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
[![lifecycle](https://lifecycle.r-lib.org/articles/figures/lifecycle-maturing.svg)](https://lifecycle.r-lib.org/articles/stages.html#maturing)
[![Last-changedate](https://img.shields.io/badge/last%20change-`r gsub('-', '--', Sys.Date())`-yellowgreen.svg)](https://github.com/aravind-j/rpcss/)
[![Zenodo DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.zenodo.14889174.svg)](https://doi.org/10.5281/zenodo.14889174)
[![Website - pkgdown](https://img.shields.io/website-up-down-green-red/https/aravind-j.github.io/rpcss.svg)](https://aravind-j.github.io/rpcss/)
[![.](https://pro-pulsar-193905.appspot.com/G-B9EKQHWBD9/welcome-page)](https://github.com/aravind-j/google-analytics-beacon)
[![GoatCounter](https://rpcss-gh.goatcounter.com/count?p=/test)](https://rpcss.goatcounter.com/)

***

## Description

`r gsub("\\n", "", pkgdown:::linkify(packageDescription("rpcss", fields = "Description")))`

```{r readme-plot, echo=FALSE, out.width='100%', fig.height=8, fig.width=12, out.width='100%', dpi = 250}

suppressPackageStartupMessages(library(EvaluateCore))

# Get data from EvaluateCore

data("cassava_EC", package = "EvaluateCore")
data = cbind(Genotypes = rownames(cassava_EC), cassava_EC)
quant <- c("NMSR", "TTRN", "TFWSR", "TTRW", "TFWSS", "TTSW", "TTPW", "AVPW",
"ARSR", "SRDM")
qual <- c("CUAL", "LNGS", "PTLC", "DSTA", "LFRT", "LBTEF", "CBTR", "NMLB",
"ANGB", "CUAL9M", "LVC9M", "TNPR9M", "PL9M", "STRP", "STRC",
"PSTR")
rownames(data) <- NULL

# Convert qualitative data columns to factor
data[, qual] <- lapply(data[, qual], as.factor)

out1 <- pcss.core(data = data, names = "Genotypes",
quantitative = quant,
qualitative = NULL, eigen.threshold = NULL, size = 0.2,
var.threshold = 0.75)

g1 <- coreplot(x = out1, criterion = "variance")
g2 <- coreplot(x = out1, criterion = "logistic")[[2]]
g3 <- screeplot(x = out1)
g4 <- biplot(out1, ndim = 3, highlight.core = "size", quant.scale = 5,
point.alpha = 0.5)[[1]]

library(patchwork)

(g1 + g2)/
(g3 + g4)

```

## Installation
The package can be installed from CRAN as follows:

```{r, eval=FALSE, echo=FALSE}
# Install from CRAN
install.packages('rpcss', dependencies=TRUE)
```

The development version can be installed from github as follows:

```{r, eval=FALSE}
# Install development version from Github
devtools::install_github("aravind-j/rpcss")
```

## What's new
To know whats new in this version type:

```{r, eval=FALSE}
news(package='rpcss')
```

## Links

[CRAN page](https://cran.r-project.org/package=rpcss)

[Github page](https://github.com/aravind-j/rpcss)

[Documentation website](https://aravind-j.github.io/rpcss/)

[Zenodo DOI](https://doi.org/10.5281/zenodo.14889174)

## CRAN checks

```{r, echo = FALSE}
pkgname <- "rpcss"

osdf <-
rbind(data.frame(OS = "Linux",
Flavour = c("r-devel-linux-x86_64-debian-clang",
"r-devel-linux-x86_64-debian-gcc",
"r-devel-linux-x86_64-fedora-clang",
"r-devel-linux-x86_64-fedora-gcc",
"r-patched-linux-x86_64",
"r-release-linux-x86_64")),
# data.frame(OS = "Solaris",
# Flavour = c("r-patched-solaris-x86")),
data.frame(OS = "Windows",
Flavour = c("r-devel-windows-x86_64",
"r-release-windows-x86_64",
"r-oldrel-windows-x86_64")),
data.frame(OS = "macOS",
Flavour = c("r-release-macos-x86_64",
# "r-release-macos-arm64",
# "r-oldrel-macos-arm64",
"r-oldrel-macos-x86_64")))

chkurl <- paste("https://cran.r-project.org/web/checks/check_results_",
pkgname, ".html", sep = "")
library(RCurl)

if (url.exists(chkurl)) {
chklink <- paste("(", chkurl, ")", sep = "")
} else {
chklink <- "(https://cran.r-project.org/web/checks/check_results_j.aravind_at_icar.gov.in.html)"
}

osdf$`CRAN check` <- paste("[![CRAN check - ", osdf$Flavour, "]",
"(https://badges.cranchecks.info/flavor/",
osdf$Flavour, "/", pkgname, ".svg)]",
chklink,
sep = "")
```

```{r, echo = FALSE, results='asis'}
cat("\n",
"[![Linux](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black)](https://cran.r-project.org/web/checks/check_results_rpcss.html)", "\n")

# knitr::kable(osdf[osdf$OS == "Linux", c(2, 3)], format = "simple",
# col.names = c("", ""),
# row.names = FALSE)

pander::pandoc.table(osdf[osdf$OS == "Linux", c(2, 3)], split.tables = Inf,
row.names = FALSE, justify = "ll", style = "grid")

cat("\n",
"[![Windows](https://img.shields.io/badge/Windows-0078D6?style=for-the-badge&logo=windows&logoColor=white)](https://cran.r-project.org/web/checks/check_results_rpcss.html)", "\n")

# knitr::kable(osdf[osdf$OS == "Windows", c(2, 3)], format = "simple",
# col.names = c("", ""),
# row.names = FALSE)

pander::pandoc.table(osdf[osdf$OS == "Windows", c(2, 3)], split.tables = Inf,
row.names = FALSE, justify = "ll", style = "grid")

cat("\n",
"[![MacOS](https://img.shields.io/badge/mac%20os-000000?style=for-the-badge&logo=apple&logoColor=white)](https://cran.r-project.org/web/checks/check_results_rpcss.html)", "\n")

# knitr::kable(osdf[osdf$OS == "macOS", c(2, 3)], format = "simple",
# col.names = c("", ""),
# row.names = FALSE)

pander::pandoc.table(osdf[osdf$OS == "macOS", c(2, 3)], split.tables = Inf,
row.names = FALSE, justify = "ll", style = "grid")

cat("\n")
```

## Citing `rpcss`
To cite the methods in the package use:

```{r, eval = FALSE}
citation("rpcss")
```

```{r, echo = FALSE}
detach("package:rpcss", unload = TRUE)
suppressPackageStartupMessages(library(rpcss))
cit <- citation("rpcss")
# yr <- format(Sys.Date(), "%Y")
# cit[1]$year <- yr
# oc <- class(cit)
#
# cit <- unclass(cit)
# attr(cit[[1]],"textVersion") <- gsub("\\(\\)",
# paste("\\(", yr, "\\)", sep = ""),
# attr(cit[[1]],"textVersion"))
# class(cit) <- oc
cit
```