I've a data frame with both characters and numbers and wish to convert it into a numeric matrix (As I need to make a heatmap out of it)
I've tried data.matrix and as.matrix functions but both are giving errors.
The data is currently in this form
season team average
1 a 45
1 b 32
1 c 15
2 a 43
2 b 45
2 c 34
3 a 45
and so on
And I wish to convert it into this
season a b c
1 45 32 15
2 43 45 34
3 45 ... ...
Sorry, If I've edited the question wrongly, I'm a bit new to both this platform and R