[R] Dot plot of character and numeric matrix

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Wed Jan 23 16:23:14 CET 2013


I think you need to become more familiar with the "factor" data type. Reread the Introduction to R document that comes with R.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

Ng Wee Kiat Jeremy <jeremy.ng.wk1990 at gmail.com> wrote:

>Dear List,
>
>I have a set of data which looks like this (small set of sample)
>
>A A	0.431
>A A	0.439
>A A	0.507
>A G	0.508
>A A	0.514
>
>I will like to use this data to plot a dot plot, with the X-axis being
>of type character, and my y axis of type numeric.
>
>When I try to use the dot chart function, I get the error message "'x'
>must be a numeric vector or matrix", which I can understand it to be a
>result of the fact that I have characters AA, AG etc as my x-values.
>
>Any idea how I can go about doing this?
>
>Thanks in advanced!
>Jeremy
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list