[R] uncompress gz and bz2 and read nc

2014-03-28 Thread Marta Rufino
Hi, I would like to un-compress a gz or a bz2 file to current working directory. I am able to open the connection in a variety of ways, but than cannot access the *.*nc file inside. Is there a way of accessing the netcdf wiathout uncompressing? (I am using windows8, R 3.0.3) An example of what I

Re: [R] approx function wierd result

2010-04-06 Thread marta rufino
ok, not really sorted :-(does not work in other values,...and I am not really sure how to come over it x=c(0.0191,0.0088,0.0150,0.0105,0.0430,0.0697,0.1999) y=c(58,107,152,239,362,512,724) x1=0.02220172 kk=y[x==min(x)] approxExtrap(x[y>kk],y[y>kk],x1, method="linear") approx(x[y>kk],y[y>kk],x1) pl

Re: [R] approx function wierd result

2010-04-06 Thread marta rufino
Thank David, That is completely correct! I have no ideia how come matlab and Octave do not do this... maybe the interp1 function has some kind of trick. .. maybe the algorythm looks for the closest ranked values and not by its true value. What ever... Just sort it out in a not prety-but efficient

[R] approx function wierd result

2010-04-06 Thread marta rufino
Dear R-list members, I am calculating the linear extrapolation for a data set, using the function found in Hmisc. x=c(0.0265,-0.0003,0.0142,0.0263,0.0634,0.1145,0.2504) y=c(58,107,152,239,362,512,724) x1=0.0393216 approxExtrap(x,y,x1, method="linear") approx(x,y,x1) #to see what is happening: pl

Re: [R] help in matlab - r code

2010-03-30 Thread marta rufino
Dear Susanne, Thank you for your answer :-) and for the other people that helped privately. I have been running the code with a friend, and we reached a similar conclusion. Matlab, apparently automatically transforms the matrices in vector and does the correlation between vectors thus obtaining on

[R] help in matlab - r code

2010-03-24 Thread marta rufino
Dear list members, I need to translate 3 lines of matlab code to R (a loop, to be specific), and I don't know what would be the results in matlab or how to do it in R-- I don't realise if they are doing to the col, vector or what. if the results are a vector or a value or a matrix :-( Anyone with

[R] help in matlab - r code

2010-03-24 Thread marta rufino
Dear list members, I need to translate 3 lines of matlab code to R (a loop, to be specific), and I don't know what would be the results in matlab or how to do it in R-- I don't realise if they are doing to the col, vector or what. if the results are a vector or a value or a matrix :-( Anyone with

[R] how often we use the libraries/packages in R

2009-05-12 Thread Marta Rufino
Dear list members, I am trying to make a clean up on my computer (windows problems, off course), and I wanted to remove some libraries that I have installed in R, which have been hardly used. Is there any way to see how often each library is used by us? I have many that I am not sure... becaus

Re: [R] image/area plot

2008-01-21 Thread Marta Rufino
Hello, Here it is a better example: http://amarsagoo.blogspot.com/2007/08/on-pie-charts-etc.html best, Marta __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/pos

Re: [R] image/area plot

2008-01-21 Thread Marta Rufino
seful > points(expand.grid(seq_len(ncol(resmat)), seq_len(nrow(resmat))), c(res)) #using your excelent code, I think this makes the job :-) Thank you very much, Best wishes, Marta > On 18/01/2008, Marta Rufino <[EMAIL PROTECTED]> wrote: > >> Yes, that is it, a square pie c

Re: [R] image/area plot

2008-01-18 Thread Marta Rufino
something like a square pie > chart (aka waffle chart), a stacked barchart, a levelplot, or > something else. > > Hadley > > On Jan 18, 2008 6:06 AM, Marta Rufino <[EMAIL PROTECTED]> wrote: > >> Dear R users, >> >> I am trying to produce an image plot, th

[R] image/area plot

2008-01-18 Thread Marta Rufino
Dear R users, I am trying to produce an image plot, that represents the proportions of a factor (z variable), so that the number of squares of each colour represents each factor level, with the respective label inside (sorry for the crap English). # Something like this: kk=data.frame(fact=let