[R] lineplot.CI problem

Dieter Vanderelst dieter_vanderelst at emailengine.org
Mon Feb 18 10:21:31 CET 2008


Hi,

Thank you very much for this very rapid and helpful reply.

I'm giving the code a spin around the block. It looks to be working fine.

There is actually also something else on my lineplot.CI wish list. If I might be so bold to ask:

When plotting multiple data traces with relative high standard deviations, the whiskers tend to overlap. This hampers the interpretation of the data somewhat. Is there a way to let the function plot data points with some horizontal displacement to prevent this?

Regards,

Dieter

Manuel Morales wrote:
> Here's an updated version of lineplot.CI that will succeed even for
> cases where data are not present in all factor combinations. Also, this
> version has the option x.cont to specify that the x axis represents a
> continuous variable with proportional spacing. A new version of sciplot
> with these changes will be posted soon.
> 
> ## Examples:
> source("lineplot.CI.R")
> 
> ## Generate data
> time=c(rep(c(21:30),3),rep(c(1:10),3))
> y <- time+rnorm(60,0,1)
> factors <- rep(c(1:2),each=30)
> 
> ## Proportional spacing
> lineplot.CI(resp=y, x.factor=time, group=factors, x.cont=TRUE)
> 
> ## Factorial spacing
> lineplot.CI(resp=y, x.factor=time, group=factors)
> 
> Manuel
> 
> On Fri, 2008-02-15 at 15:18 +0100, Dieter Vanderelst wrote:
>> Hi List,
>>
>> I have a problem plotting data using the lineplot.CI command in the sciplot package.
>>
>> I want to plot the data of 2 experimental cases using different lines (traces). Time is on the X-axis. The tricky thing is that the data collection in the second case started later than for the first case. This is to say: the first n data points for the second case are missing.
>>
>> So far so good. However, when I plot the data using lineplot.CI, the standard error bars are not aligned correctly with the markers.
>>
>> I know that this might be difficult to imagine. Here you can find an example: http://i254.photobucket.com/albums/hh115/MarkerMe/example.png
>>
>> So, has anybody experienced this problem and solved it before? I think I could try padding the data of the second case with zeros to eliminate the missing data. But I hope there is a better solution.
>>
>> Regards,
>> Dieter
>> ----------------------------------------------------
>> Dieter Vanderelst
>> dieter dot vanderelst at emailengine dot org
>>
>> ______________________________________________
>> 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