Hi,
Perhaps I am missing an obvious solution but I am currently going around in circles between these two errors.
All values in my dataset are integers. And I know this for certain because I used the round() function.
However I was getting this error: Features for dataset No. 1 contains non-integer values!
After digging here I realised this was because of this test typeof(feat.temp) != 'integer'
So I converted using feat.table.integer <- apply(feat.table, 2, function(x) as.integer(as.character(x)))
However this results in
> class(feat.table.integer)
[1] "matrix" "array"
Which I believe is due to this
So then this error occurs: "Your feature table has several classes (should be only one)!" because of this test length(c.feat) != 1
So to try to get around this I try converting to a data frame using
feat.table.integer <- as.data.frame(feat.table)
But while this fixes the multiple classes error, now
> typeof(feat.table.integer)
[1] "list"
Please help!
Thank you.
Hi,
Perhaps I am missing an obvious solution but I am currently going around in circles between these two errors.
All values in my dataset are integers. And I know this for certain because I used the round() function.
However I was getting this error:
Features for dataset No. 1 contains non-integer values!After digging here I realised this was because of this test
typeof(feat.temp) != 'integer'So I converted using
feat.table.integer <- apply(feat.table, 2, function(x) as.integer(as.character(x)))However this results in
Which I believe is due to this
So then this error occurs:
"Your feature table has several classes (should be only one)!"because of this testlength(c.feat) != 1So to try to get around this I try converting to a data frame using
feat.table.integer <- as.data.frame(feat.table)But while this fixes the multiple classes error, now
Please help!
Thank you.