sample_data: Random sampling of dataset

View source: R/utils.R

sample_dataR Documentation

Random sampling of dataset

Description

Random sampling of dataset

Usage

sample_data(
  input.data,
  n = NULL,
  percentage = NULL,
  type = c("individual", "marker"),
  selected.ind = NULL,
  selected.mrk = NULL
)

Arguments

n

number of individuals or markers to be sampled

percentage

if n == NULL, the percentage of individuals or markers to be sampled

type

should sample individuals or markers?

selected.ind

a vector containing the name of the individuals to select. Only has effect if type = "individual", n = NULL and percentage = NULL

selected.mrk

a vector containing the name of the markers to select. Only has effect if type = "marker", n = NULL and percentage = NULL

x

an object of class mappoly.data

Value

an object of class mappoly.data


mappoly documentation built on Jan. 6, 2023, 1:16 a.m.