With the development of Web 2.0,more and more people choose to use the Internet to express their opinions.All this opinions together into a new form text which contains a lot of valuable emotional information,this is why how to deal with these texts and analysis the emotional information is significant for us.We get three main tasks of sentiment analysis,including sentiment extraction,sentiment classification,sentiment application and summarization.In this paper,based on the R software,we introduced the steps of sentiment analysis in detail.Finally,we collect the movie reviews from the Internet,and use R software to do sentiment analysis in order to judge the emotional tendency of the text.