updated cluster linear R file