I'm trying to create a heatmap from how many times the variable 1 coincides with variable 2 in R.
Example:
Var1 | Var2
a | x
a | x
b | x
c | y
The combination a|x shows twice, so the heatmap should have the value 2 on row a, column x; value 1 on row b, column x; value 1 on row c, column y etc.
The main problem is that variable 1 can have 77 different possibilities (ie values) and variable 2 can have another 70 different possibilities (ie values), for a 77x70 matrix. Total rows goes beyond 1,000,000.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.