[R] image() plot with z not in matrix format

2007-11-29 Thread mdgi
Hello R cracks The image() function requires strictly increasing x and y values and z as a matrix. Actually, I don't have equally spaced variables, but anyway want to plot an colored image() (with z-information). An example of my problem is here: a<-data.frame(rnorm(100), rnorm(100), runif(10

[R] several image.plots with same axis (maximum)

2008-01-24 Thread mdgi
Hello R freaks I have the following problem: I have several image plots, that need to have the same axis. i want to specify the range from 0 to a maximum value. The problem is, that the axis then only goes to the highest value of the respective plot. E.g: this is a modified example from the hel

[R] transparency of one layer in multiple wireframe plot

2007-09-28 Thread mdgi
Sorry sending this again - is anyone familiar with multiple transparent wireframe plots? I already checked the ?wireframe, but with no examples and as newcommer its hard to find out a correct code. If we set drape=F in the example: g <- expand.grid(x = 1:10, y = 5:15, gr = 1:2) g$z <- log((g$x

[R] Zoo: yaxis inversion with zoo not possible?

2007-10-11 Thread mdgi
hej there I want to invert the yaxis as follows: x<-rnorm(1:50) plot(x^2, type="h", ylim=c(0,10)) plot(x^2, type="h", ylim=c(10,0)) then doing the following it won't work - kind of strange isn't it? x.zoo<-zoo(x^2) plot(x.zoo, type="h", ylim=c(10,0)) plot(x.zoo, type="h", ylim=c(0,10)) how can

[R] shading of curves with polygon

2007-10-29 Thread mdgi
Hello again With the poylgon function it's possible to plot shaded areas under a curve. But somehow it connects the start and the endpoint of a line and fills whats between them. I would actually like to set the boarders of the shading by two min and max curves, but I failed. i tried stl like:

[R] function over variables in a list

2007-11-02 Thread mdgi
Hello R-users I nowhere red in tutorials neither in r-help how to access one variable in multiple list objects. p.e i have list of 50 Length Class Mode [1,] 16 data.frame list and i want to check for the max in column 16 of all list objects: I tried max(mylist[[]][,16]) or ma

[R] partially sum variable of a dataframe

2007-11-07 Thread mdgi
Hello, A stupid question: I have an array with two columns, the first "a" acting as my index in 0.25 steps, the second one "b" the column of interest. How can i sum up "b" only for a specified window in "a" (as the window command for time series) a=seq(0,10,0.25) b=runif(41) c=data.frame(a,b)