0

When im trying to apply to lower function to data frame column:

df <- df %>%
  mutate(col1 = tolower(col1))

I get:

Error in tolower(BRIEF_DESCRIPTION), ...., IP �' in 'utf8towcs'

Its because some of elements in column have unknown encoding. How could i fix it? How could i change encoding of those elements in columns with UTF-8 encoding

  • 1
    I think there's some strange characters.. mind using dput on df? – StupidWolf Nov 07 '19 at 12:20
  • try to find the problematic line by subsetting the `df` or anything and give us a little reproducible example by using `dput(my_little_df)`. I normally subset the df to half of it and half again or so. There are easier ways but since you do not exactly know what to look for.... – drmariod Nov 07 '19 at 12:54
  • Some of elements in column have unknown encoding. How could i change encoding of those elements on columns with UTF-8 encoding –  Nov 07 '19 at 13:17

0 Answers0