expand in R - begin

not finished