Skip to content

Creating a histogram properly

1 message · Joshua Wiley

#
Hi Joe,

What about this?  Btw, the real key to a reproducible example is one
that we can actually work with----output of the summary of the data is
not the same as the data itself.  That makes it tricky to know what
exactly you are working with (although sometimes the original form of
the data can be intuited from the summary output).  For future
reference, providing the output of something like:

dput(head(Names))

would make it easier for us to read your data in, and then we have
exactly what you are working with and can offer advice more easily.


## Read data in
Names <- read.table(textConnection("
              V1            V2
1  First001  Last001
2  First002  Last001
3  First003  Last002
4  First004  Last003"), header = TRUE)
closeAllConnections()
# barplots of table()d results
barplot(table(Names$V2))
barplot(table(Names$V2))

Cheers!

Josh
On Mon, Oct 24, 2011 at 11:03 AM, Joe Carl <joseph.w.carl.jr at gmail.com> wrote: