R analysis improved