[R] Heatmap - strange horizontal lines
zuzana zajkova
zuzulaz at gmail.com
Thu Oct 23 20:45:54 CEST 2014
Dear list,
I would like to make heatmaps from my data. Acctualy, I have already done
it, but the issue it that is doesn't work well for all files.
All files have the same structure, after importing them I do few
calculations using the same script, to obtain variables for plotting.
You can find the files here, the pb2166 is the one which works fine and I
get normal (expected) heatmap plot, the pb2214 it the other type, for which
I obtain strange horizontal lines...
https://www.dropbox.com/s/rz2ywnloepvr3d8/pb2166.csv?dl=0
https://www.dropbox.com/s/42taaybtbortv0p/pb2214.csv?dl=0
The structure of data is this (the same, from my point of view...):
str(pb2166)
'data.frame': 55119 obs. of 3 variables:
$ dtime: num 17.9 18.1 18.3 18.4 18.6 ...
$ act : int 9 1 0 0 0 0 0 0 0 0 ...
$ jul : num 13573 13573 13573 13573 13573 ...
str(pb2214)
'data.frame': 44707 obs. of 3 variables:
$ dtime: num 17.9 18.1 18.2 18.4 18.6 ...
$ act : int 9 1 0 0 0 0 0 0 0 0 ...
$ jul : num 13573 13573 13573 13573 13573 ...
To create a heatmap I tried ggplot/qlot and levelplot aswell, the results
are the same... for pb2166 works ok, for pb2214 doesn't...
qplot(jul, dtime, data=pb2166, geom="tile", fill=act) +
scale_fill_gradient(low="gold", high="green4")
levelplot(act ~ jul * dtime, pb2166 )
qplot(jul, dtime, data=pb2214, geom="tile", fill=act) +
scale_fill_gradient(low="gold", high="green4")
levelplot(act ~ jul * dtime, pb2214 )
I would be very thankful if somebody could take a look on the data and find
something what I am missing.
Kind regards,
Zuzana
[[alternative HTML version deleted]]
More information about the R-help
mailing list