Description Usage Arguments Value Author(s) See Also Examples

Locates the smallest value of the input object.

1 | ```
which.min.simple(x, na.rm = TRUE, tie_value = "NA")
``` |

`x` |
a numeric object |

`na.rm` |
a logical indicating whether missing values should be removed. |

`tie_value` |
A character indicating how to deal with ties. Can be "NA" (returns an NA if a tie is found) or "random" (returns a single randomly chosen member of the ties if a tie is found) or "first" (returns the first class found). |

An integer of length 1 giving the index of the minimum of x or NA if the minimum of x is not unique, x has no non-NAs, or na.rm=F.

Jonathan A. Greenberg, Alison R. Mynsberge

1 2 3 4 5 6 7 8 9 10 11 | ```
## Not run:
x<-c(4,1:3,NA,4)
y<-c(2:4,1,1,NA)
## The index is only calculated for a unique minimum
which.min.simple(x)
which.min.simple(y)
which.min.simple(y,na.rm=FALSE)
which.min.simple(x,na.rm=FALSE)
## End(Not run)
``` |

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.