-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
There seem to have a few remaining issues related to the C++ part of the package, that was kindly contributed by @kdaust (see #15).
Technically, it seems the problem is actually not as much in the C++ code itself, but in the R code that precedes it.
First, this for loop (now commented out):
Lines 79 to 82 in 8d45408
| # for(i in 1:ncol(data_factor)){ | |
| # data_factor[,i] <- as.numeric(as.factor(data_factor[,i])) | |
| # } | |
| data_factor <- apply(data_factor, 2, function(x) as.numeric(as.factor(x))) |
This converts automatically any character data to NAs.
I think it can be fixed by using as.numeric(as.factor(data_factor[,i)). I've implemented a version of this using apply.
Second issue, probably minor, but this line here looks like it's a hardcoded "5":
Lines 89 to 92 in 8d45408
| data <- as.matrix(x) | |
| factIdx <- 1:5 # why five?? | |
| ncont <- ncol(data) | |
| data_continuous <- x |
I'm guessing it should be a 0?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels