[R] namespace? environment? how to manage functions?

2009-06-19 Thread whizvast
Hi, useRs- I have been building a set of functions over time and now my R_GlobalEnv becomes too crowded. I would like to put all my functions under the same namespace/environment. Ideally, I would like to call them using env::func as in C++. The following code almost do the jobs I want -

[R] cut with floating point, a bug?

2009-06-19 Thread Shawn Rutledge
With floating point numbers I'm seeing 'cut' putting values in the wrong bands. An example below places 0.3 in (0.3,0.6] i.e. 0.3 0.3. x = 1:5*.1 x [1] 0.1 0.2 0.3 0.4 0.5 cut(x, br=c(0,.3,.6)) [1] (0,0.3] (0,0.3] (0.3,0.6] (0.3,0.6] (0.3,0.6] Levels: (0,0.3] (0.3,0.6] I'm sure this is

Re: [R] Replace zeroes in vector with nearest non-zero value

2009-06-19 Thread Murali.MENON
Jim, Gabor, William, Thanks very much. Works a treat. Cheers, Murali -Original Message- From: William Dunlap [mailto:wdun...@tibco.com] Sent: 18 June 2009 18:27 To: MENON Murali; r-help@r-project.org Subject: RE: [R] Replace zeroes in vector with nearest non-zero value approx() almost

Re: [R] cut with floating point, a bug?

2009-06-19 Thread Duncan Murdoch
Shawn Rutledge wrote: With floating point numbers I'm seeing 'cut' putting values in the wrong bands. An example below places 0.3 in (0.3,0.6] i.e. 0.3 0.3. x = 1:5*.1 x [1] 0.1 0.2 0.3 0.4 0.5 cut(x, br=c(0,.3,.6)) [1] (0,0.3] (0,0.3] (0.3,0.6] (0.3,0.6] (0.3,0.6]

[R] Drawing dendrogram

2009-06-19 Thread Seyit Ali Kayis
Dear all, I would like to draw a dendrogram and mark some parts/branches (by using segments) including their labels. If I draw it without specifying the length of x axix, I am able to do that (as in My dendrogram 1 of the following codes). However, if I want to specify the x axix, I am not

[R] (FULL) Need help to optimize a piece of code involving zoo objects

2009-06-19 Thread Sergey Goriatchev
(Sorry, sent the message before I finished it) Hello, everyone I have a long script that uses zoo objects. In this script I used simple moving averages and these I can very efficiently calculate with filter() functions. Now, I have to use special exponential moving averages, and the only way I

[R] Need help to optimize a piece of code involving zoo objects

2009-06-19 Thread Sergey Goriatchev
Hello, everyone I have a long script that uses zoo objects. In this script I used simple moving averages and these I can very efficiently calculate with filter() functions. Now, I have to use special exponential moving averages, and the only way I could write the code was with a for-loop, which

Re: [R] overshoot of formula line in summary output of Sweave

2009-06-19 Thread Ben Bolker
Ken Knoblauch wrote: Ben Bolker bolker at ufl.edu writes: In the Sweave output for summary for several types of model objects and also for the comparison of models with anova, I find that that the display of the call(s) or formula does not obey the width option, even with

Re: [R] Drawing dendrogram

2009-06-19 Thread Matthias Kohl
maybe ?dendrapply is helpful - in particular see the example section. There is also some code at http://www.stamats.de/Heatmap.R (with commentary in German) hth, Matthias Seyit Ali Kayis schrieb: Dear all, I would like to draw a dendrogram and mark some parts/branches (by using segments)

[R] Error the condition has length 1 and only the first element will be used

2009-06-19 Thread Casey Quinn
Ahoy. I'm trying to run a function for each country in a multinational dataset. Keeping it simple, an example is for(j in 11:14) { if(data$country_str == j) { mu - mean(data$ecdfs1) } else { mu - 0 } } The number of countries is greater and the functions are more complex, but this fails

[R] re ad.table() and setwd() in unix batch mode

2009-06-19 Thread tbigdeli
I continually receive the error Error in file(file, r) : cannot open the connection, when running in batch mode, but not when inputing directly into R. Any ideas? Thanks! TB -- View this message in context:

[R] function rollapply

2009-06-19 Thread Andriy Fetsun
Hi, I faced with problem when start using function - rollapply(returns, 3 , mean) Error in UseMethod(rollapply) : No suitable Method for rollaply How can I fix the problem? Thank you for help. -- Best regards, Andy Fetsun [[alternative HTML version deleted]]

[R] Manipulate solution of simplex

