-
Notifications
You must be signed in to change notification settings - Fork 135
Closed
Milestone
Description
Applying base scale to multiple columns in a tibble results in an incorrectly scaled output and breaks the tibble on sort. Fresh windows, fresh and latest R/RStudio, latest tidyverse.
library(tibble)
iris <- as_tibble(iris)
iris[1:3] <- scale(iris[1:3])
head(iris)
#> # A tibble: 6 x 5
#> Sepal.Length[,"~ [,"Sepal.Width"] [,"Petal.Length~ Sepal.Width[,"S~
#> <dbl> <dbl> <dbl> <dbl>
#> 1 -0.898 1.02 -1.34 -0.898
#> 2 -1.14 -0.132 -1.34 -1.14
#> 3 -1.38 0.327 -1.39 -1.38
#> 4 -1.50 0.0979 -1.28 -1.50
#> 5 -1.02 1.25 -1.34 -1.02
#> 6 -0.535 1.93 -1.17 -0.535
#> # ... with 7 more variables: [,"Sepal.Width"] <dbl>, [,"Petal.Length"] <dbl>,
#> # Petal.Length[,"Sepal.Length"] <dbl>, [,"Sepal.Width"] <dbl>,
#> # [,"Petal.Length"] <dbl>, Petal.Width <dbl>, Species <fct>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels