R scripts working with surveysets