2009-06-19 Thread Ana Ramos
Hi, I need some help. I'm doing a project that demands me to obtain several simplex solutions and I would like to can keep the solution in a vector or something to be able to use it after I get it. The comand simplex() prints the solution but how can I keep it? Another alternative would be to

Re: [R] off topic but need your pointers about statistics

2009-06-19 Thread Gerard M. Keogh
Agresti's first book: Categorical Data Analysis, Appendix B. If you're interested in probability and random processes look at he notes at the end of each chapter in Real Ananlysis and Probability by R. M Dudley.

Re: [R] overshoot of formula line in summary output of Sweave

2009-06-19 Thread Ken Knoblauch
Ben Bolker bolker at ufl.edu writes: Here is a toy example that illustrates the overshoot of the formula \documentclass[12pt]{article} \usepackage{geometry} \geometry{left=2in,right=2in} \begin{document} keep.source=TRUE= op - options(width = 65, digits = 3) ddataframe -

Re: [R] (FULL) Need help to optimize a piece of code involving zoo objects

2009-06-19 Thread Gabor Grothendieck
Check out method = recursive in filter(). On Fri, Jun 19, 2009 at 3:36 AM, Sergey Goriatchevserg...@gmail.com wrote: (Sorry, sent the message before I finished it) Hello, everyone I have a long script that uses zoo objects. In this script I used simple moving averages and these I can very

Re: [R] function rollapply

