I am having trouble with this code which attempts to edit some strings in a dplyr
pipe. Here is some data that throws the following error. Any ideas?
data_frame(id = 1:5,
name = c('this and it pretty long is a',
'name is a',
'so and so and so and so and so',
'this is a',
'this is a variabel name'))
%>%
str_trunc(.,
string = .$name,
width = 10,
side='right',
ellipsis = '')
Gives me this error: Error in str_trunc(., string = .$name, width = 10, side = "right", ellipsis = ". . . ") : unused argument (.)
.
Thanks.