I have a [160 x 3] matrix where each column represents the x, y, or z value for each tile of the heat map I am making. I need to store these values so I can run this command in r:
ggplot(data, aes(X, y, fill= Z))
Thus, I want to create bins for each element and each bin should have the coordinates and value at said position. Filled bins would have objects for ggplot2 to use when coloring tiles.
I tried to iterate this using:
x()*160
y()*160
z()*160
for row in number
for col in number
but I get the error
Error in x() : could not find function "x"
but I don't which package I need or if I am using the correct package.