2009-06-19 Thread Gabor Grothendieck
You must supply an object whose class is such that a rollapply method exists. Try this to see what classes are supported: methods(rollapply) On Fri, Jun 19, 2009 at 4:07 AM, Andriy Fetsunfet...@googlemail.com wrote:  Hi, I faced with problem when start using function - rollapply(returns, 3 ,

Re: [R] Installation reg:-

2009-06-19 Thread Uwe Ligges
harish babu dharmalingan wrote: Hi, There is a problem installing R. I am using windows vista home basic. After installation and when i'm trying to access it, it shows Fatal error: cannot mkdir R_Tempdir and after pressing ok, it closes. Can anyone help me out? So R cannot create

Re: [R] predict.glm and predict.gam output

2009-06-19 Thread Gavin Simpson
On Thu, 2009-06-18 at 13:23 -0600, Anke Konrad wrote: Hi all, I am currently trying to compare different plant occurrence prediction maps generated in R and exported into GRASS. One of these maps was generated from a glm fitted to some data, and subsequently applying this glm model to a

Re: [R] off topic but need your pointers about statistics

2009-06-19 Thread Paul Artes
Publication of Exploratory Data Analysis by John Tukey. Strange Tukey's name has not been mentioned so far. You should consider re-posting your most interesting question with a less apologetic title - perhaps you will get a larger range of replies. Best wishes Paul losemind wrote: Thanks

[R] Tcl/TK

2009-06-19 Thread Abelian
Dear All Due to develope some usful programe, we choose the R-GUI be our program interface. By the way, i study about userguide of tcl/tk in help, but i think that the help article in R is not clear. For example, when i confuse about some usages and i want to know how to use, i will search on

Re: [R] predict.glm and predict.gam output

2009-06-19 Thread sw283
Anke, mgcv:predict.gam certainly didn't produce `something like a negative log-likelihood of occurrence', but is it possible that one of your maps is on the probability scale and the other on the linear predictor scale? If you used predict.glm(model1,type=response), but

Re: [R] How to change ONLY the first character of each variable name

2009-06-19 Thread Wacek Kusnierczyk
Henrique Dallazuanna wrote: Try this: gsub(^M{1}, MOLE, names(data)) {1} is inessential here. vQ On Thu, Jun 18, 2009 at 8:24 PM, Mark Na mtb...@gmail.com wrote: Dear R-helpers, I would like to adapt the following code names(data)-sub(M,MOLE,names(data)) which

[R] Post-Hoc Test for Kruskal-Wallis Rank Sum Test

2009-06-19 Thread Rodrigo Aluizio
Hi list, I would like to know if there is a way in R to execute a post-hoc test (factor levels comparison, like Tukey for ANOVA) of a non-parametric analysis of variance (kruskal.test() function object). I was looking for something like the Dunn Test. I’ve searched the internet but nothing seemed

Re: [R] ifelse(is.na), with function inside

2009-06-19 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 17.06.2009 14:59:35: This is my function: zywnoscCalosc - function( zywnosc, sklepik, sklslodycze) { b=as.vector(sklslodycze) fun=function(a,b){ a=2+b } zywnosc=ifelse(is.na(sklepik),NA,fun(a,b))#Here I have a problem ! } I

Re: [R] Can I estimate strength and correlation of Random Forest in R package randomForest?

2009-06-19 Thread Uwe Ligges
Li GUO wrote: Hello! I want to estimate strength and correlation of RandomForest, but in package randomForest there is not an interface to get it. I think I must to change the source code. Is there any advise? If you define both strength of RandomForest and correlation of RandomForest, we

Re: [R] RWeka evaluate classifier on test set

2009-06-19 Thread Uwe Ligges
Huihua Lu wrote: Hi everyone, I have a test set with more than 1000 cases, when I use evaluate_Weka_classifier(RWeka)to evaluate my classifier on this test set, the output shows me the result of only 83 cases. I do have missing values in predictors, so I tried na.acton=na.pass, but it

Re: [R] Tcl/TK

2009-06-19 Thread Gabor Grothendieck
Look at the examples here: http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/ On Fri, Jun 19, 2009 at 5:21 AM, Abelianabelian1...@gmail.com wrote: Dear All Due to develope some usful programe, we choose the R-GUI be our program interface. By the way, i study about userguide of tcl/tk in

[R] JGR installation errors

2009-06-19 Thread mauede
I remember JGR installation on SuSE 10.3 as a nightmare that eventually I overcame with JGR designers' help. I have installed SuSE 11.1, latest R version and am trying to install JGR again. It is still a nightmare. I have followed the guidelines on

Re: [R] tiff() woes

2009-06-19 Thread Uwe Ligges
Original Message Subject: Re: [R] tiff() woes Date: Thu, 18 Jun 2009 12:38:39 +0100 From: Federico Calboli f.calb...@imperial.ac.uk To: Allan Engelhardt all...@cybaea.com, r-help@r-project.org CC: James Grellier j.grell...@imperial.ac.uk References:

Re: [R] biOps load failed after being used for one week

2009-06-19 Thread Uwe Ligges
Michelle2009 wrote: With help from my colleague, I found the problem. After I put another library dll, zlib1.dll, at the folder, biOps is working again now. Though it's still amazing to me why biOps worked for about one week before I had zlib1.dll. Have you had a libtiff in your path? Its

[R] Odp: Error the condition has length 1 and only the first element will be used

2009-06-19 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 19.06.2009 09:26:57: Ahoy. I'm trying to run a function for each country in a multinational dataset. Keeping it simple, an example is for(j in 11:14) { if(data$country_str == j) { mu - mean(data$ecdfs1) } else { mu - 0 } } First few

[R] FW: Can I estimate strength and correlation of Random Forest in R package randomForest?

2009-06-19 Thread Liaw, Andy
Didn't realize the message was cc'ed to R-help. Here's my reply... From: Liaw, Andy Sent: Thursday, June 18, 2009 11:35 AM To: 'Li GUO' Subject: RE: Can I estimate strength and correlation of Random Forest in R package randomForest? The strength and

Re: [R] Testing if all elements are equal in a vector/matrix

2009-06-19 Thread Petr PIKAL
Hi utkarshsinghal utkarsh.sing...@global-analytics.com napsal dne 17.06.2009 15:29:34: I will wait for the next version-2.9.1 and presently using Petr's suggestion, i.e., (x[1]*length(x))==sum(x) which significantly reduced the run time. The problem is now there might be only small

Re: [R] Post-Hoc Test for Kruskal-Wallis Rank Sum Test

2009-06-19 Thread David Winsemius
It's a very simple search: Here are the steps: Go to one of the r-search sites. I have this URL on my Google Toolbar: http://search.r-project.org/nmz.html Type in: post hoc kruskal And set the search universe to include r-help from 2002-2007. Search! Review results. (Had I a better

Re: [R] where/what is i? for loop (black?) magic

2009-06-19 Thread Wacek Kusnierczyk
Duncan Murdoch wrote: Liaw, Andy wrote: A colleague and I were trying to understand all the possible things one can do with for loops in R, and found some surprises. I think we've done sufficient detective work to have a good guess as to what's going on underneath, but it would be nice to get

[R] meaning of glm(value ~ .,

2009-06-19 Thread onyourmark
I am trying to build a glm model with many inputs. I saw the following code in Rattle crs$glm - glm(value ~ ., data=crs$dataset[,c(1:59,922)], family=binomial(link=logit)) I am not clear about what value ~ . means and also, I see data=crs$dataset[,c(1:59,922)] I have read that the data

Re: [R] off topic but need your pointers about statistics

2009-06-19 Thread David Winsemius
On Jun 19, 2009, at 6:36 AM, Paul Artes wrote: [...] You should consider re-posting your most interesting question with a less apologetic title - perhaps you will get a larger range of replies. You might consider (re-?) reading the Posting Guide. The OP was correct in thinking this is

Re: [R] Testing if all elements are equal in a vector/matrix

2009-06-19 Thread jim holtman
I have wondered about this way of testing for equality: x - c(1,0,3,0) x[1] * length(x) == sum(x) [1] TRUE x - rep(1,4) x[1] * length(x) == sum(x) [1] TRUE This would seem to indicate that both vectors contain the same values, but not necessarily true. On Fri, Jun 19, 2009 at 8:18 AM, Petr

Re: [R] Manipulate solution of simplex

2009-06-19 Thread David Winsemius
On Jun 19, 2009, at 4:51 AM, Ana Ramos wrote: Hi, I need some help. I'm doing a project that demands me to obtain several simplex solutions and I would like to can keep the solution in a vector or something to be able to use it after I get it. The comand simplex() prints the solution but

[R] batch submit

2009-06-19 Thread Wensui Liu
with emacs + ess, I can do batch submit sas code using m-x submit sas. wondering if I can do so for r or not. -- == WenSui Liu Blog : statcompute.spaces.live.com Tough Times Never Last. But Tough People Do. - Robert Schuller

Re: [R] meaning of glm(value ~ .,

2009-06-19 Thread Gavin Simpson
On Fri, 2009-06-19 at 06:00 -0700, onyourmark wrote: I am trying to build a glm model with many inputs. I saw the following code in Rattle crs$glm - glm(value ~ ., data=crs$dataset[,c(1:59,922)], family=binomial(link=logit)) I am not clear about what value ~ . From ?formula There

Re: [R] namespace? environment? how to manage functions?

2009-06-19 Thread jim holtman
Here is the way that I do it instead of creating a package of my functions. I 'source' the file into an environment and then attach the environment to keep the global from being clustered: # read my functions into a environment .my.env - new.env() sys.source('c:/perf/bin/perfmon.r',

Re: [R] Manipulate solution of simplex

2009-06-19 Thread Jorge Ivan Velez
Dear Ana, Are you optimizing a linear function? If so, the simplex() function in the boot package (see [1]) is what you are using. Using the example at ?simplex (after loading the boot package): res - simplex(a = enj, A1 = fat, b1 = 13800, A2 = rbind(vitx, vity, vitz), b2 = c(600, 300,

Re: [R] Need help to optimize a piece of code involving zoo objects

2009-06-19 Thread jim holtman
check out 'filter' to see if it does what you want with the 'recursive' option. On Fri, Jun 19, 2009 at 3:33 AM, Sergey Goriatchev serg...@gmail.comwrote: Hello, everyone I have a long script that uses zoo objects. In this script I used simple moving averages and these I can very efficiently

Re: [R] meaning of glm(value ~ .,

2009-06-19 Thread David Winsemius
On Jun 19, 2009, at 9:00 AM, onyourmark wrote: I am trying to build a glm model with many inputs. I saw the following code in Rattle crs$glm - glm(value ~ ., data=crs$dataset[,c(1:59,922)], family=binomial(link=logit)) I am not clear about what value ~ . Generally the . in a formula

Re: [R] overshoot of formula line in summary output of Sweave

2009-06-19 Thread Ben Bolker
Ken Knoblauch wrote: Ben Bolker bolker at ufl.edu writes: Here is a toy example that illustrates the overshoot of the formula \documentclass[12pt]{article} \usepackage{geometry} \geometry{left=2in,right=2in} \begin{document} keep.source=TRUE= op - options(width = 65,

[R] How to save multiple images??

2009-06-19 Thread Alex Roy
Dear all, How can I save multiple images in my working directory?? I used save.image() but could not succeeded. Thanks in advance Alex [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] off topic but need your pointers about statistics

2009-06-19 Thread Paul Artes
I re-read the posting guide every night before going to bed. The usefulness of this list stems partly from it being a broad church with lots of experts. And my concern wasn't with the off-topic label so much as with the slightly inspecific title (although I should have made this clear - mea

Re: [R] JGR installation errors

2009-06-19 Thread Simon Urbanek
MAura, On Jun 19, 2009, at 7:36 , mau...@alice.it mau...@alice.it wrote: I remember JGR installation on SuSE 10.3 as a nightmare that eventually I overcame with JGR designers' help. I have installed SuSE 11.1, latest R version and am trying to install JGR again. It is still a nightmare.

Re: [R] How to save multiple images??

2009-06-19 Thread David Winsemius
Give them different names. ?save.image On Jun 19, 2009, at 9:34 AM, Alex Roy wrote: Dear all, How can I save multiple images in my working directory?? I used save.image() but could not succeeded. Thanks in advance Alex David Winsemius, MD Heritage Laboratories West

Re: [R] Testing if all elements are equal in a vector/matrix

2009-06-19 Thread utkarshsinghal
How could I miss that... I'm feeling low :( jim holtman wrote: I have wondered about this way of testing for equality: x - c(1,0,3,0) x[1] * length(x) == sum(x) [1] TRUE x - rep(1,4) x[1] * length(x) == sum(x) [1] TRUE This would seem to indicate that both vectors contain the same

Re: [R] Post-Hoc Test for Kruskal-Wallis Rank Sum Test

2009-06-19 Thread Rodrigo Aluizio
Thank you so much Gilles, that is exactly what I’m looking for. Rodrigo. De: LE PAPE Gilles [mailto:lepape.gil...@neuf.fr] Enviada em: sexta-feira, 19 de junho de 2009 10:14 Para: r.alui...@gmail.com Assunto: Post-hoc test Hi Rodrigo, you can use the nparcomp function,

[R] result of rqss

2009-06-19 Thread Michael Hecht
Hello, i have the following data: x=c(0,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.11,0.12,0.13,0.14,0.15,0.16,0.17,0.18,0.19,0.2,0.21,0.22,0.23,0.25,0.26,0.27,0.46,0.47,0.48,0.49)

[R] Alternate ways of finding number of occurrence of an element in a vector.

2009-06-19 Thread Praveen Surendran
Hi, I have a vector v and would like to find the number of occurrence of element x in the same. Is there a way other than, sum(as.integer(v==x)) or length(which(x==v)) to do the this. I have a huge file to process and do this. Both the above described methods are pretty slow

[R] R: JGR installation errors

2009-06-19 Thread mauede
It works now. Thank you. I even succeeded in starting R by clicking on JGR icon that I placed on my desktop. I wonder whether some Java or system flag that unlocks Mutex (I ignore what it is) has to be set somewhere ... maybe fron the .bashrc file. The first time I happened to get JGR running

Re: [R] meaning of glm(value ~ .,

2009-06-19 Thread Gavin Simpson
On Fri, 2009-06-19 at 09:24 -0400, David Winsemius wrote: On Jun 19, 2009, at 9:00 AM, onyourmark wrote: snip / means and also, I see data=crs$dataset[,c(1:59,922)] I have read that the data argument is optional here an optional data frame, list or environment (or object coercible by

Re: [R] Need help to optimize a piece of code involving zoo objects

2009-06-19 Thread Sergey Goriatchev
Dear Gabor and Jim I am not looking at the recursive method for filter() Recursive filter with lag 1 is specified in help files as: y[i] = x[i] + f[1]*y[i-1] My function looks like this: EMA[i] = K*(C[i] - EMA[i-1]) + EMA[i-1], that is: y[i]=EMA[i] y[i-1]=EMA[i-1] x[i]=C[i] So, I modified my

Re: [R] result of rqss

2009-06-19 Thread David Winsemius
If you do a search on the quantreg documentation for piecewise, the first hit on the pdf has code on the same page. Running that rqss fit call unaltered with your data produced a straight line (because the data only has a domain of 0-0.5) but lowering lambda lets the piecewise character

Re: [R] R: JGR installation errors

2009-06-19 Thread Simon Urbanek
On Jun 19, 2009, at 10:08 , mau...@alice.it mau...@alice.it wrote: It works now. Thank you. I even succeeded in starting R by clicking on JGR icon that I placed on my desktop. I wonder whether some Java or system flag that unlocks Mutex (I ignore what it is) has to be set somewhere ...

Re: [R] meaning of glm(value ~ .,

2009-06-19 Thread David Winsemius
All of your points are accepted, and I also give you credit for reading the formula page better than I. On Jun 19, 2009, at 10:08 AM, Gavin Simpson wrote: On Fri, 2009-06-19 at 09:24 -0400, David Winsemius wrote: On Jun 19, 2009, at 9:00 AM, onyourmark wrote: snip / means and also, I see

[R] [Repost][Off Topic] Pointers needed for breakthrough in statistics

2009-06-19 Thread Michael
Hi all, Sorry for the reposting... I was advised to repost this question with more specific title. I apologize for this off-topic question but I really need your help -- I know there are lots of experts here. As a lover and student of statistics, I am thinking of building a tree of various

Re: [R] meaning of glm(value ~ .,

2009-06-19 Thread onyourmark
Thank you for the posts. I think that from these posts I can say that the '.' will mean that it will draw on all the variables in data other than the one listed as the dependent variable in the formula ('value' in this case). And it will also look in the global workspace (although I am not

Re: [R] [Repost][Off Topic] Pointers needed for breakthrough in statistics

2009-06-19 Thread Ravi Varadhan
Hi, There is a three-volume series, published by Springer, called Breakthroughs in Statistics, edited by Kotz and Johnson. Volume 1 is on Foundations and Basic Theory, Volume 2 is on Methodology, and Vol 3 has miscellaneous articles. Ravi.

[R] Splitting Data by Row

2009-06-19 Thread Ross Culloch
Hello fellow R users! I wonder if someone can help with what i think should be a simple question but i can't seem to find the answer or work it out. My data set is as such: Day Time ID Behaviour 1 9 A1 2 1 10A2 3 .. .... .. 4 10 A1 10 4

Re: [R] Splitting Data by Row

2009-06-19 Thread Uwe Ligges
Ross Culloch wrote: Hello fellow R users! I wonder if someone can help with what i think should be a simple question but i can't seem to find the answer or work it out. My data set is as such: Day Time ID Behaviour 1 9 A1 2 1 10A2 3 .. .... .. 4

Re: [R] [Repost][Off Topic] Pointers needed for breakthrough in statistics

2009-06-19 Thread Juliet Hannah
You may find the following two books useful: Lehmann, Reminiscences of a Statistician (Springer). David Salsburg, The lady testing tea. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] re ad.table() and setwd() in unix batch mode

2009-06-19 Thread Uwe Ligges
tbigdeli wrote: I continually receive the error Error in file(file, r) : cannot open the connection, when running in batch mode, but not when inputing directly into R. Have you given the full path name? If not, do you start both R instances from the same working directory? Otherwise, do

Re: [R] [Repost][Off Topic] Pointers needed for breakthrough in statistics

2009-06-19 Thread Tirthankar Chakravarty
You might find the articles of Stephen Stigler interesting: http://www.stat.uchicago.edu/faculty/stigler/pubs.html T On Fri, Jun 19, 2009 at 4:00 PM, Juliet Hannahjuliet.han...@gmail.com wrote: You may find the following two books useful: Lehmann, Reminiscences of a Statistician (Springer).

Re: [R] Splitting Data by Row

2009-06-19 Thread Ross Culloch
OF COURSE Well, i waited until 16:00 before making the first obvious mistake of the day! Despite 4 hours working on the data I just didn't think! You got the question, i just missed the obvious! Thanks very much, sorry for not noticing that and trying to make life even more

[R] using garchFit() to fit ARMA+GARCH model with exogeneous variables

2009-06-19 Thread Zhang, Yuhan
Hello - Here's what I'm trying to do. I want to fit a time series y with ARMA(1,1) + GARCH(1,1), there are also an exogeneous variable x which I wish to include, so the whole equation looks like: y_t - \phi y_{t-1} = \sigma_t \epsilon_t + \theta \sigma_{t-1} \epsilon_{t-1} + c x_t where

[R] Adding site id to xyplot

2009-06-19 Thread SEUNG CHEON HONG
Dear R Lists, Can anyone help me add site IDs (site: 1~50) directly to my xyplot. I have 50 sites and collected observations from the sites at 13 different time points. I want to look at the change of my observations in each site. I was able to make a graph using xyplot, however, I can't find

Re: [R] Random number datasets help

2009-06-19 Thread Alexandre Lockhart
My other question involved formatting my output. Normally, my text file has 8 columns, each column with 500 values before the next 8 below are generated, and so on until 28 are reached. I have examined formatting issues with each function (cbind, sink, apply, trying matrix (only one set is

Re: [R] Cannot install a package - with a funny error message

2009-06-19 Thread Uwe Ligges
What's funny with the error message? I think it is not funny that you have not provided relevant information as requestes in the posting guide for R-help, e.g. on: OS, R version, CRAN mirror you try to use, internet connection via proxy or not, ... Hence we cannot help. Uwe Ligges Alon

Re: [R] Reading from Google Docs

2009-06-19 Thread Farrel Buchinsky
After issuing tar xvfz RgoogleDocs_0.2.2-src.tar.gzI am getting an error message 'tar' is not recongnized as an internal or external command, operable program or batch file. Should I use my 7-zip to open up the archive? Where should I be doing this? For instance can I do it all in my download

Re: [R] Alternate ways of finding number of occurrence of an element in a vector.

2009-06-19 Thread Allan Engelhardt
When trying out a couple of different approaches to this problem I get rather different answers between runs. Anybody know why? library(rbenchmark) v-rep(1:1000,1:1000); x-5; benchmark(replications=200, columns=c(test,elapsed), order=elapsed, which=length(which(x==v)),

Re: [R] Reading from Google Docs

2009-06-19 Thread Uwe Ligges
See the manual R Installation and Administration for information on how to install source packages on Windows. Uwe Ligges Farrel Buchinsky wrote: After issuing tar xvfz RgoogleDocs_0.2.2-src.tar.gzI am getting an error message 'tar' is not recongnized as an internal or external command,

Re: [R] [Repost][Off Topic] Pointers needed for breakthrough in statistics

2009-06-19 Thread Ravi Varadhan
This gives a failrly long list: http://www.amazon.com/Books-history-Probability-Statistics/lm/R1WZ9DISAO6OGX Ravi. --- Ravi Varadhan, Ph.D. Assistant Professor, The Center on Aging and Health Division of

[R] Fancy Ticks in Plots

2009-06-19 Thread Lorenzo Isella
Dear All, I am pretty satisfied with R for my plotting, but there are a few subtleties which I cannot figure out. Consider figure 1 in the paper at the link below http://cxnets.googlepages.com/univ_citations.pdf Can I have the same kind of ticks in an R-generated figure (that is to say:

[R] resampling the entire row

2009-06-19 Thread Seunghee Baek
Hi, For bootstrapping method, I would like to resample the entire row instead of one column. What should I do? Thanks, Becky __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] paramter restriction in optim

2009-06-19 Thread laist
Hi, I would like to know if you could help me... I need to restrict a parameter in a problem of optimization but I don't know how to do it. function(s){ c-s[1] a1-s[2] a2-s[2] return(-sum()) } optim(...) In fact I need to know how to specify 0=a1=1. I've tried but without success Thank you

[R] a plot of stacked boxes

2009-06-19 Thread Osman Al-Radi
Hello, I would like to create a plot composed of stacked boxes (squares or rectangles), where the size of the box would represent the frequency of observations based on a categorical variable (group), the color would represent the proportion of success (binary) within that group (outcome) on a

[R] reading geotiff into Splus or R

2009-06-19 Thread Scott Saleska
I am looking for an easy way to import data in a GEOTIFF file into Splus or R. Any suggestions? Thanks, Scott Scott R. Saleska Assistant Professor, Ecology and Evolutionary Biology Director, PIRE Program in Amazon-Climate Interactions University of Arizona 1041 E. Lowell St. BioSciences

Re: [R] reading geotiff into Splus or R

2009-06-19 Thread B. H. Braswell
Hi Scott, Have you tried rgdal? http://cran.r-project.org/web/packages/rgdal/index.html Rob -- Rob Braswell University of New Hampshire On Jun 19, 2009, at 10:48 AM, Scott Saleska wrote: I am looking for an easy way to import data in a GEOTIFF file into Splus or R. Any suggestions?

Re: [R] searching help for partial matches

2009-06-19 Thread Uwe Ligges
Double the question mark as in: ??allequal Uwe Ligges Steve Jaffe wrote: The situation is that I know there is a function and know approximately what the name is, and want to find the exact name. Is there a way of searching for near-matches (similar to unix apropos). For example, I know

Re: [R] Leave One Out Cross Validation

2009-06-19 Thread Uwe Ligges
See the posting guide: If you provide commented, minimal, self-contained, reproducible code some people may be willing to help on the list. Best, Uwe Ligges muddz wrote: Hi All, I have been trying to get this LOO-Cross Validation method to work on R for the past 3 weeks but have had no

Re: [R] hands-on book on multivariate statistics and data-mining with R?

2009-06-19 Thread Uwe Ligges
Michael wrote: Hi all, I am looking for pointers to good hands-on books on multivariate statistics and data-mining with R? So that I could learn while doing experiments... Most of the times it is advisable to get a good book about the statistical concepts (multivariate statistics or

Re: [R] Fancy Ticks in Plots

2009-06-19 Thread David Winsemius
On Jun 19, 2009, at 11:58 AM, Lorenzo Isella wrote: Dear All, I am pretty satisfied with R for my plotting, but there are a few subtleties which I cannot figure out. Consider figure 1 in the paper at the link below http://cxnets.googlepages.com/univ_citations.pdf Like this?

Re: [R] reducing space between tickmark labels and axes labels

2009-06-19 Thread Uwe Ligges
Eva Schultner wrote: Hello, Does anybody know if it is possible to reduce the spaces between axes labels and axes lables in boxplots? One way is to omit them at first and put them into the desired margin line with a call to mtext() later on. Uwe Ligges I am trying to fit several

Re: [R] resampling the entire row

2009-06-19 Thread Chuck Cleland
On 6/19/2009 10:59 AM, Seunghee Baek wrote: Hi, For bootstrapping method, I would like to resample the entire row instead of one column. What should I do? iris[sample(x=nrow(iris), replace=TRUE),] But I would look at the boot package or other packages related to bootstrapping. Thanks,

Re: [R] IP-Address

2009-06-19 Thread David Huffer
On Wednesday, June 17, 2009 3:33 PM, edwinedw...@web.de wrote: Sorry, David has just told my that it was a mistake in my example (Thanks David). I had a wrong idea. The right idea is: make a ip range, when the number increament without an gap (and with maximum number: 255, see example

[R] a plot of stacked boxes

2009-06-19 Thread Osman Al-Radi
Hello, I would like to create a plot composed of stacked boxes (squares or rectangles), where the size of the box would represent the frequency of observations based on a categorical variable (group), the color would represent the proportion of success (binary) within that group (outcome) on a

Re: [R] getting cd_plot in vcd package to work with layout

2009-06-19 Thread Uwe Ligges
Lyndon Walker wrote: Hi, I'm trying to get 2x2 (or other layouts) of cd_plot from the vcd package. I have tried the usual commands like layout, par(mfrow...) etc and but cd_plot seems to ignore them and send the plotting window back to 1x1. I have also tried turning off the pop and newpage

Re: [R] a plot of stacked boxes

2009-06-19 Thread David Winsemius
Perhaps this package can help: http://cran.r-project.org/web/packages/vcd/index.html Page 4 of this vignette looks like a complete solutions has already been programmed: http://cran.r-project.org/web/packages/vcd/vignettes/residual-shadings.pdf -- On Jun 19, 2009, at 12:41 PM, Osman

Re: [R] re ad.table() and setwd() in unix batch mode

2009-06-19 Thread tbigdeli
My apologies for being overly brief before.. I submit an R script to batch mode as follows: a list of files (object = 'files'). In each iteration, the next file is read, alterations made, working directory changed, and output file written out. R will take an inordinate amount of time

Re: [R] paramter restriction in optim

2009-06-19 Thread Uwe Ligges
laist wrote: Hi, I would like to know if you could help me... I need to restrict a parameter in a problem of optimization but I don't know how to do it. function(s){ c-s[1] a1-s[2] a2-s[2] return(-sum()) } optim(...) In fact I need to know how to specify 0=a1=1. I've tried but without

Re: [R] problem with axis alignment when plotting 2 time series on same graph

2009-06-19 Thread Uwe Ligges
josef.kar...@phila.gov wrote: I am trying to plot 2 time series on the same graph. For example, X1 is the vector of dates and times, its class is POSIXt. Y1 is an environmental parameter, e.g. salinity. X2 is a second vector of dates and times, also of class POSIXt.X2 has a different

[R] Sweave and xtable floating issues -- SOLVED

2009-06-19 Thread Liviu Andronic
Dear all, I've recently made in LyX a report using Sweave and run into troubles with xtable() generated LaTeX tables. One example, xtable() commands inside floats (table, box (minipage), etc.) will make the LaTeX compilation fail. Another, if four-five xtable() commands are run in a sequence, at

Re: [R] re ad.table() and setwd() in unix batch mode

2009-06-19 Thread Uwe Ligges
tbigdeli wrote: My apologies for being overly brief before.. I submit an R script to batch mode as follows: a list of files (object = 'files'). In each iteration, the next file is read, alterations made, working directory changed, and output file written out. R will take an inordinate

Re: [R] question about adding plots in a grid (lattice package)

2009-06-19 Thread Deepayan Sarkar
On 6/16/09, Marion Dumas mario...@gmail.com wrote: Hello! I am starting to use the lattice package. I generated an xyplot conditioned on a factor that has three levels: hence I get three plots in three panels spaces and one is left empty. I would like to add a plot to the empty panel space.

  1   2   >