mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 12:37:30 +02:00
plots new accept pri, sec and ter arguments instead of x,y,z to avoid confusion. tests, tests, tests
This commit is contained in:
parent
e463fa0670
commit
652a8ca1b7
28 changed files with 3275 additions and 179 deletions
|
|
@ -46,7 +46,8 @@ data_correlations_server <- function(id,
|
|||
} else {
|
||||
out <- data()
|
||||
}
|
||||
out |> dplyr::mutate(dplyr::across(tidyselect::everything(),as.numeric))
|
||||
# out |> dplyr::mutate(dplyr::across(tidyselect::everything(),as.numeric))
|
||||
sapply(data,as.numeric)
|
||||
# as.numeric()
|
||||
})
|
||||
|
||||
|
|
@ -100,8 +101,9 @@ data_correlations_server <- function(id,
|
|||
}
|
||||
|
||||
correlation_pairs <- function(data, threshold = .8) {
|
||||
data <- data[!sapply(data, is.character)]
|
||||
data <- data |> dplyr::mutate(dplyr::across(dplyr::where(is.factor), as.numeric))
|
||||
data <- as.data.frame(data)[!sapply(as.data.frame(data), is.character)]
|
||||
data <- sapply(data,\(.x)if (is.factor(.x)) as.numeric(.x) else .x) |> as.data.frame()
|
||||
# data <- data |> dplyr::mutate(dplyr::across(dplyr::where(is.factor), as.numeric))
|
||||
cor <- Hmisc::rcorr(as.matrix(data))
|
||||
r <- cor$r %>% as.table()
|
||||
d <- r |>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue