[R] plot only non-zero values
ligges at statistik.tu-dortmund.de
Sun Mar 18 17:49:28 CET 2012
On 17.03.2012 10:19, Joshua Wiley wrote:
> What about just setting them to missing and plotting?
> md<- yourdata
> md[md==0]<- NA
> My other idea depending how you want the plot to look would be to try something where 0 values get a blank colour or null plotting value
Or the OP is going to just ignore such data and want to plot na.omit(md)
after you had set all 0 to NA.
> On Mar 16, 2012, at 22:53, Noah Silverman<noahsilverman at ucla.edu> wrote:
>> i have some data in a matrix. It has zero values scattered throughout, at random.
>> I'd like to create a line plot, with a line for each row, that *excludes* the zero or NA values.
>> The data looks like this (toy example)
>> 10 12 21 0 23 0 43 0 NA 41
>> 0 0 0 34 35 0 35 0 44 0
>> NA NA NA 3 2 5 0 3 2
>> Suggestions on an easy way to do this?
>> Noah Silverman
>> UCLA Department of Statistics
>> 8208 Math Sciences Building
>> Los Angeles, CA 90095
>> [[alternative HTML version deleted]]
>> R-help at r-project.org mailing list
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
> R-help at r-project.org mailing list
> 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