GSW in the R language