20231027_updated_R_script.R