Joining/Merging Messy Data

I am trying to get this code to work,

setuplong <- setuplong %>%
nr_blinks = as.numeric(gsub("/files/vids/|blinks_|blinks_|,mp4","",video))

but I keep getting this error:
Warning messages:
1: Problem with mutate() input nr_blinks.
i NAs introduced by coercion
i Input nr_blinks is as.numeric(gsub("/files/vids/|blinks_|blinks_|,mp4", "", video)).
2: In mask$eval_all_mutate(dots[[i]]) : NAs introduced by coercion

I am not sure if I need to get another package on R or anything else.

a = "Here is a string full of blanks."
str_replace_all(a," ","_")
#> [1] "Here_is_a_string_full_of_blanks."

Created on 2020-12-30 by the reprex package (v0.3.0.9001)

Thank you so much for your help!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.