Skip to content

Commit

Permalink
fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
pierreroudier committed Apr 12, 2018
1 parent bd58ec8 commit 05e1248
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/clhs-internal.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@

# Correlation of continuous data
#
cor_sampled <- cor(data_continuous_sampled)
cor_sampled[is.na(cor_sampled)] <- 1 # when there's only one observation, cor() throws NAs - we set these to 1
cor_sampled <- suppressWarnings(cor(data_continuous_sampled))

# when there's only one observation, cor() throws NAs - we set these to 1
cor_sampled[is.na(cor_sampled)] <- 1

delta_obj_cor <- sum(abs(cor_mat - cor_sampled))

Expand Down

0 comments on commit 05e1248

Please sign in to comment.