View source: R/cleanReplicates.R

cleanReplicates | R Documentation |

This procedures aims to streighten (clean) the most extreme values of noisy replicates by identifying the most distant points (among a set of replicates). The input 'x' (matrix or data.frame) is supposed to come from multiple different measures taken in replicates (eg weight of different individuals as rows taken as multiple replicate measures in subsequent columns).

cleanReplicates( x, centrMeth = "median", nOutl = 2, retOffPos = FALSE, silent = FALSE, callFrom = NULL )

`x` |
matrix (or data.frame) |

`centrMeth` |
(character) method to summarize (mean or median) |

`nOutl` |
(integer) determines how many points per line will be set to |

`retOffPos` |
(logical) if |

`silent` |
(logical) suppres messages |

`callFrom` |
(character) allow easier tracking of messages produced |

With the argument `nOutl`

the user chooses the total number of most extreme values to replace by `NA`

.
how many of the most extreme replicates of the whole dataset will replaced by `NA`

, ie with `nOutl=1`

only the single most extreme outlyer will be replaced by `NA`

.
Outlier points are determined as point(s) with highest distance to (row) center (median and mean choice via argument 'centrMeth').
Thus function returns input data with "removed" points set to `NA`

, or if `retOffPos=TRUE`

the most extreme/outlier positions.

This function returns a matrix of same dimensions as input `x`

, data-points which were tagged/removed are set to `NA`

, or if `retOffPos=TRUE`

the most extreme/outlier positions

mat3 <- matrix(c(19,20,30, 18,19,28, 16,14,35),ncol=3) cleanReplicates(mat3, nOutl=1)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.