I am trying to classify review text into positive and negative sentiment. Therefore I have to select the column Review.Text. However there seems to be a problem with this column as R does not recognize it. Maybe I did not apply the function "select" right. Does somebody have an idea how to fix the issue?
reviewscl <- read.csv("C:/Users/Astrid/Documents/Master BWL/Data Mining mit R/R/Präsentation 2/Womens Clothing Reviews3.csv")
reviewscl2 <- as.data.frame(reviewscl)
reviews2 <- reviewscl %>%
unite("Title", "Review.Text", sep=" ")
reviews2[is.na(reviews2)] <- ""
reviewStars <- as.numeric(reviews2$Rating)
reviews3 <- cbind(reviews2, reviewStars)
reviews_pos <- reviews3 %>%
filter(reviewStars>=4) %>%
select(reviewscl2,Review.Text) %>%
cbind("Valenz"=1)
This is the data.frame. I don't know why there are no columns Title and Review.Text as they exist in the csv file.
Rating Recommended.IND Positive.Feedback.Count Division.Name Department.Name Class.Name...................
1 4 1 0 Initmates Intimate Intimates;;;;;;;;;;;;;;;;;;;
2 NA
3 NA
4 NA
5 5 1 6 General Tops Blouses;;;;;;;;;;;;;;;;;;;
6 NA
7 NA
8 NA
9 5 1 0 General Dresses Dresses;;;;;;;;;;;;;;;;;;;
10 NA
11 3 0 14 General Dresses Dresses;;;;;;;;;;;;;;;;;;;
12 5 1 2 General Petite Dresses Dresses;;;;;;;;;;;;;;;;;;;
13 NA
14 NA
15 3 1 1 General Dresses Dresses;;;;;;;;;;;;;;;;;;;
16 NA
17 NA
18 5 1 0 General Tops Blouses;;;;;;;;;;;;;;;;;;;
19 NA
20 NA
21 NA
Error in .f(.x[[i]], ...) : object 'Review.Text' not found