I'm new to R and I have losses data:
losses=c(25,250,5,17,2,195,12,8,75,5,50,1);
How to cap each member of the list at 150? Namely how to perform min(150,x)
for each member of the list?
Then I want to cap all losses at 'amount of insurance' array:
aoi=c(150,250,100,125,300,200,80,250,100,350,500,120)