Skip to content

Commit

Permalink
removed assigned loading multiplier in net.loads
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexChristensen committed Nov 30, 2023
1 parent 789d2e7 commit 361a028
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
26 changes: 14 additions & 12 deletions R/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -3207,24 +3207,26 @@ adapt.a <- function (test = c("anova","chisq","cor","one.sample","two.sample","p

#' @noRd
# OS and System Check ----
# Updated 08.09.2020
system.check <- function (...)
# Updated 28.11.2023
system.check <- function()
{

# Get OS usage
OS <- unname(tolower(Sys.info()["sysname"]))

# Get RStudio usage
RSTUDIO <- swiftelse(Sys.getenv("RSTUDIO") == "1", TRUE, FALSE)

TEXT <- TRUE

if(!RSTUDIO){if(OS != "linux"){TEXT <- FALSE}}

res <- list()

res$OS <- OS
res$RSTUDIO <- RSTUDIO
res$TEXT <- TEXT
# Return list
return(
list(
OS = OS,
R = paste0(R.version$major, ".", R.version$minor),
RSTUDIO = RSTUDIO,
TEXT = swiftelse(!RSTUDIO & OS != "linux", FALSE, TRUE)
)
)

return(res)
}

#' @noRd
Expand Down
4 changes: 2 additions & 2 deletions R/net.loads.R
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ obtain_signs <- function(target_network)

#' @noRd
# Experimental loadings ----
# Updated 05.09.2023
# Updated 30.11.2023
experimental_loadings <- function(
A, wc, nodes, node_names,
communities, unique_communities
Expand Down Expand Up @@ -485,7 +485,7 @@ experimental_loadings <- function(
# Multiply the assigned loading matrix by 2
# This computation is a vectorization of putting half
# of a node's within-community strength on it's diagonal
loading_matrix <- loading_matrix * 2
#\loading_matrix <- loading_matrix * 2

# Check for unidimensional structure
if(communities > 1){
Expand Down

0 comments on commit 361a028

Please sign in to comment.