Web EndMemo

R Character Matrix to Numeric


When read data containing characters, R will readin them as character matrix in default.

For example, the following file will be readed as a character matrix in default:


However we can convert the 3rd row to the last row into numeric matrix because there are all numbers, following is the code: