integer is a subclass of numeric.
> is.numeric(data.matrix(test.df)[[1]])
[1] TRUE
See ?integer, ?numeric, ?storage.mode
On Fri, Oct 13, 2017 at 2:07 PM, Ed Siefker wrote:
> I have a data frame full of integer values. I need a matrix full of
> numeric values.
>
> ?data.matrix reads:
>
>
I have a data frame full of integer values. I need a matrix full of
numeric values.
?data.matrix reads:
Return the matrix obtained by converting all the variables in a
data frame to numeric mode and then binding them together as the
columns of a matrix.
This does not work.
test.
2 matches
Mail list logo