expand in R (end)