update R codes and PNG files