Hello. I was trying to sum the numbers by column in a list like this:
>affect_word <- affect_word %>% replace(.=="null", 0)
>head(affect_word)
positive negetive anxiouse anger sad
<dbl> <dbl> <dbl> <dbl> <dbl>
1 6.17 0 0 0 0
2 16 0 0 0 0
3 15.4 0 0 0 0
4 12.5 0 0 0 0
5 15.2 0 0 0 0
6 15 0 0 0 0
Then using colSums to su the colmns
>sum = colSums(affect_word)
>sum
positive negetive anxiouse anger sad
NA NA NA NA NA
How to fix this?