Based on @joran's comments, it looks like if you want the rows to be sorted in any particular order, you should explicitly set it yourself.
If the order you'd like is one in which the rows have increasing values of one or more columns, you can use the function order()
, like this:
X <- merge(a, b, by = c("one", "two"))
X[with(X, order(one, two)),]