I am new to R. Currently, I have parsed messages from a Whatsapp chat group and now I am trying to visualize data for average word length per member.
I am using this code to calculate the number of words for every time "Eddy" message
for(i in grep("Eddy",chatcsv[,2],fixed=TRUE)){
length(which(!is.na(chatcsv[i,4:111])))
}
This does not return any output or any error message.
My intention is to then sum up the total length and then divide by the number of times a person message. Lastly, I plan to place the average as a vector and visualize it as a bar graph.
Thank you