Question: Write a function called genericSort() that takes in a numeric or integer vector, sorts it, and returns the indices of the sorted values. It should
Write a function called genericSort() that takes in a numeric or integer vector, sorts it, and returns the indices of the sorted values. It should also print an error if the input is a character. For example, genericSort(c(1,3,7,5)) should return the vector (1,2,4,3).
Programming in R
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
