[R] How to compute Rolling analysis of Standard Deviation using ZOO package?

2009-11-26 Thread Saji Ren
Hello: I want to get a rolling estimation of the stdev of my data. Searching the document, I found the function "rollapply" in the zoo package. For example, my series is "c", and i want get a period of 10 days, so i write the command below: roll.sd = rollapply( c, 10, sd, na.pad = TRUE, align =

Re: [R] Overlapping x - axis lables

2009-11-26 Thread Julia Cains
Dear Sir, Thanks again for your help. Sir, actually I am working on a data containing 84 months and the corresponding savings (core) balances and non-core balances and I am plotting a stacked bar. The original code I am using is as follows x = read.csv('core-noncore.csv') x2 <- data.frame(rep

[R] R and SAS JMP

2009-11-26 Thread rajclinasia
Hi everybody, my question is I have R installed in my system and SAS JMP version8 also installed in my computer. but how these two are related, how we can use these two tools for analysis. thanks in advance. -- View this message in context: http://old.nabble.com/R-and-SAS-JMP-tp26536257p265362

Re: [R] Overlapping x - axis lables

2009-11-26 Thread Jim Lemon
On 11/27/2009 05:11 PM, Julia Cains wrote: Dear R helpers Suppose I am plotting a simple scatter plot where no of paired observations (x,y) are say 100. month length 1 10 2 12 3 17 4 21 5 13 ...

[R] Overlapping x - axis lables

2009-11-26 Thread Julia Cains
Dear R helpers Suppose I am plotting a simple scatter plot where no of paired observations (x,y) are say 100. month     length 1               10 2           12 3   17 4       21 5   13 .. .

Re: [R] Learning R - View datasets

2009-11-26 Thread guohao.huang
Please check the following pdf file. http://tw.nextmedia.com/applenews/article/art_id/32119622/IssueID/20091127 1. First install.packages("Flury") 2. library(Flury") 3. data("wines") 'wines’ is a data frame with 26 observations, one factor denoting the country of origin and 15 quantitative varia

Re: [R] Symmetric Matrix classes

2009-11-26 Thread Gad Abraham
On Fri, Nov 27, 2009 at 2:22 PM, David Winsemius wrote: > > On Nov 26, 2009, at 9:45 PM, Gad Abraham wrote: > >> Hi, >> >> I'd like to store large covariance matrices using Matrix classes. >> >> dsyMatrix seems like the right one, but I want to specify just the >> upper/lower triangle and diagonal

[R] Learning R - View datasets

2009-11-26 Thread Brock Tibert
Hi All, I am making a serious effort to try to learn R, but one hurdle I am facing is that I need to "see" the data as I walk through the examples in the packages. For instance, many examples on the web start by a command like data("wines"). How can I actually view what the dataset looks like

Re: [R] Splitting the Distribution

2009-11-26 Thread David Winsemius
On Nov 26, 2009, at 10:21 PM, ychu066 wrote: Hi all, I am wondering if R can split the distribution respect to the median ? I know it can be done in SAS. ?polygon If you want worked examples there are serveral in the archives: http://search.r-project.org/nmz.html -- David Winsemius,

Re: [R] Symmetric Matrix classes

2009-11-26 Thread David Winsemius
On Nov 26, 2009, at 11:00 PM, Gad Abraham wrote: On Fri, Nov 27, 2009 at 2:22 PM, David Winsemius > wrote: On Nov 26, 2009, at 9:45 PM, Gad Abraham wrote: Hi, I'd like to store large covariance matrices using Matrix classes. dsyMatrix seems like the right one, but I want to specify just th

[R] Splitting the Distribution

2009-11-26 Thread ychu066
Hi all, I am wondering if R can split the distribution respect to the median ? I know it can be done in SAS. http://old.nabble.com/file/p26535862/Normal.bmp Normal.bmp ?? -- View this message in context: http://old.nabble.com/Splitting-the-Distribution-tp26535862p26535862.html Sent from

Re: [R] draw circle on PCA plot

2009-11-26 Thread Wai Kuan Yip
Phoebe, Hi, this was how I solved that problem using plot(). I found using symbols to be hard to adjust... #plot the 1st vs 2nd component plot(x,y,ylab="2nd component", xlab="1st component", xlim=range(x), ylim=range(y), main="1st vs 2nd component analysis") #show the arrows, length defined by

Re: [R] JMP <-> R ?

2009-11-26 Thread Wai Kuan Yip
Hello Robert, I am also trying to do the same. There is a way to do it using SAS Macro but I am still trying... You can have a look at this PDF: www.lexjansen.com/phuse/2008/ts/ts01.pdf www.lexjansen.com/phuse/2008/ts/ts01.pdf Let me know if it works!? Wai-Kuan Yip Deakin Motion Capture Lab

Re: [R] layers in xYplot of Hmisc

2009-11-26 Thread David Winsemius
On Nov 26, 2009, at 10:26 PM, Joe King wrote: In the "filled bands" part of xYplot of the Hmisc package, is there a way to have multiple bands with multiple lines? or does it just allow one for now? No problem as long as you use groups... which means you probably ought to be providing a

Re: [R] barchart() {Lattice} help.

2009-11-26 Thread Peng Cai
@ Peter: I got it, thanks a lot for all your help! And yes, as you said the "title" option in auto.key is redundant. @ All, Hi: I need to add percentage sign to y-axis labels (like 0%, 20%, ..., 100%). How can I get it. I'm using barchart() function as given below along with the data set. Data:

Re: [R] set condition in R

2009-11-26 Thread guohao.huang
You can use the statements ``while( I < 523 || I > 535)'' instead. It will work fine. Guo-Hao Huang -- From: "Hongwei Dong" Sent: Friday, November 27, 2009 10:59 AM To:

Re: [R] barchart() {Lattice} help.

2009-11-26 Thread P Ehlers
As I wrote earlier: "I had to add the rectangles= and points= arguments to auto.key to get the same key as you had earlier." and the relevant line in the code was: auto.key = list(space = 'right', rectangles=TRUE, points=FALSE) -Peter Ehlers Peng Cai wrote: Hello Peter and David, Thanks f

Re: [R] set condition in R

2009-11-26 Thread David Winsemius
On Nov 26, 2009, at 9:59 PM, Hongwei Dong wrote: Hi, R users, I'm using while() in R to set a condition. My condition is: i<523 or i>535. How should I write this in R? I try "while (i<523 or i>535)" and it does not work. Thanks. ?Logic (i<523 | i>535) Garry snipped what appeared t

[R] layers in xYplot of Hmisc

2009-11-26 Thread Joe King
In the "filled bands" part of xYplot of the Hmisc package, is there a way to have multiple bands with multiple lines? or does it just allow one for now? So I had an example bit ago had a made up line and CI, now if I wanted to make a second line with a CI filled in can I put them on the same pl

Re: [R] Symmetric Matrix classes

2009-11-26 Thread David Winsemius
On Nov 26, 2009, at 9:45 PM, Gad Abraham wrote: Hi, I'd like to store large covariance matrices using Matrix classes. dsyMatrix seems like the right one, but I want to specify just the upper/lower triangle and diagonal and not have to instantiate a huge n^2 vector just for the sake of having

[R] set condition in R

2009-11-26 Thread Hongwei Dong
Hi, R users, I'm using while() in R to set a condition. My condition is: i<523 or i>535. How should I write this in R? I try "while (i<523 or i>535)" and it does not work. Thanks. Garry On Tue, Nov 10, 2009 at 11:26 AM, Hongwei Dong wrote: > Exactly! Thanks, Duncan. > > Let me re-phrase me qu

[R] Symmetric Matrix classes

2009-11-26 Thread Gad Abraham
Hi, I'd like to store large covariance matrices using Matrix classes. dsyMatrix seems like the right one, but I want to specify just the upper/lower triangle and diagonal and not have to instantiate a huge n^2 vector just for the sake of having half of it ignored: Dumb example: M <- new("dsyMatr

Re: [R] barchart() {Lattice} help.

2009-11-26 Thread David Winsemius
On Nov 26, 2009, at 8:30 PM, Peng Cai wrote: > Hello Peter and David, > > Thanks for your help. I have added what you suggested and its > working perfectly fine except: > > When I add the panel function, the legend changes. In the sense > without the panel function the column names are shown

Re: [R] Feature request for as.Date() function

2009-11-26 Thread Gabor Grothendieck
The situation he is referring to seems to be this: > L <- "date,value\n'2009-01-01',10\n'2009-02-01',1\n'NA', 3" > read.csv(textConnection(L), colClasses = c("Date", "numeric")) Error in charToDate(x) : character string is not in a standard unambiguous format where all the fields in the date c

Re: [R] barchart() {Lattice} help.

2009-11-26 Thread Peng Cai
Hello Peter and David, Thanks for your help. I have added what you suggested and its working perfectly fine except: When I add the panel function, the legend changes. In the sense without the panel function the column names are shown with small colored rectangles (on right), but after adding it t

Re: [R] barchart() {Lattice} help.

2009-11-26 Thread Peter Ehlers
Peng, Did you try the code I sent? If not, why not? If you want equally spaced grid lines, use panel.grid() in place of panel.abline(). BTW, I don't understand what that "title=..." stuff in your auto.key() call is supposed to do. I think it just results in title=NULL. -Peter Ehlers Peng Cai

Re: [R] Grouped Boxplot

2009-11-26 Thread Richard M. Heiberger
The grouped boxplot is one of the features included in the HH package. An example is posted on my site http://astro.ocis.temple.edu/~rmh/HH/bwplot-color.pdf Reconstructing Figure 3 in your file GroupedBoxplot.pdf from your 11/24/2009 10:35 AM email would be easy. __

Re: [R] barchart() {Lattice} help.

2009-11-26 Thread David Winsemius
I do not see that you have used any panel functions. Even if you did not review the help from ?barchart, where there are several examples of using panel functions, I would have expected that you would look carefully at Peter Ehlers' code and try to apply it. -- David. On Nov 26, 2009, at

Re: [R] barchart() {Lattice} help.

2009-11-26 Thread Peng Cai
Currently I'm trying and I'm looking to draw lines y=-3, y=-2,..., y=8: Data: Sample Col1 Col2 Col3 Row1 -2 4 -1 Row2 3 -2 4 Row3 3 5 -2 Row4 4 1 -1 Code: library(lattice) dta<-read.table("data.txt", header=TRUE, row.names="Sample") coltemp=c(619,376,497,598,124,92,402) myYscale <- seq(-10, 10, 1

Re: [R] barchart() {Lattice} help.

2009-11-26 Thread Peng Cai
Hi Again, Before I start getting into what you just suggested, let me confirm if I made my point clear previously. I'm looking for horizontal lines similar to one on the following link (It has parallel lines for each y=200, y=400,...): http://pfiles.5min.com/images/176735/176734313.jpg What you

[R] Help on Html format R 2.10

2009-11-26 Thread Ruben Cabrera
Hello: I´m trying to change the plain text help to html help but I don´t know if this is possible with R 2.10.0 (Windows XP). The installation process always set to plain text. I found this http://old.nabble.com/change-in-default-behavior-of--functionname-in-R-2.10--td26115436.html Thanks in adv

Re: [R] Moving quantile()?

2009-11-26 Thread Rob Steele
Charles C. Berry wrote: > On Thu, 26 Nov 2009, Rob Steele wrote: > >> Is there a faster way to get moving quantiles from a time series than to >> run quantile() at each step in the series? > > > Yes. > > Run > > help.request() > > Since you have already done the first 4 items below (right

Re: [R] multi variate plot with string data

2009-11-26 Thread frenchcr
Thanks!! this works perfectly dat = data.frame(Aggressive = data_set$var1 , Behaviour=data_set$var2) plot(table(dat)) ...its better than a stacked boxplot as it gives also different width of columns on the diagram...an extra layer of information. frenchcr wrote: > > > Ive got

Re: [R] Moving quantile()?

2009-11-26 Thread Rob Steele
Charles C. Berry wrote: > On Thu, 26 Nov 2009, Rob Steele wrote: > >> Is there a faster way to get moving quantiles from a time series than to >> run quantile() at each step in the series? > > > Yes. > > Run > > help.request() > > Since you have already done the first 4 items below (right

Re: [R] barchart() {Lattice} help.

2009-11-26 Thread David Winsemius
Cannot reproduce. Seems to work as documented. Maybe your code (whatever it might be) is not correct? -- David. On Nov 26, 2009, at 6:53 PM, Peng Cai wrote: Thanks David, I tried panel.abline(h=somevalue) -- both inside and outside of barchart() function but its not working. Any suggestions

Re: [R] barchart() {Lattice} help.

2009-11-26 Thread Peter Ehlers
Peng Cai wrote: Thanks David, I tried panel.abline(h=somevalue) -- both inside and outside of barchart() function but its not working. Any suggestions? Peng Here's some code related to the data you posted earlier. barchart(data.matrix(dta), horizontal = FALSE, stack = TRUE, par.se

Re: [R] Help on Html format R 2.10

2009-11-26 Thread Ruben Cabrera
Hello Again: Let me answer myself because I already solved my problem: I found the file "...R\R-2.10.0\Rprofile.site" and used options(help_type="html"). Thanks. Ruben Cabrera On Thu, Nov 26, 2009 at 7:41 PM, Ruben Cabrera wrote: > Hello: > > I´m trying to change the plain text help to html he

Re: [R] Export kde object as shapefile

2009-11-26 Thread David Winsemius
On Nov 26, 2009, at 2:25 PM, T.D.Rudolph wrote: methods can be used to estimate home range size. The function kernel.area in the adehabitat package, for example, produces a spatial area I interpret as being equivalent to estimated home range size using one of two possible smoothing para

Re: [R] barchart() {Lattice} help.

2009-11-26 Thread Peng Cai
Thanks David, I tried panel.abline(h=somevalue) -- both inside and outside of barchart() function but its not working. Any suggestions? Peng On Thu, Nov 26, 2009 at 6:42 PM, David Winsemius wrote: > > On Nov 26, 2009, at 6:12 PM, Peng Cai wrote: > > Thanks a lot Peter! One more help, is there a

Re: [R] Help on Html format R 2.10

2009-11-26 Thread Ruben Cabrera
Hello: I´m trying to change the plain text help to html help but I don´t know if this is possible with R 2.10.0 (Windows XP). The installation process always set to plain text. I found this: http://old.nabble.com/change-in-default-behavior-of--functionname-in-R-2.10--td26115436.html Thanks in ad

Re: [R] barchart() {Lattice} help.

2009-11-26 Thread David Winsemius
On Nov 26, 2009, at 6:12 PM, Peng Cai wrote: Thanks a lot Peter! One more help, is there a similar function abline() for barchart(). ?panel.abline I'm trying to add a (light gray colored) horizontal lines, one for each y-value. Peng On Thu, Nov 26, 2009 at 5:59 PM, Peter Ehlers w

Re: [R] How to suppress errors generated by readHTMLTable?

2009-11-26 Thread Duncan Temple Lang
Just this morning, I made suppressing these parser messages the default behavior for htmlParse() and that will apply to readHTMLTable() also. Until I release that (along with another potentially non-backward compatible change regarding character encoding), you can use readHTMLTable(htmlParse("i

Re: [R] barchart() {Lattice} help.

2009-11-26 Thread Peng Cai
Thanks a lot Peter! One more help, is there a similar function abline() for barchart(). I'm trying to add a (light gray colored) horizontal lines, one for each y-value. Peng On Thu, Nov 26, 2009 at 5:59 PM, Peter Ehlers wrote: > Peng Cai wrote: > >> Hi Peter, >> >> I'm not sure but it seems "s

Re: [R] Concave hull

2009-11-26 Thread Kjetil Halvorsen
There is a package on CRAN implementing such an idea: alphahull, phull is other package, kjetil On Thu, Nov 26, 2009 at 6:11 PM, baptiste auguie wrote: > 2009/11/26 Ted Harding : >> Raising a rather general question here. >> >> This is a tantalising discussion, but the notion of "concave hull" >

Re: [R] barchart() {Lattice} help.

2009-11-26 Thread Peter Ehlers
Peng Cai wrote: Hi Peter, I'm not sure but it seems "scales" command works only with integer values. If the y-axis values are very small (such as -0.03, -0.02, -0.01, 0, 0.01,..., 0.08). My current plot has values 0, 0.05, and 0.10 only. But I need it to extend it to negative numbers and reduce

Re: [R] barchart() {Lattice} help.

2009-11-26 Thread Peng Cai
Hi Peter, I'm not sure but it seems "scales" command works only with integer values. If the y-axis values are very small (such as -0.03, -0.02, -0.01, 0, 0.01,..., 0.08). My current plot has values 0, 0.05, and 0.10 only. But I need it to extend it to negative numbers and reduce the scale width (

Re: [R] barchart() {Lattice} help.

2009-11-26 Thread Peng Cai
Thanks Peter and Dennis for your help! On Thu, Nov 26, 2009 at 3:50 PM, Dennis Murphy wrote: > Hi: > > In addition to Peter's suggestions, I would suggest that you get rid of the > row names as the > first column of your data frame, as it confuses barchart (and the > interpretation of the plot).

[R] How to suppress errors generated by readHTMLTable?

2009-11-26 Thread Peng Yu
library(XML) download.file('http://polya.umdnj.edu/polya_db2/gene.php?llid=109079&unigene=&submit=Submit','index.html') tables=readHTMLTable("index.html",error=function(...){}) tables readHTMLTable gives me the following errors. Could somebody let me know how to suppress them? Opening and endi

Re: [R] Concave hull

2009-11-26 Thread Barry Rowlingson
On Thu, Nov 26, 2009 at 9:45 PM, Ted Harding wrote: > So it is still an undefined solution. As is yours -- since you might > want to use different radii of spheres from different directions. I think the formal and rigorous definition is "a nice polygon that goes round my points". Barry __

Re: [R] Concave hull

2009-11-26 Thread Ted Harding
On 26-Nov-09 21:11:02, baptiste auguie wrote: > 2009/11/26 Ted Harding : >> Raising a rather general question here. >> >> This is a tantalising discussion, but the notion of "concave hull" >> strikes me as extremely ill-defined! >> >> I'd like to see statement of what it is (generically) supposed t

Re: [R] {ggplot2} Adding Mean to (grouped) Boxplot.

2009-11-26 Thread Peng Cai
Hi Dennis, Thanks for your reply. Answers are below: On Thu, Nov 26, 2009 at 4:14 PM, Dennis Murphy wrote: > Two questions: > (1) Do you want monthly means (averaged over groups), group means > (averaged over > months), overall average, other??? > I need mean (of nail) for each tre

[R] Barplot with confidence intervals

2009-11-26 Thread Jonhnny Weslley
I have a file in the following format: Scenario1 Scenario1CIL Scenario1CIU Scenario2 Scenario2CIL Scenario2CIU 60 57 62 45 48 50 110 101 111 51 50 52 120 117 122 64 62 66 192 190 194 79 75 79 where: First column = Scenario1 mean value Second column = Scenario1 Low Confidence Interval Third c

Re: [R] Concave hull

2009-11-26 Thread baptiste auguie
2009/11/26 Ted Harding : > Raising a rather general question here. > > This is a tantalising discussion, but the notion of "concave hull" > strikes me as extremely ill-defined! > > I'd like to see statement of what it is (generically) supposed to be. I'm curious too, but I can imagine the followin

Re: [R] How shall one present LRT test statistic in a scientific journal ?

2009-11-26 Thread Frank E Harrell Jr
David Winsemius wrote: On Nov 26, 2009, at 12:46 PM, Peter Dalgaard wrote: David Winsemius wrote: On Nov 26, 2009, at 12:14 PM, JVezilier wrote: Hello !! I'm recently having a debate with my PhD supervisor regarding how to write the result of a likelihood ratio test in an article I'm abo

[R] {ggplot2} Adding Mean to (grouped) Boxplot.

2009-11-26 Thread Peng Cai
Hi R Users, I am using following R code to plot a "grouped boxplot". I'm hoping if I can add MEAN to these boxplots. Data is copied below and attached as text file. install.packages("ggplot2") library(ggplot2) dta<-read.table("Sample.txt",header=T) attach(dta) p <- ggplot(dta, aes(factor(month),

Re: [R] Concave hull

2009-11-26 Thread Ted Harding
Raising a rather general question here. This is a tantalising discussion, but the notion of "concave hull" strikes me as extremely ill-defined! I'd like to see statement of what it is (generically) supposed to be. The examples discussed so far seem to rely on a person's inner feelings of what it

[R] r code to combine random forest and glm

2009-11-26 Thread Sharma, Dhruv
Hi, is it possible to have r code which runs random forests and takes the top 7 variables based on variable importance and builds a model of trying interactions terms for each variable. Then builds 7 models and keeps the one with the lowest aic. this would be like a new form of step wise regr

Re: [R] Moving quantile()?

2009-11-26 Thread Charles C. Berry
On Thu, 26 Nov 2009, Rob Steele wrote: Is there a faster way to get moving quantiles from a time series than to run quantile() at each step in the series? Yes. Run help.request() Since you have already done the first 4 items below (right?) you will answer 'y', but when you get to

Re: [R] barchart() {Lattice} help.

2009-11-26 Thread Peter Ehlers
Peng Cai wrote: Hi R Users, I'm trying to plot a stacked barplot. Here is data: Sample Col1 Col2 Col3 Row1 -2 4 -1 Row2 3 -2 4 Row3 3 5 -2 Row4 4 1 -1 I'm using following R code: library(lattice) dta<-read.table("data.txt", header=TRUE, row.names="Sample") barchart(data.matrix(dta),

Re: [R] different fits for geese and geeglm in geepack?

2009-11-26 Thread Søren Højsgaard
It looks strange. If you send me data for a small reproducible example then I'll look into the issue. Regards Søren Fra: r-help-boun...@r-project.org [r-help-boun...@r-project.org] På vegne af Achaz von Hardenberg [achaz.hardenb...@gmail.com] Sendt: 26.

Re: [R] Has anyone had success with RGTK2/rattle and windows 7 64-bit?

2009-11-26 Thread Graham Williams
I don't have a Windows 7 to test this on yet - works on Vista and XP. Did you install the GTK libraries (separately to R)? Regards, Graham 2009/11/21 Tetrick, Scott > I have been unable to get rattle to run in my new Windows7-64 bit > configuration. For wither Rgtk2 or rattle, I get an error:

[R] lattice --- different properties of lines corresponding to type=c("l", "a") respectively

2009-11-26 Thread Kjetil Halvorsen
I think the subject says it all. I want to make a simple lattice plot, using xyplot with the argument type=c("l","a"). The problem then is that in the resulting plot it is difficult/impossible to see which plot corresponds to the average and which to the individual profiles. I triedthings like

Re: [R] rattle(): unable to load shared library

2009-11-26 Thread Graham Williams
Sometimes I've seen this under MS/Windows and the solution has been to reinstall the gtk libraries independent of R and to make sure this is the one installed: http://downloads.sourceforge.net/gladewin32/gtk-2.12.9-win32-2.exe. It looks like glade was not in the gtk libraries you installed? Hope t

Re: [R] Feature request for as.Date() function

2009-11-26 Thread nabble . 30 . miller_2555
On Thu, Nov 26, 2009 at 12:08 AM, jim holtman - jholt...@gmail.com <+nabble+miller_2555+9dc9649aca.jholtman#gmail@spamgourmet.com> wrote: > An easy way is just to write your own function that will accept "NA", > convert it to NA and then call as.Date. > I have written such a function, which ha

Re: [R] Insert elements into a vector in a defined positions

2009-11-26 Thread Manuel Ramon
That's good . Your solution works for me. Than you Rolf. Rolf Turner-3 wrote: > > > On 26/11/2009, at 10:46 AM, Manuel Ramon wrote: > >> >> Dear R users, >> I have a vector of length n and I want to insert some elements (in >> my case >> the NA string) into a defined positions. For example

Re: [R] Export kde object as shapefile

2009-11-26 Thread T.D.Rudolph
http://old.nabble.com/file/p26533942/temp temp David Winsemius wrote: > > > On Nov 26, 2009, at 12:40 PM, T.D.Rudolph wrote: > >> >> I am trying to estimate home range size using the plug-in method >> with kernel >> density estimation in the kernel smoothing (ks) package. Unless >> ther

Re: [R] Export kde object as shapefile

2009-11-26 Thread David Winsemius
On Nov 26, 2009, at 12:40 PM, T.D.Rudolph wrote: I am trying to estimate home range size using the plug-in method with kernel density estimation in the kernel smoothing (ks) package. Unless there is another way I am not familiar with, in order to calculate spatial area under the space I

[R] barchart() {Lattice} help.

2009-11-26 Thread Peng Cai
Hi R Users, I'm trying to plot a stacked barplot. Here is data: Sample Col1 Col2 Col3 Row1 -2 4 -1 Row2 3 -2 4 Row3 3 5 -2 Row4 4 1 -1 I'm using following R code: library(lattice) dta<-read.table("data.txt", header=TRUE, row.names="Sample") barchart(data.matrix(dta), horizontal=FALSE,

Re: [R] How shall one present LRT test statistic in a scientific journal ?

2009-11-26 Thread David Winsemius
On Nov 26, 2009, at 12:46 PM, Peter Dalgaard wrote: David Winsemius wrote: On Nov 26, 2009, at 12:14 PM, JVezilier wrote: Hello !! I'm recently having a debate with my PhD supervisor regarding how to write the result of a likelihood ratio test in an article I'm about to submit. I anal

Re: [R] makefile for sweave

2009-11-26 Thread Duncan Murdoch
On 26/11/2009 9:14 AM, Wolfgang Raffelsberger wrote: Dear all, I can't get texi2dvi working right. Basically I'd like to convert a .lex to .pdf without having to fiddle with the issue Sweave.sty not being in my current directory (as this was sugested in other posts on this list). When I'm in

Re: [R] How shall one present LRT test statistic in a scientific journal ?

2009-11-26 Thread Peter Dalgaard
David Winsemius wrote: > > On Nov 26, 2009, at 12:14 PM, JVezilier wrote: > >> >> Hello !! >> >> I'm recently having a debate with my PhD supervisor regarding how to >> write >> the result of a likelihood ratio test in an article I'm about to submit. >> >> I analysed my data using "lme" mixed mod

[R] Export kde object as shapefile

2009-11-26 Thread T.D.Rudolph
I am trying to estimate home range size using the plug-in method with kernel density estimation in the kernel smoothing (ks) package. Unless there is another way I am not familiar with, in order to calculate spatial area under the space I need to convert my kde () object into a spatial object som

Re: [R] Help: Beanplots calculating wrong average

2009-11-26 Thread Michael Hopgood
Hi Tom, Thank you for the friendly and informative answer. It does explain a lot of things, actually. As with any good answer, it inevitably leads to other questions. In the first place, I need the arithmetic mean. It's what we base our calculations on... My code is currently this: Metall<-c

Re: [R] How shall one present LRT test statistic in a scientific journal ?

2009-11-26 Thread David Winsemius
On Nov 26, 2009, at 12:14 PM, JVezilier wrote: Hello !! I'm recently having a debate with my PhD supervisor regarding how to write the result of a likelihood ratio test in an article I'm about to submit. I analysed my data using "lme" mixed modelling. To get some p-values for my fixed

Re: [R] Grouped Boxplot

2009-11-26 Thread Gary
Thanks Petr! On Thu, Nov 26, 2009 at 12:31 AM, Petr PIKAL wrote: > Hi > > r-help-boun...@r-project.org napsal dne 24.11.2009 18:44:43: > > > Back in March Soren Vogel asked exactly the same thing: > > > > Here is the solution that was offered then. (He offered a dataset as > > requested in the P

[R] How shall one present LRT test statistic in a scientific journal ?

2009-11-26 Thread JVezilier
Hello !! I'm recently having a debate with my PhD supervisor regarding how to write the result of a likelihood ratio test in an article I'm about to submit. I analysed my data using "lme" mixed modelling. To get some p-values for my fixed effect I used model simplification and the typical outpu

Re: [R] Does nargin and nargout work with R functions?

2009-11-26 Thread baptiste auguie
Hi, I think you can use match.call() to retrieve the number of arguments passed to a function (see below), but I don't think nargout makes sense in R like it does in Matlab. foo <- function(...){ print(match.call()) nargin <- length(as.list(match.call())) -1 print(nargin) } foo(a=1, b=2)

[R] Save workspace with ff objects

2009-11-26 Thread Yue Sheng
Hi All, My script generates a mixture of normal and ff objects. I need to run the script for different parameter settings. Very often I would like to save the workspace for each parameter setting, so that I can get back to it later on. Is there an easy way to do this, instead of needing to save in

Re: [R] Testing for strength of fit using R

2009-11-26 Thread Peter Ehlers
Steve Murray wrote: Dear all, I am trying to validate a model by comparing simulated output values against observed values. I have produced a simple X-y scatter plot with a 1:1 line, so that the closer the points fall to this line, the better the 'fit' between the modelled data and the obser

Re: [R] Best way to preallocate numeric NA array?

2009-11-26 Thread Rob Steele
Douglas Bates wrote: > On Thu, Nov 26, 2009 at 10:03 AM, Rob Steele > wrote: >> These are the ways that occur to me. >> >> ## This produces a logical vector, which will get converted to a numeric >> ## vector the first time a number is assigned to it. That seems >> ## wasteful. >> x <- rep(NA, n)

[R] Does nargin and nargout work with R functions?

2009-11-26 Thread Jason Rupert
I am porting some MATLAB functions over to R and hopefully into a package, so I am curious if nargin and nargout work with R functions. Here is kind of an example of where I need to head in order to port "control-1.0.11" from Octave over to R. The Octave "control-1.0.11" package has the capabi

Re: [R] Best way to preallocate numeric NA array?

2009-11-26 Thread Rob Steele
Douglas Bates wrote: > On Thu, Nov 26, 2009 at 10:03 AM, Rob Steele > wrote: >> These are the ways that occur to me. >> >> ## This produces a logical vector, which will get converted to a numeric >> ## vector the first time a number is assigned to it. That seems >> ## wasteful. >> x <- rep(NA, n)

[R] different fits for geese and geeglm in geepack?

2009-11-26 Thread Achaz von Hardenberg
Dear all, I am trying to fit a GEE model on eagle productivity (number of hatched offspring per nest) using the geeglm function in the library geepack and I found an odd result. My understanding is that the function geese and geeglm should give the same fits, as actually geeglm uses geese to

Re: [R] Missing and number of days

2009-11-26 Thread R Help
For your first question, I believe that dat[dat==-9]=NA should do the trick For your second, are you dates in the Date() format? If not, try ?Date Once you get them in Date format, then you can simply subtract them d1 = as.Date('20090604',format="%Y%m%d") d2 = as.Date('20080604',format="%Y%m%

[R] mcp.area vs. kernel.area Output... ?

2009-11-26 Thread T.D.Rudolph
I am trying to estimate home range size using 2 different methods in the adehabitat package, but I am slightly confounded by the results. ## Attached is an R object file containing animal relocations with a field for "id", and "x" & "y" coordinates ## (in metres) load("temp") require(adehabitat)

Re: [R] Best way to preallocate numeric NA array?

2009-11-26 Thread Henrique Dallazuanna
Or best: rep(NA_real_, 10) On Thu, Nov 26, 2009 at 2:31 PM, Henrique Dallazuanna wrote: > You can try this also: > > rep(NA_integer_, 10) > > On Thu, Nov 26, 2009 at 2:03 PM, Rob Steele > wrote: >> These are the ways that occur to me. >> >> ## This produces a logical vector, which will get conv

Re: [R] Testing for strength of fit using R

2009-11-26 Thread David Winsemius
On Nov 26, 2009, at 9:48 AM, Steve Murray wrote: Dear all, I am trying to validate a model by comparing simulated output values against observed values. I have produced a simple X-y scatter plot with a 1:1 line, so that the closer the points fall to this line, the better the 'fit' betwe

Re: [R] Best way to preallocate numeric NA array?

2009-11-26 Thread Henrique Dallazuanna
You can try this also: rep(NA_integer_, 10) On Thu, Nov 26, 2009 at 2:03 PM, Rob Steele wrote: > These are the ways that occur to me. > > ## This produces a logical vector, which will get converted to a numeric > ## vector the first time a number is assigned to it.  That seems > ## wasteful. > x

[R] Missing and number of days

2009-11-26 Thread Val
Hi all, Assume that I have a data set (“xcv”) with several variables and some of the variables have a missing observation represented by -9 as shown below. I want to exclude these observations from the analysis ( as a NA). Is there a command that I can do it for the entire data set rather

Re: [R] Best way to preallocate numeric NA array?

2009-11-26 Thread Douglas Bates
On Thu, Nov 26, 2009 at 10:03 AM, Rob Steele wrote: > These are the ways that occur to me. > > ## This produces a logical vector, which will get converted to a numeric > ## vector the first time a number is assigned to it.  That seems > ## wasteful. > x <- rep(NA, n) > > ## This does the conversio

Re: [R] analyse tab delimited textfile microarray data(help)

2009-11-26 Thread Martin Morgan
Kumar -- ask on the Bioconductor mailing list http://bioconductor.org/docs/mailList.html see basic workflows at http://bioconductor.org/docs/workflows/oligoarrays/ You cannot analyze the data without understanding its source or questions you are asking, so determine where this data is comi

[R] Best way to preallocate numeric NA array?

2009-11-26 Thread Rob Steele
These are the ways that occur to me. ## This produces a logical vector, which will get converted to a numeric ## vector the first time a number is assigned to it. That seems ## wasteful. x <- rep(NA, n) ## This does the conversion ahead of time but it's still creating a ## logical vector first,

[R] Moving quantile()?

2009-11-26 Thread Rob Steele
Is there a faster way to get moving quantiles from a time series than to run quantile() at each step in the series? Thanks, Rob __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www

Re: [R] questions on the ff package

2009-11-26 Thread Hao Cen
Hi Jens, Thanks for your prompt and informative answers. ff is a fabulous package and your suggestions helped me solve my problems at hands. As I need to incrementally increase each of several large matrices (about 1000 rows *1 columns, 1000 matrices) by a row every day. I wonder how efficien

Re: [R] makefile for sweave

2009-11-26 Thread Sundar Dorai-Raj
Is texi2dvi in your PATH? What happens if you open a CMD window and type texi2dvi at the prompt? --sundar On Thu, Nov 26, 2009 at 6:14 AM, Wolfgang Raffelsberger wrote: > Dear all, > > I can't get texi2dvi working right. Basically I'd like to convert a .lex to > .pdf without having to fiddle wit

Re: [R] makefile for sweave

2009-11-26 Thread Wolfgang Raffelsberger
Dear all, I can't get texi2dvi working right. Basically I'd like to convert a .lex to .pdf without having to fiddle with the issue Sweave.sty not being in my current directory (as this was sugested in other posts on this list). When I'm in the R-Gui I can get the help via ?texi2dvi (So I conc

Re: [R] ow to have R automatically print traceback upon errors

2009-11-26 Thread Hao Cen
Hi Jim, Thanks for your suggestion. It is working now. The earlier message " recover called non-interactively; > frames dumped, use debugger() to view" happened within a R-IDE but doesn't occur in a R console. Jeff -Original Message- From: jim holtman [mailto:jholt...@gmail.com] Sent: M

Re: [R] order of panels in xyplots

2009-11-26 Thread Peter Ehlers
You're right, Titus. I misunderstood. It looks like index.cond has to be in 1:(number of panels being plotted for factor f). While this can arguably be covered by the phrase "valid indexing vector", I agree that this could be made more explicit. -Peter Ehlers Titus Malsburg wrote: Peter, thank

Re: [R] Kerning issues with CairoPDF

2009-11-26 Thread Karl Ove Hufthammer
Karl Ove Hufthammer wrote: > I'm using CairoPDF to generate PDF (because of its font embedding and > support for transparent colours). However, at least on my (Windows) > system, the text it outputs seems to have completely wrong kerning. > Here's an example: > > CairoPDF("test.pdf") > plot(rno

[R] Vista truncated Sys.getenv("PATH") when and only when running as administrator

2009-11-26 Thread Keith Ponting
This is rather strange and I suspect is a Windows issue rather than an R issue, but it does not seem to be mentioned on the lists so I am logging it in case it gives anyone else problems. Running Vista Business Version 6.0.6002 Service Pack 2 Build 6002, with the latest R 2.10.0 patched. A

  1   2   >