Skip to contents

This function assumes that to process the batch the samples are distributed in a plate with a grid scheme.

Usage

spatial(
  index,
  pheno,
  omit = NULL,
  remove_positions = NULL,
  rows = LETTERS[1:5],
  columns = 1:10,
  iterations = 500
)

Arguments

index

A list with the samples on each subgroup, as provided from design() or replicates().

pheno

Data.frame with the sample information.

omit

Name of the columns of the pheno that will be omitted.

remove_positions

Character, name of positions to be avoided in the grid.

rows

Character, name of the rows to be used.

columns

Character, name of the rows to be used.

iterations

Numeric value of iterations that will be performed.

Value

The indices of which samples go with which batch.

Examples

data(survey, package = "MASS")
index <- design(survey[, c("Sex", "Smoke", "Age")], size_subset = 50,
                iterations = 10)
#> Warning: There might be some problems with the data use check_data().
index2 <- spatial(index, survey[, c("Sex", "Smoke", "Age")], iterations = 10)
head(index2)
#> $A1
#> SubSet1 SubSet2 SubSet3 SubSet4 SubSet5 
#>       8     207      16     107     150 
#> 
#> $A2
#> SubSet1 SubSet2 SubSet3 SubSet4 SubSet5 
#>     100     154     222     161     105 
#> 
#> $A3
#> SubSet1 SubSet2 SubSet3 SubSet4 SubSet5 
#>      88     163     209      71       1 
#> 
#> $A4
#> SubSet1 SubSet2 SubSet3 SubSet4 SubSet5 
#>     114     208      70       9      36 
#> 
#> $A5
#> SubSet1 SubSet2 SubSet3 SubSet4 SubSet5 
#>      86     112      15     171     221 
#> 
#> $A6
#> SubSet1 SubSet2 SubSet3 SubSet4 SubSet5 
#>     176     224      46     133     235 
#>