You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (method%in% c("BEA", "BEA_TSP", "PCA", "PCA_angle")) {
Reproducible example
library(corrr)
df<-data.frame(
x=1:10,
y=-c(1:10),
z=1:10
)
cdf<- correlate(df)
#> Correlation computed with#> • Method: 'pearson'#> • Missing treated using: 'pairwise.complete.obs'
rearrange(cdf, absolute=TRUE) # shouldn't change order#> # A tibble: 3 × 4#> term x z y#> <chr> <dbl> <dbl> <dbl>#> 1 x NA 1 -1#> 2 z 1 NA -1#> 3 y -1 -1 NA
rearrange(cdf, absolute=FALSE) # expected (because not assigned)#> # A tibble: 3 × 4#> term x z y#> <chr> <dbl> <dbl> <dbl>#> 1 x NA 1 -1#> 2 z 1 NA -1#> 3 y -1 -1 NAcdf[2:4] <- lapply(cdf[2:4], abs)
rearrange(cdf)
#> # A tibble: 3 × 4#> term x y z#> <chr> <dbl> <dbl> <dbl>#> 1 x NA 1 1#> 2 y 1 NA 1#> 3 z 1 1 NA
The problem
abs(m)
isn't assigned?corrr/R/cor_df.R
Lines 39 to 46 in bd5841d
Reproducible example
Created on 2022-12-13 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: