Re: [R] Tinn R - the preferred R term was not defined

2010-08-22 Thread pdb
Ok - I found the correct forum and that this seems to be a common problem. http://sourceforge.net/projects/tinn-r/forums/forum/481900/topic/3741784 -- View this message in context: http://r.789695.n4.nabble.com/Tinn-R-the-preferred-R-term-was-not-defined-tp2334642p2334649.html Sent from the R

[R] Tinn R - the preferred R term was not defined

2010-08-22 Thread pdb
I have Windows 7 64 bit and 64 bit version of R. I have installed Tinn R. Everytime I start R from within Tinn R it gives me the message "The preferred R term was not defined. Do you desire to do this now" I then tell Tinn R where the Rterm.exe and Rgui.exe are. Rterm works OK - I can open r

Re: [R] Engle Granger Test in R

2010-08-22 Thread David Scott
Aditya Damani wrote: Hi, Please tell me the R codes for Engle Granger Test of cointegration. TIA Aditya Enough already. That must be 5 or more posts which basically say 'write the code for me to do my work so I don't have to bother'. Firstly, read the posting guide (the url is at the botto

[R] Engle Granger Test in R

2010-08-22 Thread Aditya Damani
Hi, Please tell me the R codes for Engle Granger Test of cointegration. TIA Aditya __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provid

[R] Fitting VAR and doing Johansen's cointegration test in R

2010-08-22 Thread Aditya Damani
Hi, Could someone please tell me the R codes for fitting VAR(p) (Vector Auto Regressive) models and doing the Johansen’s cointegration tests. TIA Aditya __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read th

[R] Confidence Interval in ARMA mean GARCH model

2010-08-22 Thread Aditya Damani
Hi, How do I change Confidence Interval level (say from 95% to 80%) while getting prediction intervals for ARMA mean models, and GARCH models in R? TIA Aditya __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do r

Re: [R] Recursion problem

2010-08-22 Thread Shant Ch
Thanks Jim. Here are the following details: I need to find the sum, w=n*d1/2, fixed SUM [nCk* g(w,k)*g(w, n-k-1)]. Here the SUM is taken from k=1,2,..,n-1. f1<-exp(-t^2/(2*r*(r+1)))*G(t,r-1) G(x,r)=integrate(f1,0,x), where G(x,0)=1 So, G(x,r) is related to G(x,r-1) by the above relation with

[R] Fitting a GARCH model in R

2010-08-22 Thread Aditya Damani
Hi, I want to fit a mean and variance model jointly. For example I might want to fit an AR(2)-GARCH(1,1) model i.e. r_t = constant_term1 + b*r_t-1 + c*r_t-2 + a_t where a_t = sigma_t*epsilon_t where sigma^2_t = constant_term2 + p*sigma^2_t-1 + q*a^2_t-1 i.e. R estimates a constant_term1, b, c

[R] Dickey–Fuller test in R

2010-08-22 Thread Aditya Damani
Hi, While doing the adf test using ur.df “price.df2=ur.df(y=log(price),type = "drift", selectlags="AIC") summary(price.df2)” It gives two values for “value of test statistic is: -1.5992   2.32” one value is the t-test (or t-ratio), what is the other one? Please help. TIA Aditya ___

[R] Fitting a regression model with with ARMA error

