Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# v2.0.4

## Fixes and improvements

* Fix factor conversion of mixed input data

* Memory optimization

## Known issues
Expand Down
2 changes: 1 addition & 1 deletion R/miic.reconstruct.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ miic.reconstruct <- function(input_data = NULL,
n_samples <- nrow(input_data)
n_nodes <- ncol(input_data)
# Numeric factor matrix, level starts from 0, NA mapped to -1
input_factor <- apply(input_data, 2, function(x)
input_factor <- sapply(input_data, function(x)
(as.numeric(factor(x, levels = unique(x))) - 1))
input_factor[is.na(input_factor)] <- -1
max_level_list <- as.numeric(apply(input_factor, 2, max)) + 1
Expand Down