'How to handle extremes in lab results

My question is how to handle extremes in lab results?

There are often some extreme values that exceed the measurement range in the laboratory inspection results. How can I count the overall results in a column with measurable values that are beyond the measurement range? My approach is to directly define the extreme values that can be measured, and I don't know if this is correct, or if there is a more rigorous way to deal with these data.

for example:

id value
1 5
2 30
3 >50
4 <2
5 25
.. ..
.. ..

Suppose I want to calculate the mean, standard deviation of value, How to handle the values of id 3 & 4 ? Just set them to the extreme value 50 & 2 ?

Thank you!

P.S.

I only know R language



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source