Re: [R] Show graph integrated to GUI

2005-12-29 Thread Prof Brian Ripley
This can be done with tkrplot package, whose sole example is of a slider and a graph in the same window. (AFAICS the slider function in the TeachingDemos package shows no more concepts than the tkdensity demo which ships with R.) On Thu, 29 Dec 2005, Chihiro Kuraya wrote: Hi, Thank you for

Re: [R] segmetation fault and abort trap

2005-12-29 Thread Prof Brian Ripley
These are C programming questions, and the messages are specific to your OS. Please use a more appropriate list: the posting guide does say `questions involving C' should go elsewhere. For the specific question here, I think you need to ask on a MacOS list. BTW, Eric's definition is a good

Re: [R] Open a new script from R command prompt

2005-12-29 Thread justin bem
Ronnie Babigumira [EMAIL PROTECTED] a écrit : Hi, (this is a minor irritation), is it possible for me to call R's editor from the R command prompt (I searched for script but that didn't yield anything). (The mouse-file-new-script route is a minor irritation )

Re: [R] Open a new script from R command prompt

2005-12-29 Thread justin bem
Try edit() or ?edit Ronnie Babigumira [EMAIL PROTECTED] a écrit : Hi, (this is a minor irritation), is it possible for me to call R's editor from the R command prompt (I searched for script but that didn't yield anything). (The mouse-file-new-script route is a minor irritation )

Re: [R] bVar slot of lmer objects and standard errors

2005-12-29 Thread Spencer Graves
Have you received a satisfactory reply to this post? I haven't seen one. Unfortunately, I can't give a definitive answer, but I can offer an intelligent guess. With luck, this might encourage someone who knows more than I do to reply. If not, I hope these comments help you clarify

Re: [R] Testing a linear hypothesis after maximum likelihood

2005-12-29 Thread Spencer Graves
Why can't you use a likelihood ratio? I would write two slightly different functions, the second of which would use the linear constraint to eliminate one of the coefficients. Then I'd refer 2*log(likelihood ratio) to chi-square(1). If I had some question about the chi-square

[R] calculating recursive sequences

2005-12-29 Thread Vaidotas Zemlys
Hi, I was trying to repeat the estimation of threshold GARCH models from the book Analysis of Financial Time Series by Ruey S. Tsay, and I was succesfull, but I had to use for loop, which is quite slow. The loop is necessary, since you need to calculate recursive sequence. Is there a faster way

[R] loop

2005-12-29 Thread gynmeerut
Dear All, I have to use loop over an array so I am using following procedure count-1 repeat{ count-count + 1 c(g[count],1:i[count]) -qw if(count5)break } as a result qw is [1] 0.9643836 1.000 2.000 3.000 4.000 5.000 [7] 6.000 7.000 8.000

Re: [R] Open a new script from R command prompt

2005-12-29 Thread Ronnie Babigumira
Hi Justin Thanks. Kort had pointed me in the same direction however, using this means I cannot see my output until I close the editor window. Bodgan proposed Alt-F-N and while this is not a command issued at the command prompt, it opens the editor without having to use the mouse so I will live

Re: [R] loop

2005-12-29 Thread Duncan Murdoch
On 12/29/2005 7:41 AM, gynmeerut wrote: Dear All, I have to use loop over an array so I am using following procedure count-1 repeat{ count-count + 1 c(g[count],1:i[count]) -qw if(count5)break } We can't reproduce this, as we don't have g or i. But the general advice in a case

[R] Segmetation Fault in R

2005-12-29 Thread Marcelo Damasceno
Hi all, I has a C code in Linux, it has 7 pointers and compile e run OK, but when I run in R happens Segmetation Fault. When I use calloc function, it returns NULL. What's wrong? I would like more information about R-alloc function? Thanks! -- Marcelo Damasceno de Melo Graduando em Ciência da

[R] Split graph labels in 2 levels

2005-12-29 Thread Andrej Kastrin
Dear R users, is there any simple low-level function that split single-line graph labels and produce something like (e.g. for x axis): 100300500 700... 200400 600 Cheers, Andrej __ R-help@stat.math.ethz.ch mailing list

Re: [R] loop

2005-12-29 Thread Gichangi, Anthony
Your loop will store results of count =6 because every time the loop executes the results are put in qw so you replace the previous results. On the other hand the results of count=1 is not extracted you basicaly start at 2. My advice is you initialize qw before the loop and stack the results one

[R] Repeating functions

2005-12-29 Thread Ronnie Babigumira
Hi, I have a number of spatial weight files and using Roger Bivand's spdep, I would like to 1. Convert them into neighbor lists using 2. Convert the neighbor lists into spatial weights For a given file, the syntax would be mygal_nb1 - read.gal(mygalfile1, override.id = TRUE) myweight1 -

Re: [R] Split graph labels in 2 levels

2005-12-29 Thread Marc Schwartz
On Thu, 2005-12-29 at 14:49 +0100, Andrej Kastrin wrote: Dear R users, is there any simple low-level function that split single-line graph labels and produce something like (e.g. for x axis): 100300500 700... 200400 600 Cheers, Andrej You could do something like

Re: [R] Importing Genstat files into R

2005-12-29 Thread justin bem
I dont know Genstat, but I if possible to export you file to text or other readable format in foriegn why not do it ? --- Graham Smith [EMAIL PROTECTED] a écrit : Does anyone know if there is a package or other method of reading Genstat files directly into R. Genstat isn't listed in the

Re: [R] bVar slot of lmer objects and standard errors

2005-12-29 Thread Doran, Harold
Uli: The graphic in the paper, sometimes called a catepillar plot, must be created with some programming as there is (as far as I know) not a built-in function for such plots. As for the contents of bVar you say the dimensions are 2,2,28 and there are two random effects and 28 schools. So, from

Re: [R] Importing Genstat files into R

2005-12-29 Thread Marc Schwartz
Another possibility might be a utility called DataLoad by David Baird. It is available from: http://www.american.edu/academic.depts/cas/econ/gaussres/utilitys/dataload.htm and appears to support the conversion of GenStat files to other formats (such as CSV), which you could then directly import

Re: [R] Importing Genstat files into R

2005-12-29 Thread justin bem
Sorry, Graham I didn't understand first. How cant I get Genstat ? Best wishes for 2006. --- Graham Smith [EMAIL PROTECTED] a écrit : Justin, Thanks for the reply. There is no problem getting files out of Genstat and into R, indeed Gensat exports to R as well as txt, xls and most

Re: [R] Split graph labels in 2 levels

2005-12-29 Thread P Ehlers
Marc Schwartz wrote: On Thu, 2005-12-29 at 14:49 +0100, Andrej Kastrin wrote: Dear R users, is there any simple low-level function that split single-line graph labels and produce something like (e.g. for x axis): 100300500 700... 200400 600 Cheers, Andrej You

Re: [R] Repeating functions

2005-12-29 Thread Kort, Eric
Ronnie Babigumira said... Hi, I have a number of spatial weight files and using Roger Bivand's spdep, I would like to 1. Convert them into neighbor lists using 2. Convert the neighbor lists into spatial weights For a given file, the syntax would be mygal_nb1 - read.gal(mygalfile1, override.id

Re: [R] Repeating functions

2005-12-29 Thread Sean Davis
On 12/29/05 11:01 AM, Kort, Eric [EMAIL PROTECTED] wrote: Ronnie Babigumira said... Hi, I have a number of spatial weight files and using Roger Bivand's spdep, I would like to 1. Convert them into neighbor lists using 2. Convert the neighbor lists into spatial weights For a given

[R] S4 classes: referencing slots with other slots

2005-12-29 Thread A.J. Rossini
For those who suggest other ways to do this, I ALREADY HAVE ANOTHER DESIGN SOLUTION, DESCRIBED AT THE END. That being said, I want to know if it's possible to reference a slot in an S4 class from another slot, i.e. I'd like to have the self.* semantics of Python so that I can reuse a slot. That

Re: [R] Segmetation Fault in R

2005-12-29 Thread Kort, Eric
Marcelo Damasceno wrote... Hi all, I has a C code in Linux, it has 7 pointers and compile e run OK, but when I run in R happens Segmetation Fault. When I use calloc function, it returns NULL. What's wrong? I would like more information about R-alloc function? Thanks! What is wrong is that

[R] Help with Kriging

2005-12-29 Thread Jennifer Lenz
R Experts, I'm looking for some help with the geoR package. I'm trying to krig some data without using a global neighborhood. I would like to set my moving neighborhood to a distance, say 100 meters, where I know my data is spatially correlated. I have tried the ksline function, but that

[R] search in matrix

2005-12-29 Thread Florent Bresson
I'm dealing with a matrix like : x y z [1,] 24 1 [2,] 61 2 ... [n,] 73 1 For each row I would like to know the header of the column which corresponds to the minimum value. In the case of my matrix, I would like to obtain the following vector : z y ... z Any

Re: [R] search in matrix

2005-12-29 Thread Marc Schwartz (via MN)
On Thu, 2005-12-29 at 17:20 +0100, Florent Bresson wrote: I'm dealing with a matrix like : x y z [1,] 24 1 [2,] 61 2 ... [n,] 73 1 For each row I would like to know the header of the column which corresponds to the minimum value. In the case of my

[R] Getting the same y-axis in a multivariate time series plot - plot(ts(...)); ylim does not do the trick

2005-12-29 Thread Søren Højsgaard
I try to obtain the same y-axis for a 2-dim time series with plot(ts(cbind(rnorm(10), rnorm(10,mean=4))),ylim=c(0,20)) but that does not work. Looking in the code for plot.ts, the ylim-argument seems to be taken care of, but not the way I expect. Can anyone help on this? Thanks Søren

Re: [R] Help with Kriging

2005-12-29 Thread Paulo Justiniano Ribeiro Jr
Jennifer The algorithms in geoR are (at least up to now) focused on kriging with global neighbourhood. You you would like to use moving neighbourhood based on distances my nest advice is to use a function from another package such as RandomFields, gstat, or any other geostats package Best

Re: [R] How to plot curves with more than 8 colors

2005-12-29 Thread Don MacQueen
I have found this little function useful when trying to choose colors: showcols - function (indx = 0:6) { for (ii in unique(indx)) { is - 100 * ii + 1:100 if (min(is) length(colors())) { cat(Maximum value of arg is, floor(length(colors())/100),

Re: [R] S4 classes: referencing slots with other slots

2005-12-29 Thread Gabor Grothendieck
Although this does not answer your question regarding how to do it in S4, it is simple to do with the proto package. This creates a fooWfcn proto object and then two child proto objects of it. Here foo inherits dat1 from fooWfcn but foo2 has its own dat1 which overrides the dat1 in its parent.

Re: [R] Getting the same y-axis in a multivariate time series plot - plot(ts(...)); ylim does not do the trick

2005-12-29 Thread Gabor Grothendieck
If you use plot.zoo it will do it. Just insert as.zoo(...) around the ts object. library(zoo) plot(as.zoo(ts(cbind(rnorm(10), rnorm(10,mean=4,ylim=c(0,20)) On 12/29/05, Søren Højsgaard [EMAIL PROTECTED] wrote: I try to obtain the same y-axis for a 2-dim time series with

[R] Forward reference in Sweave

2005-12-29 Thread Dieter Menne
Dear Rweavers, When generating reports with Sweave, I would like to quote some results in the abstract (Something like The treatment effect is 10 mbar, see page 100). Currently, I used verbatimwrite and friends to write to multiple files to be included, but I wonder is there is a more elegant

[R] update to posting guide: use 'sessionInfo()' instead of 'version'

2005-12-29 Thread Tony Plate
Some changes have been made to the posting guide, based on suggestions from various R-help contributors over the past year. The most significant change is the recommendation to use 'sessionInfo()' rather than 'version' when asking questions about unexpected behavior or bugs. This change was

[R] error propagation

2005-12-29 Thread Manuel Gutierrez
Are there any functions to do error propagation in R? I have done a search with little success. Any pointers to read about this topic are greatly welcomed. My specific problem is: I use a linear model (lm) to predict the biomass of an individual in a population, then I add up the biomass of all

[R] Glimmix and glm

2005-12-29 Thread Antonio_Paredes
Hello. Some months age an e-mail was posted in which a comparison between Glimmix and glm was discussed. I have not been able to find that e-mail on the R archive. Does anyone recall the date of the above e-mail? Thank you very much. *** Antonio Paredes

[R] addition of error terms

2005-12-29 Thread Manuel Gutierrez
Are there any functions to do error propagation in R? I have done a search with little success. Any pointers to read about this topic are greatly welcomed. My specific problem is: I use a linear model (lm) to predict the biomass of an individual in a population, then I add up the biomass of all

Re: [R] update to posting guide: use 'sessionInfo()' instead of 'version'

2005-12-29 Thread Seth Falcon
I think using sessionInfo() instead of version is a good idea. On 29 Dec 2005, [EMAIL PROTECTED] wrote: [Note that sessionInfo() currently does not report all the information that 'version' does (it omits at least Status and svn rev). R-core members are aware of this -- whether or not they

Re: [R] Testing a linear hypothesis after maximum likelihood

2005-12-29 Thread Spencer Graves
I think the question was appropriate for this list. If you want to do a Wald test, you might consider asking optim for hessian=TRUE. If the function that optim minimizes is (-log(likelihood)), then the optional component hessian of the output of optim should be the observed

Re: [R] Show graph integrated to GUI

2005-12-29 Thread Michael H. Prager
I'm seeking suggestions for a book on Tcl/Tk, as it can be used with R. The book I bought for the purpose (Effective Tcl/Tk Programming) seems quite unsuitable. For example, it has no description of anything like the slider control provided by tkscale(). I have located the Tcl and Tk

[R] function cv.glm in library 'boot'

2005-12-29 Thread Jun Ding
Hi, everyone, I have a question regarding function cv.glm in library 'boot'. Basically cv.glm can calculate the estimated K-fold cross-validation prediction error for generalized linear models. My question is this: if I am fitting a logit model, what kind of threshold will it use to calculate

[R] use of predict() with confidence/prediction bands

2005-12-29 Thread Alan Arnholt
To my understanding, a confidence interval typically covers a single valued parameter. In contrast, a confidence band covers an entire line with a band. In regression, it is quite common to construct confidence and prediction bands. I have found that many people are connecting individual

Re: [R] Testing a linear hypothesis after maximum likelihood

2005-12-29 Thread Spencer Graves
1. I try to avoid dogmatism and use whatever seems sufficiently accurate for the intended purposes and easiest to explain to the intended audience. 2. I'm not aware of any package that will compute Wald tests from optim(...)$hessian, etc., so I write my own code when I

Re: [R] Show graph integrated to GUI

2005-12-29 Thread Peter Dalgaard
Michael H. Prager [EMAIL PROTECTED] writes: I'm seeking suggestions for a book on Tcl/Tk, as it can be used with R. The book I bought for the purpose (Effective Tcl/Tk Programming) seems quite unsuitable. For example, it has no description of anything like the slider control provided by

[R] Problem Reading SPlus Dump Into R - Spaces Embedded in Data

2005-12-29 Thread allan miller
Hello, I'm trying to source() an SPlus 6.x file created using dump(..., oldStyle=T) into R (version 2.01) as using the following instructions: *If you have access to S-PLUS, it is usually more reliable to |dump| the object(s) in S-PLUS and |source| the dumpfile in R. For S-PLUS 5.x and 6.x

Re: [R] function cv.glm in library 'boot'

2005-12-29 Thread Prof Brian Ripley
Please do RTFM. It uses the cost function given by its 'cost' argument. Using your suggestion to choose the threshold is not honest (in the technical sense of the word). On Thu, 29 Dec 2005, Jun Ding wrote: Hi, everyone, I have a question regarding function cv.glm in library 'boot'.

Re: [R] loop

2005-12-29 Thread Peter Dalgaard
Duncan Murdoch [EMAIL PROTECTED] writes: On 12/29/2005 7:41 AM, gynmeerut wrote: Dear All, I have to use loop over an array so I am using following procedure count-1 repeat{ count-count + 1 c(g[count],1:i[count]) -qw if(count5)break } We can't reproduce this, as

[R] importing shapefiles into spatstat

2005-12-29 Thread Charlotte Reemts
Dear R users, I am using spatstat to analyze point patterns (tree locations). I would like to import the shapefile with the study area polygons (six total) into R and use it to create the window for the spatstat analysis. I do not simply want to use a rectangle because the study areas spread out

Re: [R] use of predict() with confidence/prediction bands

2005-12-29 Thread Peter Dalgaard
Alan Arnholt [EMAIL PROTECTED] writes: To my understanding, a confidence interval typically covers a single valued parameter. In contrast, a confidence band covers an entire line with a band. In regression, it is quite common to construct confidence and prediction bands. I have found that

Re: [R] How to plot curves with more than 8 colors

2005-12-29 Thread Earl F. Glynn
Don MacQueen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have found this little function useful when trying to choose colors: FWIW: To choose colors, this page http://research.stowers-institute.org/efg/R/Color/Chart/index.htm and PDF

[R] use of tapply?

2005-12-29 Thread tom wright
I'm still learning how to program with R and I was hoping someone could take the time to show me how I can rewrite this code? Many thanks Tom data.intersects-data.frame( x=c(0.230,0.411,0.477,0.241,0.552,0.230), y=c(0.119,0.515,0.261,0.431,0.304,0.389), angle=vector(length=6),

Re: [R] Problem Reading SPlus Dump Into R - Spaces Embedded in Data

2005-12-29 Thread Peter Dalgaard
allan miller [EMAIL PROTECTED] writes: Hello, I'm trying to source() an SPlus 6.x file created using dump(..., oldStyle=T) into R (version 2.01) as using the following instructions: *If you have access to S-PLUS, it is usually more reliable to |dump| the object(s) in S-PLUS and

Re: [R] Axis/Ticks/Scale

2005-12-29 Thread Martin Maechler
Marc == Marc Schwartz (via MN) [EMAIL PROTECTED] on Wed, 28 Dec 2005 15:46:37 -0600 writes: Marc On Wed, 2005-12-28 at 20:15 +, Marc [EMAIL PROTECTED] wrote: Dear All, Apologies for this simple question and thanks in advance for any help given.

Re: [R] trouble with S4 methods for group Summary

2005-12-29 Thread Martin Maechler
Yes, setting 'Summary' S4 group methods is a bit painful, because the S3 generic starts with In the 'Matrix' CRAN package, we do the following {thanks to hints by John Chambers IIRC}: Our AllGeneric.R file (https://svn.R-project.org/R-packages/trunk/Matrix/R/AllGeneric.R) ends with

Re: [R] importing shapefiles into spatstat

2005-12-29 Thread Don MacQueen
Go to CRAN, to the Packages page, do a simple search on the text shape. It will quickly lead you to maptools tools for reading and handling shapefiles From there, I guess you'll have to extract the polygons from the structure that is returned by the function(s) in the maptools package.

Re: [R] importing shapefiles into spatstat

2005-12-29 Thread Don MacQueen
And I see that I am probably already be out of date! There is a nice article in R News Volume 5/2, November 2005, available from CRAN. -Don At 1:41 PM -0800 12/29/05, Don MacQueen wrote: Go to CRAN, to the Packages page, do a simple search on the text shape. It will quickly lead you to

Re: [R] Axis/Ticks/Scale

2005-12-29 Thread Marc Schwartz (via MN)
On Thu, 2005-12-29 at 22:06 +0100, Martin Maechler wrote: Marc == Marc Schwartz (via MN) [EMAIL PROTECTED] on Wed, 28 Dec 2005 15:46:37 -0600 writes: Marc On Wed, 2005-12-28 at 20:15 +, Marc [EMAIL PROTECTED] wrote: Dear All, Apologies for this simple

[R] How to fit all points into plot?

2005-12-29 Thread Martin Lam
Hi, I have a problem when I want to add new points (or a new line) to the graph. Some points (or parts of the line) are not shown on the graph because they lie beyond the scale of the axis. Is there a way to overcome this so all points (or the entire line) are shown on the graph? Here's an

Re: [R] How to fit all points into plot?

2005-12-29 Thread Sean Davis
On 12/29/05 5:19 PM, Martin Lam [EMAIL PROTECTED] wrote: Hi, I have a problem when I want to add new points (or a new line) to the graph. Some points (or parts of the line) are not shown on the graph because they lie beyond the scale of the axis. Is there a way to overcome this so all

Re: [R] Which cluster function can be used to cluster a correlaiton matrix?

2005-12-29 Thread Earl F. Glynn
Martin Maechler [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The clue is to transform correlations to dissimilarities. . . . and then use hclust(), agnes(), pam(), [the latter two from package 'cluster'], ... with 'Dx' as dissimilarity Perhaps this TechNote may be of interest:

Re: [R] How to fit all points into plot?

2005-12-29 Thread Duncan Murdoch
On 12/29/2005 5:33 PM, Sean Davis wrote: On 12/29/05 5:19 PM, Martin Lam [EMAIL PROTECTED] wrote: Hi, I have a problem when I want to add new points (or a new line) to the graph. Some points (or parts of the line) are not shown on the graph because they lie beyond the scale of the axis.

Re: [R] use of tapply?

2005-12-29 Thread François Pinard
[tom wright] I'm still learning how to program with R and I was hoping someone could take the time to show me how I can rewrite this code? I'll try! :-) data.intersects-data.frame( x=c(0.230,0.411,0.477,0.241,0.552,0.230), y=c(0.119,0.515,0.261,0.431,0.304,0.389),

Re: [R] importing shapefiles into spatstat

2005-12-29 Thread Mulholland, Tom
You might also consider looking at the R-sig-Geo list which has lots of discussion about issues relating to file formats and the best ways to get data in and out the various packages that are used. Tom -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of

[R] ESS and Emacs

2005-12-29 Thread Mark Leeds
I have been using the document written by John Fox titled Sn Introduction to ESS + XEmacs for Windows Users of R. It's a very nice document and I went through it carefully but I got an error when I finished it and launched XEmacs. The error is cannot open load file : ess-site. So, I did more

[R] lme X lmer results

2005-12-29 Thread John Maindonald
Surely there is a correct denominator degrees of freedom if the design is balanced, as Ronaldo's design seems to be. Assuming that he has specified the design correctly to lme() and that lme() is getting the df right, the difference is between 2 df and 878 df. If the t-statistic for the second

Re: [R] ESS and Emacs

2005-12-29 Thread paul sorenson
I tried it with XEmacs on Win XP and I had to install ESS separately. Mark Leeds wrote: I have been using the document written by John Fox titled Sn Introduction to ESS + XEmacs for Windows Users of R. It's a very nice document and I went through it carefully but I got an error when I

[R] How to combine two lists?

2005-12-29 Thread Xiao Shi
Hi every, I have two lists,one has 10 elements,another has 20 elements.And each element in these two lists has a unique name.I want to know how to combine these two lists, so i can index the elements by their names. Thanks. Jiantao Shi [[alternative HTML version deleted]]

Re: [R] How to combine two lists?

2005-12-29 Thread Gabor Grothendieck
c(list(a=1,b=2), list(c=3,d=4)) or append(list(a=1,b=2), list(c=3,d=4)) On 12/30/05, Xiao Shi [EMAIL PROTECTED] wrote: Hi every, I have two lists,one has 10 elements,another has 20 elements.And each element in these two lists has a unique name.I want to know how to combine these two

Re: [R] Problem Reading SPlus Dump Into R - Spaces Embedded in Data

2005-12-29 Thread allan miller
Peter Dalgaard wrote: allan miller [EMAIL PROTECTED] writes: Hello, I'm trying to source() an SPlus 6.x file created using dump(..., oldStyle=T) into R (version 2.01) as using the following instructions: *If you have access to S-PLUS, it is usually more reliable to |dump| the