I have a table (data frame 1) with tokenized strings. These words need to be replaced with a numerical value from a CSV that I read into R. I used the following commands
library(dplyr)
df1 <- data.frame(tweetsContent, stringsAsFactors = FALSE)
names(df1) <- c('word')
cct <- read.csv('concNorm.csv')
names(cct) <- c('word','concreteness')
cct <- scan_tokenizer(cct[1])
df2 <- data.frame(cct)
result <- semi_join(df1, df2, by='word')
The error message for both I get is the following:
Error in UseMethod("semi_join"): no applicable method for 'semi_join' applied to an object of class "character".
I have no idea why class character should be a problem as the DPLYR package doesn't specify any data type for the JOIN functions. When loading DPLYR I don't get an error message. I also looked at gsub
but all the examples seemed to be replace a certain A with a corresponding B? In my case, A takes on different values, i.e. different words, and has therefore different corresponding values.
The up-dated file can be found here