scripts in R that make users statistics and users selection