Re: [R] facets work in qplot but facet_wrap produces an error in ggplot

2015-03-25 Thread Jeff Newmiller
Perhaps you had forgotten to use header=TRUE when you read the data in. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

Re: [R] facets work in qplot but facet_wrap produces an error in ggplot

2015-03-25 Thread Loren Cassin Sackett
Thanks, Jeff. I tried this previously by using a header in my data file (and 'header=TRUE'), but for some reason, that did not seem to work. Creating a 'names' vector as you suggested did solve the problem, though. Thank you! Loren 2015-03-24 23:19 GMT-04:00 Jeff Newmiller : > You MUST put al

Re: [R] facets work in qplot but facet_wrap produces an error in ggplot

2015-03-24 Thread Jeff Newmiller
You MUST put all data you plan to refer to into a data frame when using ggplot. There are a couple of ways you could do this... the easiest is to put a header line in the data file with column names. Or, you can assign a vector of new names to the names of the data frame. names( hetshoms ) <- c

[R] facets work in qplot but facet_wrap produces an error in ggplot

2015-03-24 Thread Loren
Hello all, I am having a perplexing problem trying to use facet_wrap in ggplot, with both my real dataset and a simplified dummy dataset. I am trying to plot heterozygosity across the genome for multiple individuals, with each chromosome shown separately. My dummy data: chr1123000 124000 2