I am converting MATLAB code into R
xmin=floor( min( min(min(per1),min(per2)) , min(min(per3),min(per4)) ) );
‘floor’ takes a single numeric argument ‘x’ and returns a numeric vector containing the largest integers not greater than the corresponding elements of ‘x’.
The MATLAB help online describes
floor as "round toward negative infinity", and the actual help text is
Y = floor(X) rounds each element of X to the nearest integer less than or equal to that element.
min() function takes multiple arguments, I think
xmin <- floor( min(per1,per2,per3,per4))
should be fine.