I am very new to r programming. I have the array and I want to implement the below method:
This method is written to check if there is any value which is larger than the 0 and if it says yes then it needs to divide each element by a sum of a total.
Or else it should just be 1.
But I face below warning message:
“Warning message: r the condition has length > 1 and only the first element will be used”.
How can I fix the above error message?