add R percent graphic function