Completed R markdown, there are still some bugs