If you aren't sure of the relative priority of two operators, use parentheses. 1:(nr-1) would work regardless of whether : or - had higher priority. Or, in extreme cases, read the documentation.
-- Duncan Murdoch
R-help (August 2005) #Rstats
Conversation
Notices
-
RFortunes (rfortunes)'s status on Wednesday, 26-Jun-2019 16:00:02 CEST RFortunes