powered by
Get the index of the smallest dimension apart from an index
find.sub.argmin(nums, idx, seed = NULL)
The index of the second smallest dimension (as an integer).
A vector of numbers
An index to be excluded
(Optional) If provided, used to seed the random sampling (for reproducibility).
nums <- c(1,3,2) find.sub.argmin(nums,1) ## return 3 nums <- c(1,1,2) find.sub.argmin(nums,1) ## return 2
Run the code above in your browser using DataLab