How to find Nth smallest value in vector in R ?
In this article, we will discuss how to find the Nth smallest in vector in the R programming language.
- Create vector
- Take input from the user using the function readline().
- Convert data from string to int using the function as.integer().
- In this step, we are finding nth largest number using
sort(vector name ) [n value])
- Vector name is the vector which we created.
- N value is which largest number you want to print.
My Personal Notes arrow_drop_up
Please Login to comment...