Learn R Programming

linkim (version 0.1)

pgdata: Proportions of genotypes and distribution of missing values

Description

Computes the proportions of genotypes in each columne, and plots the distribuition of missingness of the data.

Usage

pgdata(data, plot = NULL, type = NULL,...)

Arguments

data
A data frame of genotypes
plot
Plots the proportions of genotypes or missing values? Default FALSE.
type
Plot types, if type = "barplot" this is the barplot of proportions of missing values; if type= "stacked" this is the stacked barplot of proportions of missing values and genotypes; if type= "dist" this is the dot plot of missing values distribution. Default is not plot.
...
Other arguments for future methods

Value

It returns a matrix of proportions of genotypes and missing values for each column

Examples

Run this code
data(barley)
data <- barley[-1:-2,-1]
pro <- pgdata(data)
pro <- pgdata(data,plot=TRUE,type="dist")
pro <- pgdata(data,plot=TRUE,type="barplot")
pro <- pgdata(data,plot=TRUE,type="stacked")

Run the code above in your browser using DataLab