x is not a dataframe or a numeric matrix code example Example: data frame to matrix r data.matrix(frame, rownames.force = NA)