[R] Modifying dataframe with mutate()

H @gent@ @end|ng |rom medd@t@|nc@com
Sat Jul 25 21:11:24 CEST 2020


In a statement like:

df %>% mutate(v1 = as.double(v1))

I expect the variable v1 in dataframe df to have been converted into a double. However, when I do:

str(df)

v1 still shows as int. Do I need to save the modified dataframe after mutating a variable?



More information about the R-help mailing list