[R] Modifying dataframe with mutate()
Patrick (Malone Quantitative)
m@|one @end|ng |rom m@|onequ@nt|t@t|ve@com
Sat Jul 25 21:42:04 CEST 2020
This seems needlessly complicated.
df$v1 <- as.double(df$v1)
On Sat, Jul 25, 2020 at 3:31 PM H <agents using meddatainc.com> wrote:
> 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:
> v1 still shows as int. Do I need to save the modified dataframe after
> mutating a variable?
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
Patrick S. Malone, Ph.D., Malone Quantitative
NEW Service Models: http://malonequantitative.com
[[alternative HTML version deleted]]
More information about the R-help