To find the smallest element in an array in R, you can use the min()
function. Here's an example:
main.r176 chars9 lines
Output:
main.r6 chars2 lines
In this example, the min()
function is used to find the smallest element in the my_array
array. The result is then printed to the console.
gistlibby LogSnag