R.script for analsye survey data