# Loading the CSV files # Copy section below for each file # replace x with a meaningful variable name # replace "C:/path/file.csv" with the path to and file name of the file to be loaded x <- read.csv("C:/path/file.csv", header = TRUE, sep = ",", strip.white = TRUE, fill = TRUE, quote = "\"", dec = ".", na.strings ="NA") # Saving the ID, Abstract, and Title variables from the data # copy the secion below for each file # replace y with meaningful vairable, and X with the variable name used in the previous section of code # id, abstract, and title should be replaced with the corresponding variable name (column header in CSV file) y_id <- x$id y_ab <- as.character(x$abstract) y_ti <- as.character(x$title) # Combining the ID, Abstract, and Title variables into a subset of the original data # Copy section below for each file # replace z with a meaningful variable name # y_id, y_ab, y_ti should all be replaced with the variable names used in the previous section of code z <- cbind(y_id, y_ab, y_ti) # Combining the results from the previous step into one data frame # Replace z with the variable names defined in the previous section of code, separated by a comma data_full <- as.data.frame(rbind(z)) # Removing duplicates and assigning them to a new data frame data_unique <- unique(data_full) # writing character vectors for the unique titles and abstracts # Abstract and title should be replaced with the corresponding variable name (column header in CSV file) abstracts <- as.character(data_unique$abstract) titles <- as.character(data_unique$title) # Writing the unique title and abstracts to text files # Replace "path" with the location to save the files write(abstracts,"C:/path/abstracts.txt") write(titles,"C:/path/titles.txt")