Very new to R. I'm trying to use utf8toInt against a dataframe.
I want to scan the data frame for the Int value of 101 (e) and replace it with 69 (E).
My issue here is how to run through each value in the dataframe and execute the utf8ToInt function. {`
Build out UTF fuction here
a <- c("red", "blue", "yellow", "black")
b<- c("blue", "yellow", "red", "pink")
c<- c("white", "black", "red", "blue")df = data.frame(a,b,c)
df
a b c
1 red blue white
2 blue yellow black
3 yellow red red
4 black pink blueWhen trying to run against a single value
utf8ToInt(df[1]) Error in utf8ToInt(df[1]) : argument must be a character vector of length 1
'}
lapply(df[[1]],utf8ToInt)- Andre Elrico