Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

Encode string for heatmap

$
0
0

I am struggling to visually present my data to better understand it. I would like to visually present the df in a Heatmap. To do that, I would thought to convert the strings into numeric codes, such as X = 25, N = 50 , D = 75 etc.

My df looks like this:

    customer_id customer_math X1 X2 X3 X4 X5 X6 X7
1   15251       XNUDSCL       X  N  U  D  S  C  L

Could you help me by pointing me into the right direction?

Many thanks for your support!


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>