r - replacing unique ID's with a sequence of numbers -


i trying make graph in x-axis date (each tick 1 day), , each tick of y-axis represents uniquely identified individual (a fish). then, each individual each day, plot point show if each individual detected on day.

my issue have many thousand detections plot, , 400 individuals. individuals uniquely identifying numbers quite large (for example: 161795550 , 165705763 2 of 400 unique ids). individuals seen few days, few hundred.

the issue: plotting way (using ggplot2) makes y-axis impossibly spread out between low , high unique ids, , ggplot2 there no way break axis. so, thoughts on solution renumber unique ids sequence 1 400, way of controlling spread on y-axis. manually, take long time. there way automate renaming?

here code used recreate applied situation, want rename 3 unique id's (165705763,161795422,161795351) (1,2,3) (except there 400 ids in real life problem).

a<-c("165705763","165705763","165705763","165705763","165705763","161795422","161795351","161795351","161795351") b<-c("seine","seine","seine","seine","seine","seine","hookandline","hookandline","hookandline") f<-c("2010-10-25","2010-10-18 ","2010-10-30","2010-11-12","2010-10-29","2010-10-16","2010-10-25","2010-10-16","2010-10-18") d<-cbind(a,b,f) 

any other solutions welcome!

andrie's comment led blatantly simple solution. original data had id's class 'integer'. merely reclassed id's characters, , ggplot2 scaled y-axis automatically


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -