knitr::opts_chunk$set(echo = TRUE)
library(readxl)
library(ggplot2)
library(dplyr)
library(tidyr)
library(palettes)
library(data.table)
library(httr)
library(stringr)
library(xml2)
library(rvest)
library(stringr)
library(progress)
library(furrr)
library(future)
library(tidyverse)
library(remotes)
library(kml)
library(sf)
library(xml2)
library(e1071)
library(caret)
library(ModelMetrics)
library(maps)
library(mlrMBO)
library(mlr)
library(ggcorrplot)
library(zoo)
library(tseries)
library(forecast)
library(patchwork)
library(yardstick)
library(neuralnet)
library(ggfittext)
library(readr)
library(stringi)
data <- read.csv("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/choice_sets_100_c95_quantile_neu.csv")
data_text <- data %>%
select(ReviewID, text)
data_unique <- unique((data_text))
#write.table(data_unique, "C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/data_unique2.csv", sep = ",", row.names = FALSE, col.names = TRUE, quote = TRUE)
data_new <- read_excel("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/data_unique.xlsx")
data_new$text <- gsub("â€™", "'", data_new$text)
data_new$text <- gsub("â€¦", "...", data_new$text)
data_new$text_new <- data_new$text
data_new <- data_new %>%
select(ReviewID, text_new)
final_df <- merge(x = data, y = data_new, by = "ReviewID", all.x = TRUE)
colnames(final_df) <- c(
"ReviewID", "X", "prod_pos", "prod_neg", "cust_pos", "cust_neg", "pcond_pos",
"pcond_neg", "seller_pos", "seller_neg", "Comparison", "Alternative", "labels",
"author", "rating", "text_old", "n_words", "levels", "text"
)
final_df <- final_df %>%
arrange(Comparison)
fwrite(final_df, "C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/Reviews.csv")
View(data_new)
data_new$text_new
View(data)
data_new <- read_excel("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/data_unique.xlsx")
data_new$text <- gsub("â€™", "'", data_new$text)
data_new$text <- gsub("â€¦", "...", data_new$text)
data_new$text <- gsub("â€œ", "", data_new$text)
data_new$text <- gsub("â€\u009d", "", data_new$text)
data <- read.csv("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/choice_sets_100_c95_quantile_neu.csv")
data_text <- data %>%
select(ReviewID, text)
data_unique <- unique((data_text))
#write.table(data_unique, "C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/data_unique2.csv", sep = ",", row.names = FALSE, col.names = TRUE, quote = TRUE)
data_new <- read_excel("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/data_unique.xlsx")
data_new$text <- gsub("â€™", "'", data_new$text)
data_new$text <- gsub("â€¦", "...", data_new$text)
data_new$text <- gsub("â€œ", "", data_new$text)
data_new$text <- gsub("â€\u009d", "", data_new$text)
data_new$text_new <- data_new$text
data_new <- data_new %>%
select(ReviewID, text_new)
final_df <- merge(x = data, y = data_new, by = "ReviewID", all.x = TRUE)
colnames(final_df) <- c(
"ReviewID", "X", "prod_pos", "prod_neg", "cust_pos", "cust_neg", "pcond_pos",
"pcond_neg", "seller_pos", "seller_neg", "Comparison", "Alternative", "labels",
"author", "rating", "text_old", "n_words", "levels", "text"
)
final_df <- final_df %>%
arrange(Comparison)
fwrite(final_df, "C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/Reviews.csv")
knitr::opts_chunk$set(echo = TRUE)
data_new <- read.csv2("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/data_unique3.csv")
data_new$text_new <- data_new$text
data_new <- data_new %>%
select(ReviewID, text_new)
library(readxl)
library(ggplot2)
library(dplyr)
library(tidyr)
library(palettes)
library(data.table)
library(httr)
library(stringr)
library(xml2)
library(rvest)
library(stringr)
library(progress)
library(furrr)
library(future)
library(tidyverse)
library(remotes)
library(kml)
library(sf)
library(xml2)
library(e1071)
library(caret)
library(ModelMetrics)
library(maps)
library(mlrMBO)
library(mlr)
library(ggcorrplot)
library(zoo)
library(tseries)
library(forecast)
library(patchwork)
library(yardstick)
library(neuralnet)
library(ggfittext)
library(readr)
library(stringi)
data_new <- data_new %>%
select(ReviewID, text_new)
data <- read.csv("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/choice_sets_round3.csv")
final_df <- merge(x = data, y = data_new, by = "ReviewID", all.x = TRUE)
View(final_df)
colnames(final_df) <- c(
"ReviewID", "X", "prod_pos", "prod_neg", "cust_pos", "cust_neg", "pcond_pos",
"pcond_neg", "seller_pos", "seller_neg", "Comparison", "Alternative", "labels",
"author", "rating", "text_old", "n_words", "text"
)
final_df <- final_df %>%
arrange(Comparison)
fwrite(final_df, "C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/Reviews3.csv")
data <- read.csv("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/choice_sets_round3.csv")
View(data)
data_text <- data %>%
select(ReviewID, text)
data_unique <- unique((data_text))
View(data_unique)
data_unique <- unique((data_text))[135:200,]
View(data_unique)
data_unique <- unique((data_text))[136:139,]
write.csv2(data_unique, "C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/data_unique3.1.csv")
data_new <- read.csv2("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/data_unique3.csv")
data_new$text_new <- data_new$text
data_new <- data_new %>%
select(ReviewID, text_new)
final_df <- merge(x = data, y = data_new, by = "ReviewID", all.x = TRUE)
colnames(final_df) <- c(
"ReviewID", "X", "prod_pos", "prod_neg", "cust_pos", "cust_neg", "pcond_pos",
"pcond_neg", "seller_pos", "seller_neg", "Comparison", "Alternative", "labels",
"author", "rating", "text_old", "n_words", "text"
)
final_df <- final_df %>%
arrange(Comparison)
fwrite(final_df, "C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/Reviews3.csv")
View(data)
data <- read.csv("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/choice_sets_round3.csv")
final_df <- merge(x = data, y = data_new, by = "ReviewID", all.x = TRUE)
data_new <- read.csv2("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/data_unique3.csv")
data_new$text_new <- data_new$text
data_new <- data_new %>%
select(ReviewID, text_new)
final_df <- merge(x = data, y = data_new, by = "ReviewID", all.x = TRUE)
data <- read.csv2("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/choice_sets_round3.csv")
data <- read.csv2("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/choice_sets_round3.csv")
final_df <- merge(x = data, y = data_new, by = "ReviewID", all.x = TRUE)
data <- read.csv("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/choice_sets_round3.csv")
data[401,10]
data[401,10] <- 401
data[401,10] <- 401
data[402,10] <- 401
data[403,10] <- 402
data[404,10] <- 402
data[405,10] <- 403
data[406,10] <- 403
data[407,10] <- 404
data[408,10] <- 404
final_df <- merge(x = data, y = data_new, by = "ReviewID", all.x = TRUE)
colnames(final_df) <- c(
"ReviewID", "X", "prod_pos", "prod_neg", "cust_pos", "cust_neg", "pcond_pos",
"pcond_neg", "seller_pos", "seller_neg", "Comparison", "Alternative", "labels",
"author", "rating", "text_old", "n_words", "text"
)
final_df <- final_df %>%
arrange(Comparison)
fwrite(final_df, "C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/Reviews3.csv")
data <- read.csv("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/choice_sets_round3.csv")
data <- read.csv("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/choice_sets_round3.csv")
final_df <- merge(x = data, y = data_new, by = "ReviewID", all.x = TRUE)
colnames(final_df) <- c(
"ReviewID", "X", "prod_pos", "prod_neg", "cust_pos", "cust_neg", "pcond_pos",
"pcond_neg", "seller_pos", "seller_neg", "Comparison", "Alternative", "labels",
"author", "rating", "text_old", "n_words", "text"
)
final_df <- final_df %>%
arrange(Comparison)
data_text <- data %>%
select(ReviewID, text)
data_unique <- unique((data_text))[136:139,]
data_unique <- unique((data_text))
write.csv2(data_unique, "C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/data_unique3.1.csv")
data_new <- read.csv2("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/data_unique3.csv")
data_unique <- rbind(data_unique, data_new)
data_unique$X <- NA
data_unique <- rbind(data_unique, data_new)
data_unique <- unique((data_unique))
data_unique <- unique((data_unique$text))
data <- read.csv("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/choice_sets_round3.csv")
data_text <- data %>%
select(ReviewID, text)
data_unique <- unique((data_text))
data_unique$X <- NA
data_unique <- rbind(data_unique, data_new)
data_unique <- rbind(data_unique, data_new) %>%
group_by(ReviewID, text)
data <- read.csv("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/choice_sets_round3.csv")
data_text <- data %>%
select(ReviewID, text)
data_unique <- unique((data_text))
data_unique$X <- NA
data_unique_final <- rbind(data_unique, data_new) %>%
group_by(ReviewID, text)
View(data_unique_final)
data_unique_final <- rbind(data_unique, data_new) %>%
group_by(data_unique$ReviewID)
data_unique_final <- rbind(data_unique, data_new) %>%
group_by(ReviewID)
data_unique_final <- rbind(data_unique, data_new) %>%
group_by("ReviewID", "text") %>%
summarize(X = mean(X, na.rm = T))
data_unique_final <- rbind(data_unique, data_new) %>%
group_by(ReviewID, text) %>%
summarize(X = mean(X, na.rm = T))
data_unique_final <- rbind(data_unique, data_new)
data_unique_final <- rbind(data_unique, data_new) %>%
arrange(ReviewID)
write.csv2(data_unique, "C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/data_unique3.1.csv")
data_unique_final <- data_unique_final %>%
arrange(ReviewID)
write.csv2(data_unique, "C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/data_unique3.1.csv")
write.csv2(data_unique, "C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/data_unique3.1.csv")
write.csv2(data_unique_final, "C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/data_unique3.1.csv")
data_new <- read.csv2("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/data_unique3.1.csv")
data_new %>%
group_by(ReviewID)
test <- data_new %>%
group_by(ReviewID)
View(test)
data_new <- read.csv2("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/data_unique3.1.csv")
data_new$text_new <- data_new$text
data_new <- data_new %>%
select(ReviewID, text_new)
final_df <- merge(x = data, y = data_new, by = "ReviewID", all.x = TRUE)
colnames(final_df) <- c(
"ReviewID", "X", "prod_pos", "prod_neg", "cust_pos", "cust_neg", "pcond_pos",
"pcond_neg", "seller_pos", "seller_neg", "Comparison", "Alternative", "labels",
"author", "rating", "text_old", "n_words", "text"
)
final_df <- final_df %>%
arrange(Comparison)
final_df <- final_df %>%
arrange(Comparison)
is.na(final_df)
sum(is.na(final_df))
fwrite(final_df, "C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/Reviews3.csv")
data_new <- read.csv2("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/data_unique3.1.csv")
data_new$text_new <- data_new$text
data_new <- data_new %>%
select(ReviewID, text_new)
final_df <- merge(x = data, y = data_new, by = "ReviewID", all.x = TRUE)
colnames(final_df) <- c(
"ReviewID", "X", "prod_pos", "prod_neg", "cust_pos", "cust_neg", "pcond_pos",
"pcond_neg", "seller_pos", "seller_neg", "Comparison", "Alternative", "labels",
"author", "rating", "text_old", "n_words", "text"
)
final_df <- final_df %>%
arrange(Comparison)
fwrite(final_df, "C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/Reviews3.csv")
knitr::opts_chunk$set(echo = TRUE)
data_new <- read.csv2("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/data_unique5.csv")
data <- read.csv("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/choice_sets_round5plus.csv")
data_new$text_new <- data_new$text
data_new <- data_new %>%
select(ReviewID, text_new)
library(readxl)
library(ggplot2)
library(dplyr)
library(tidyr)
library(palettes)
library(data.table)
library(httr)
library(stringr)
library(xml2)
library(rvest)
library(stringr)
library(progress)
library(furrr)
library(future)
library(tidyverse)
library(remotes)
library(kml)
library(sf)
library(xml2)
library(e1071)
library(caret)
library(ModelMetrics)
library(maps)
library(mlrMBO)
library(mlr)
library(ggcorrplot)
library(zoo)
library(tseries)
library(forecast)
library(patchwork)
library(yardstick)
library(neuralnet)
library(ggfittext)
library(readr)
library(stringi)
data_new$text_new <- data_new$text
data_new <- data_new %>%
select(ReviewID, text_new)
final_df <- merge(x = data, y = data_new, by = "ReviewID", all.x = TRUE)
colnames(final_df) <- c(
"ReviewID","X","prod_pos","prod_neg","cust_pos","cust_neg","pcond_pos","pcond_neg","seller_pos","seller_neg",
"comparison","Alternative","labels","author","rating","text_old","n_words","round",
"Comparison","text"
)
final_df <- final_df %>%
arrange(comparison)
View(final_df)
colnames(final_df) <- c(
"ReviewID","X","prod_pos","prod_neg","cust_pos","cust_neg","pcond_pos","pcond_neg","seller_pos","seller_neg",
"Comparison","Alternative","labels","author","rating","text_old","n_words","round",
"comparison","text"
)
final_df <- final_df %>%
arrange(Comparison)
final_df$Comparison <- rep(seq(1:816), each = 2)
final_df$Alternative <- rep(seq(1:2), 816)
fwrite(final_df, "C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/Reviews5_adjusted.csv")
knitr::opts_chunk$set(echo = TRUE)
data <- read.csv("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/choice_sets_round11.csv")
data_text <- data %>%
select(ReviewID, text)
library(readxl)
library(ggplot2)
library(dplyr)
library(tidyr)
library(palettes)
library(data.table)
library(httr)
library(stringr)
library(xml2)
library(rvest)
library(stringr)
library(progress)
library(furrr)
library(future)
library(tidyverse)
library(remotes)
library(kml)
library(sf)
library(xml2)
library(e1071)
library(caret)
library(ModelMetrics)
library(maps)
library(mlrMBO)
library(mlr)
library(ggcorrplot)
library(zoo)
library(tseries)
library(forecast)
library(patchwork)
library(yardstick)
library(neuralnet)
library(ggfittext)
library(readr)
library(stringi)
data_text <- data %>%
select(ReviewID, text)
data_unique <- unique((data_text))
View(data_unique)
write.csv2(data_unique, "C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/data_unique11.csv")
knitr::opts_chunk$set(echo = TRUE)
library(readxl)
library(ggplot2)
library(dplyr)
library(tidyr)
library(palettes)
library(data.table)
library(httr)
library(stringr)
library(xml2)
library(rvest)
library(stringr)
library(progress)
library(furrr)
library(future)
library(tidyverse)
library(remotes)
library(kml)
library(sf)
library(xml2)
library(e1071)
library(caret)
library(ModelMetrics)
library(maps)
library(mlrMBO)
library(mlr)
library(ggcorrplot)
library(zoo)
library(tseries)
library(forecast)
library(patchwork)
library(yardstick)
library(neuralnet)
library(ggfittext)
library(readr)
library(stringi)
data_new <- read.csv2("C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/data_unique11.csv")
View(data)
colnames(data)
data_new$text_new <- data_new$text
data_new <- data_new %>%
select(ReviewID, text_new)
final_df <- merge(x = data, y = data_new, by = "ReviewID", all.x = TRUE)
colnames(final_df) <- c(
"ReviewID","X","prod_pos","prod_neg","cust_pos","cust_neg","pcond_pos","pcond_neg","seller_pos","seller_neg",
"Comparison","Alternative","labels","author","rating","text_old","n_words","text"
)
final_df <- final_df %>%
arrange(Comparison)
View(final_df)
final_df <- final_df %>%
arrange(Alternative) %>%
arrange(Comparison)
fwrite(final_df, "C:/Users/leoni/OneDrive/Dokumente/Studium/IBA/oTree/revhelp/Reviews11.csv")