2010-08-22 Thread Aditya Damani
Hi, I want to fit a regression model with one independent variable. The error part should be fitted an ARMA process. For example, y_t = a + b*x_t + e_t where e_t is modelled as an ARMA process. Please let me know how do I do this in R. What code should I use? TIA Aditya [[alternative

Re: [R] previous work on linking to ROOT data structures

2010-08-22 Thread Henrik Bengtsson
See the xps package over at Bioconductor: http://www.bioconductor.org/packages/release/bioc/html/xps.html /H On Sun, Aug 22, 2010 at 4:53 PM, Sebastian White wrote: > Hello, > I was told that work had been done to use R with the CERN developed > framework "ROOT" but can't find anything on your s

Re: [R] plot points using vis.gam

2010-08-22 Thread David Winsemius
I typically annotate contourplots in the manner suggested. I agree that doing it with a persp() plot would be more difficult but it's really quite straightforward with either base or lattice graphics. -- David Simon Wood-4 wrote: > > There is no easy way to do this. It might be possible to cus

[R] previous work on linking to ROOT data structures

2010-08-22 Thread Sebastian White
Hello, I was told that work had been done to use R with the CERN developed framework "ROOT" but can't find anything on your site. Please point me to whatever has been done. Sebastian White Sebastian White, Physics Deprtment Brookhaven National Laboratory Offiice: 631-344-5488

Re: [R] how to implement string pattern extraction in R

2010-08-22 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Waverley @ > Palo Alto > Sent: Sunday, August 22, 2010 3:51 PM > To: r-help > Subject: Re: [R] how to implement string pattern extraction in R > > Thanks for the reply to pointi

Re: [R] spare matrix replacing values efficiently

2010-08-22 Thread Charles C. Berry
On Sun, 22 Aug 2010, david h shanabrook wrote: I am working with a large sparse matrix trying replace all 1 values with 0. The normal method doesn't work. Here is a small example: x <- Matrix(0,nrow=10,ncol=10,sparse=TRUE) x[,1] <- 1:2 x 10 x 10 sparse Matrix of class "dgCMatrix" [1,] 1 .

[R] R Report (was RE: R-help Digest, Vol 90, Issue 25)

2010-08-22 Thread Wang, Kevin (SYD)
I've been following the "R Reports" topic in the digest mode, so apologies if this has already been mentioned. On a Windows platform, there is a package called R2wd which I've recently discovered and have been using. It allows one to put data frames (it's the only object I've tried so far) into

Re: [R] plot points using vis.gam

2010-08-22 Thread mra
That's too bad. Thanks for your time, Monica On Sun, Aug 22, 2010 at 7:13 AM, Simon Wood-4 [via R] wrote: > There is no easy way to do this. It might be possible to customize vis.gam, > to > be able to do this by using the same trick that allows you to add elements > to > a 3D plot with `persp'

[R] CRAN (and crantastic) updates this week

2010-08-22 Thread Crantastic
CRAN (and crantastic) updates this week New packages * DCGL (1.0) Bao-Hong Liu http://crantastic.org/packages/DCGL Functions for basic differential coexpression analyses: gene filtering, link filtering, DCG (Differentially-Coexpressed Gene) identification and DCL (Differen

Re: [R] how to implement string pattern extraction in R

2010-08-22 Thread Waverley @ Palo Alto
Thanks for the reply to pointing me to the grep functions. I have checked the readme page http://pbil.univ-lyon1.fr/library/base/html/grep.html before I sent the help request. Just don't know how to extract a substring matching a pattern out of a string. Can someone give me the example code simi

Re: [R] how to implement string pattern extraction in R

2010-08-22 Thread Gabor Grothendieck
On Sun, Aug 22, 2010 at 6:05 PM, Waverley @ Palo Alto wrote: > Hi, > > In perl, to get a substring matching a particular  pattern can be > implemented like the following example: > > $x = ".txt"; > if ($x=~ /(.*?)\.txt/){ >  $prefix = $1; > } > > So how to do the same thing in R? > > Can someo

[R] spare matrix replacing values efficiently

2010-08-22 Thread david h shanabrook
I am working with a large sparse matrix trying replace all 1 values with 0. The normal method doesn't work. Here is a small example: > x <- Matrix(0,nrow=10,ncol=10,sparse=TRUE) > x[,1] <- 1:2 > x 10 x 10 sparse Matrix of class "dgCMatrix" [1,] 1 . . . . . . . . . [2,] 2 . . . . . . . . . [3,]

Re: [R] Package repository on Linux machine and upgrading R

2010-08-22 Thread Peter Dalgaard
On 08/22/2010 10:08 PM, Patrick Connolly wrote: > On Fri, 20-Aug-2010 at 06:16PM -0700, Vinh Nguyen wrote: > > |> Dear list, > |> > |> I remember running into a thread on this topic in one of the R mailing > |> lists before but I can't seem to find it now. Basically, I remember a > |> discussion

Re: [R] how to implement string pattern extraction in R

2010-08-22 Thread Joshua Wiley
Hi Waverley, I am not familiar at all with perl, but this should get you headed in the right direction: #Some documentation that might help ?regexpr ?grep ?regexp #I imagine you sould do something like x <- ".txt" regexpr(pattern = "yourpattern", text = x) grep(pattern = "yourpattern", x =

Re: [R] how to implement string pattern extraction in R

2010-08-22 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Waverley @ Palo Alto > Sent: Sunday, August 22, 2010 3:05 PM > To: r-help > Subject: [R] how to implement string pattern extraction in R > > Hi, > > In perl, to get a substring m

[R] help to use GMerrorsar () spdep

2010-08-22 Thread Francisco Silva
Hi Folks, I am trying to work with spatial logit model and I stopped my research in a Paper of Pinkse that make estimation of spatial models by GMM. I search in R communite and I find that GMerrorsar function in spdep package is used to it, but I have tryied so many times to make my model by this

[R] how to implement string pattern extraction in R

2010-08-22 Thread Waverley @ Palo Alto
Hi, In perl, to get a substring matching a particular pattern can be implemented like the following example: $x = ".txt"; if ($x=~ /(.*?)\.txt/){ $prefix = $1; } So how to do the same thing in R? Can someone provide me the code sample? Thanks much in advance. -- Waverley @ Palo Alto

Re: [R] Package repository on Linux machine and upgrading R

2010-08-22 Thread Patrick Connolly
On Fri, 20-Aug-2010 at 06:16PM -0700, Vinh Nguyen wrote: |> Dear list, |> |> I remember running into a thread on this topic in one of the R mailing |> lists before but I can't seem to find it now.  Basically, I remember a |> discussion on how one can set up where R packages can be installed so |>

Re: [R] coxme AIC score and p-value mismatch??

2010-08-22 Thread David Bickel
You noticed that the AIC increases while the p-value decreases as you change the model and hold the data fixed. There would be more indication of a problem if you instead noticed the same relationship between the AIC and the p-value as you changed the data and held the model fixed. David On

Re: [R] problems with merge() - the output has many repeated lines

2010-08-22 Thread Brad Patrick Schneid
?unique -- View this message in context: http://r.789695.n4.nabble.com/problems-with-merge-the-output-has-many-repeated-lines-tp2333596p2334249.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://

[R] Regarding Naive bayes classification

2010-08-22 Thread Vishnampettai
Hi, I have a small doubt regarding naive Bayes. I am able to classify the data's properly but i am just stuck up with how to get the probability values for naive bayes. In the case of SVM we have "attr" function that helps in displaying the probability values. Is there any function similar to "a

Re: [R] on abort error, always show call stack?

2010-08-22 Thread Henrik Bengtsson
For what's it worth, the Exception class of R.oo extends the simpleError class. When an Exception object is instantiated it also records the stack trace ("traceback()"). Then when the exception is "thrown" it will behave just as stop(). For the convenience, throw("message") does all this in one

Re: [R] problems with merge() - the output has many repeated lines

2010-08-22 Thread Cecilia Carmo
I have done intersect(names(df1), names(df2)) [1] "firm" "year" This is the key I used to merge merge(df1,df2,by=c("firm","year")) And there is just one row firm/year in df1 that matches with another firm/year row in df2. Df1 has more firm/year rows than df2, and them don't match with none in

Re: [R] problems with merge() - the output has many repeated lines

2010-08-22 Thread Erik Iverson
Cecilia - Find what columns you're matching on, intersect(names(df1), names(df2)), Maybe that will shed some light on the issue. On 08/22/2010 12:02 PM, Cecilia Carmo wrote: Thanks, but I don't have multiple matches and the lines repeated in the final dataframe are exactly equal in all column

Re: [R] problems with merge() - the output has many repeated lines

2010-08-22 Thread Cecilia Carmo
Thanks, but I don't have multiple matches and the lines repeated in the final dataframe are exactly equal in all columns. Cecília Sat, 21 Aug 2010 10:58:53 -0500 Hadley Wickham escreveu: You may find a close reading of ?merge helpful, particularly this sentence: "If there is more than one

Re: [R] on abort error, always show call stack?

2010-08-22 Thread Matt Shotwell
How about this: test <- function(x) log(x) tryCatch({ #Code that will error test("a") }, finally = { sink(stderr()) traceback() sink() }) If you are running non-interactively, invoke R with the --interactive flag to force it. Saving the code above to test.R, you can see the e

Re: [R] on abort error, always show call stack?

2010-08-22 Thread ivo welch
yes, thank you. is it possible to have it invoked to STDERR automatically on a program abort? /iaw On Sun, Aug 22, 2010 at 11:50 AM, Matt Shotwell wrote: > On Sun, 2010-08-22 at 11:41 -0400, ivo welch wrote: >> Dear R Wizards---is it possible to get R to show its current call >> stack (sys.call

Re: [R] on abort error, always show call stack?

2010-08-22 Thread Charles C. Berry
On Sun, 22 Aug 2010, Matt Shotwell wrote: On Sun, 2010-08-22 at 11:41 -0400, ivo welch wrote: Dear R Wizards---is it possible to get R to show its current call stack (sys.calls()) upon an error abort? I don't use ESS for execution, and it is often not obvious how to locate how I triggered an e

Re: [R] Recursion problem

2010-08-22 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Shant Ch > Sent: Saturday, August 21, 2010 9:04 PM > To: r-help@r-project.org > Subject: [R] Recursion problem > > > > Hi, > > > I wanted to compute the value of the function

Re: [R] on abort error, always show call stack?

2010-08-22 Thread Matt Shotwell
On Sun, 2010-08-22 at 11:41 -0400, ivo welch wrote: > Dear R Wizards---is it possible to get R to show its current call > stack (sys.calls()) upon an error abort? I don't use ESS for > execution, and it is often not obvious how to locate how I triggered > an error in an R internal function. Seein

[R] on abort error, always show call stack?

2010-08-22 Thread ivo welch
Dear R Wizards---is it possible to get R to show its current call stack (sys.calls()) upon an error abort? I don't use ESS for execution, and it is often not obvious how to locate how I triggered an error in an R internal function. Seeing the call stack would make this easier. (right now, I spri

Re: [R] Help making box plots in R when the x axis is a quantitative variable

2010-08-22 Thread Tal Galili
Hi FishLover, I believe this will answer your question: # getting some dummy data seed(10) y <- rnorm(100) x <- sample(c(1,2,5.5), 100 , T) boxplot(y~x) # won't work boxplot(y~x, at = c(1,2,5.5), xlim = c(0,6)) # will work Cheers, Tal Contact Details:--

[R] Baumgartner-Weiss-Schindler test

2010-08-22 Thread Ralf B
Hi R group, I am wondering if there is any implementation of the Baumgartner-Weiss-Schindler test in R, as described in: http://www.jstor.org/stable/2533862 It is a non-parametric test, that works similar to KS and others testing the null hypothesis that two sets of data originate from the the s

Re: [R] lattice::xyplot() with one factor for points and another for lines - solution

2010-08-22 Thread Dennis Murphy
Hi: Yesterday, I posted a question regarding how to handle different graphical behavior between two factors in xyplot() [package lattice]. After a public and private reply from Deepayan Sarkar, the problem has been resolved nicely, including the addition of a stacked legend for the two factors in

Re: [R] logistic regression tree

2010-08-22 Thread Peter Dalgaard
On 08/22/2010 01:51 PM, Kay Cichini wrote: > achim, thank you for the very kind offer!! sorrily i'm not around vienna in > the near feature, otherwise i'd be glad to coming back to your invitation. Not that it's any of my business, but I don't think you need to go THAT far to visit Achim these da

Re: [R] Fwd: basic hist() question

2010-08-22 Thread Philipp Pagel
> It works fine. > > Could you explain to me why it did not worked for read.table? Because of what Gavin already explaied in his reply: read.table returns a data.frame and hist needs a vector. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Unive

Re: [R] logistic regression tree

2010-08-22 Thread Kay Cichini
dear all, thank you everyone for the profound answers and the needful references! achim, thank you for the very kind offer!! sorrily i'm not around vienna in the near feature, otherwise i'd be glad to coming back to your invitation. yours, kay - Kay Cichini Postgrad

Re: [R] Help making box plots in R when the x axis is a quantitative variable

2010-08-22 Thread RICHARD M. HEIBERGER
Please see this email https://stat.ethz.ch/pipermail/r-help/2009-March/190541.html On Sat, Aug 21, 2010 at 11:42 PM, FishLover wrote: > > Hello > > I'm trying to make boxplots > > However I'm having issues because my x axis is distance downstream on a > river. The boxplots function in r assum

Re: [R] plot points using vis.gam

2010-08-22 Thread Simon Wood
There is no easy way to do this. It might be possible to customize vis.gam, to be able to do this by using the same trick that allows you to add elements to a 3D plot with `persp' (see help file for persp), but it would be quite a bit of coding, I guess. On Thursday 05 August 2010 15:19, mra wr

Re: [R] more questions on gam/gamm(mgcv)...

2010-08-22 Thread Simon Wood
On Wednesday 04 August 2010 20:05, Xia Li wrote: > Hi R-users, > > I'm using R 2.11.1, mgcv 1.6-2 to fit a generalized additive mixed model. > I'm new to this package...and just got more and more problems... > > 1. Can I include correlation and/or random effect into gam( ) also? or only > gamm( ) c

Re: [R] compare gam fits

2010-08-22 Thread Simon Wood
You can do this using the predict.gam(...,type="lpmatrix"). Here's some code providing an example ## example of smooths conditioned on factors from ?gam.models library(mgcv) dat <- gamSim(4) ## fit model... b <- gam(y ~ fac+s(x2,by=fac)+s(x0),data=dat) plot(b,pages=1) ## now predict on x2 gr

Re: [R] Recursion problem

2010-08-22 Thread Barry Rowlingson
On Sun, Aug 22, 2010 at 11:19 AM, jim holtman wrote: > We replied once that your function Grx is not correct.  It will > recurse to an infinite depth because there is no condition to end the > calls.  I would expect that there would be some test at the beginning > of the function to see if it shou

Re: [R] Recursion problem

2010-08-22 Thread jim holtman
We replied once that your function Grx is not correct. It will recurse to an infinite depth because there is no condition to end the calls. I would expect that there would be some test at the beginning of the function to see if it should be called again. You need to debug your function, or rewri

Re: [R] R reports

2010-08-22 Thread David Hajage
2010/8/21 Donald Winston > I know how to program in a dozen languages. I have a B.A. in mathematics, > and an M.S. in operations research and statistics. I just don't care, I would try to answer you even if you had no formation. > I can figure out how to write reports in R. The point is I don