[R] Problem storing lm() model in a list

2010-12-04 Thread Harold Pimentel
Hi all, I recently wrote some code to store a number of polynomial models in a list and return this list. The model is returned fine, but when I make a subsequent call to predict(), I have an error. The code for polyModel selection is listed at the end of the email. Here is an example of the

Re: [R] Non-visible functions: merge.data.table

2010-12-04 Thread Ryan Garner
Thanks Jim! I posted the specifics of what I'm trying to accomplish here: http://r.789695.n4.nabble.com/Slow-Data-Table-Merge-td3072027.html -- View this message in context: http://r.789695.n4.nabble.com/Non-visible-functions-merge-data-table-tp3072051p3072075.html Sent from the R help mailing

Re: [R] Nash Equilibrium

2010-12-04 Thread Christophe Dutang
Hello all, Months ago, when I wanted to compute Nash equilibria (both standard and generalized), I only found one package that implements the discrete, i.e. when the player payoff is represented by a matrix. So I decided to implement the computation when the payoff is a continuous payoff,

[R] Question about #1 zoo-faq

2010-12-04 Thread Alexander Salim
Hi all, I have a zoo object issue. When I create a zoo object I have following error message: some methods for 'zoo' objects do not work if the index entries in 'order.by' are not unique. I checked if I have some duplicates in the 'Time' column, R says yes, but when I check the data set I can't

Re: [R] Question about #1 zoo-faq

2010-12-04 Thread Gabor Grothendieck
On Sat, Dec 4, 2010 at 5:40 AM, Alexander Salim sa...@gmx.ch wrote: Hi all, I have a zoo object issue. When I create a zoo object I have following error message: some methods for 'zoo' objects do not work if the index entries in 'order.by' are not unique. I checked if I have some duplicates

Re: [R] Question about #1 zoo-faq

2010-12-04 Thread Duncan Murdoch
On 04/12/2010 5:40 AM, Alexander Salim wrote: Hi all, I have a zoo object issue. When I create a zoo object I have following error message: some methods for 'zoo' objects do not work if the index entries in 'order.by' are not unique. I checked if I have some duplicates in the 'Time' column, R

[R] scale caption on levelplot

2010-12-04 Thread Andrew Collier
hi, i am trying to figure out how to put a caption on the colour scale of a levelplot. there does not seem to be an option for this in levelplot(). i tried using mtext() but as soon as you put the text far out enough on the right of the plot, it goes beyond the plot boundary. so i tried to extend

Re: [R] Nash Equilibrium

2010-12-04 Thread Ravi Varadhan
Hi Christophe, Aren't you also using fixed-point acceleration schemes (from the SQUAREM package) for solving the Nash equilibria? How does fixed-point acceleration approach compare to the optimization approach in terms of speed and robustness (i.e. convergence from bad starting values)?

Re: [R] Nash Equilibrium

2010-12-04 Thread Christophe Dutang
Finally, I decided not to depends on SQUAREM, which I used for testing. Nevertherless extrapolation methods for fixed point iteration are at least twice faster than the crude fixed-point iteration or other relaxation methods. Later I would like to do a real benchmark of all methods, not just

Re: [R] Nash Equilibrium

2010-12-04 Thread Paul Smith
On Sat, Dec 4, 2010 at 10:09 AM, Christophe Dutang duta...@gmail.com wrote: Months ago, when I wanted to compute Nash equilibria (both standard and generalized), I only found one package that implements the discrete, i.e. when the player payoff is represented by a matrix. Could you please

Re: [R] Add columns of dataset

2010-12-04 Thread Lisa
Your R script works very well. Thank you very much. Lisa -- View this message in context: http://r.789695.n4.nabble.com/Add-columns-of-dataset-tp3071722p3072513.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

Re: [R] scale caption on levelplot

2010-12-04 Thread David Winsemius
On Dec 4, 2010, at 8:25 AM, Andrew Collier wrote: hi, i am trying to figure out how to put a caption on the colour scale of a levelplot. there does not seem to be an option for this in levelplot(). Agreed. I could not find one in the levelplot help page or in the chapter of Lattice on

Re: [R] Downloading quote data from yahoo finance

2010-12-04 Thread Joshua Ulrich
On Wed, Dec 1, 2010 at 11:15 PM, Deb Midya debmi...@yahoo.com wrote: Hi R users, Thanks in advance. I am using R 2.12.0 on Windows XP. May I request you to assist me in the following please. 1. I am getting error while downloading quote data from yahoo finance. The example code is below

[R] Error in calcCurveGrob(x, x$debug) : End points must not be identical

2010-12-04 Thread Bryan Hanson
Hi All... I havenĀ¹t found mention of this error anywhere. I'm trying to draw spline curves using grid graphics. Most of the time, I have no problems, but I have some data sets that give the error in the subject line. I'm not sure which end points are identical, but the end points passed to the

[R] Quadratic programming with semi-definite matrix

2010-12-04 Thread Andreas Jensen
Hello. I'm trying to solve a quadratic programming problem of the form min ||Hx - y||^2 s.t. x = 0 and x = t using solve.QP in the quadprog package but I'm having problems with Dmat not being positive definite, which is kinda okay since I expect it to be numerically semi-definite in most cases.

[R] what is this averaging function called ?, has R a built in function for it ?

2010-12-04 Thread madr
I know little of statistics and have created this function out of intuition. But since this algorithm is so basic I wonder what is the proper name of this function and is it build in R. here is some code in PHP to illustrate what the function is doing, it uses some function I created but the

Re: [R] Downloading quote data from yahoo finance

2010-12-04 Thread Mike Marchywka
From: josh.m.ulr...@gmail.com Date: Sat, 4 Dec 2010 14:47:45 -0600 To: debmi...@yahoo.com CC: r-help@r-project.org Subject: Re: [R] Downloading quote data from yahoo finance On Wed, Dec 1, 2010 at 11:15 PM, Deb Midya wrote: Hi R users,

Re: [R] scale caption on levelplot

2010-12-04 Thread Peter Ehlers
Andrew, see below On 2010-12-04 08:25, David Winsemius wrote: On Dec 4, 2010, at 8:25 AM, Andrew Collier wrote: hi, i am trying to figure out how to put a caption on the colour scale of a levelplot. there does not seem to be an option for this in levelplot(). Agreed. I could not find one

[R] Help with diff(sqrt()) function in terms of time series

2010-12-04 Thread Addi Wei
year1 is the time series data set below 11.64 11.50 11.49 11.16 11.15 11.37 11.37 11.57 11.83 11.87 11.85 11.92 11.77 11.71 11.57 11.24 11.27 11.33 11.17 . With a total of 1304 rows of data. When I try to run the code: diff(sqrt(year10)) I get the response: data frame with 0

Re: [R] data.table query

2010-12-04 Thread Dennis Murphy
Hi: dt[, mean(A), by = 'B'] B V1 [1,] 1 1.00 [2,] 2 1.67 [3,] 3 2.33 [4,] 4 3.00 ...and I can see you've found the data.table mailing list... HTH, Dennis On Fri, Dec 3, 2010 at 3:38 PM, Santosh Srinivas santosh.srini...@gmail.com wrote: Hello Group, I need a

Re: [R] latex tables for 3+ dimensional tables/arrays

2010-12-04 Thread Michael Friendly
Hi Rich, I was looking for something that I could make general, as a latex.ftable method for ftable objects. I realize you showed how to do this for a particular case, but I'm having a bit of trouble translating this into a general solution for 1 or more row variables and 1 or more col

Re: [R] how to debug (mtrace) a function defined inside a function?

2010-12-04 Thread MarkBravington
Hi Andre Just saw your email; I'm the author of the 'debug' package but I don't subscribe to R-help, so it's best to email me directly with questions about 'debug' or 'mvbutils'. The quick answer is that you can either: - mtrace( mymodel), then after it has executed the 'build -

[R] bandplot

2010-12-04 Thread Nasrin Pak
Hi; I'm trying to use bandplot function. I've installed the gplots package but still the function is not found in R. what's the problem? -- Sincerely Nasrin Pak [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] bandplot

2010-12-04 Thread David Winsemius
On Dec 4, 2010, at 8:56 PM, Nasrin Pak wrote: Hi; I'm trying to use bandplot function. I've installed the gplots package but still the function is not found in R. what's the problem? That usually means you have not yet loaded it. Try one of: library(gplots) require(gplots) -- David

[R] grep for strings

2010-12-04 Thread Santosh Srinivas
I am trying to find the function where I can search for a pattern in a text string (I thought I could use grep for this but no :(). x [1] abcdefghijkl I want to find the positions (i.e. equivalent of nchar) for cd and in case there are multiple hits .. then the results as a array Thank you.

Re: [R] grep for strings

2010-12-04 Thread Charles C. Berry
On Sun, 5 Dec 2010, Santosh Srinivas wrote: I am trying to find the function where I can search for a pattern in a text string (I thought I could use grep for this but no :(). Correct, but reading ?grep and running example( grep ) should show you how to do that search.

Re: [R] grep for strings

2010-12-04 Thread jim holtman
x - abcdefghijkl ?regexpr starting httpd help server ... done regexpr('cd', x) [1] 3 attr(,match.length) [1] 2 On Sat, Dec 4, 2010 at 9:34 PM, Santosh Srinivas santosh.srini...@gmail.com wrote: I am trying to find the function where I can search for a pattern in a text string (I thought I

Re: [R] scale caption on levelplot

2010-12-04 Thread Andrew Collier
hi peter and david, thanks for the excellent suggestions. here is something like what i am finally using (those fancy fonts were really tempting, but i chose something a little more mundane!): library(lattice) x - sort(rnorm(100,50,10)) y - sort(runif(100,0,20)) d - expand.grid(x=x, y=y) d$z -

Re: [R] scale caption on levelplot

2010-12-04 Thread Peter Ehlers
On 2010-12-04 21:29, Andrew Collier wrote: hi peter and david, thanks for the excellent suggestions. here is something like what i am finally using (those fancy fonts were really tempting, but i chose something a little more mundane!): library(lattice) x- sort(rnorm(100,50,10)) y-

Re: [R] grep for strings

2010-12-04 Thread Petr Savicky
On Sun, Dec 05, 2010 at 08:04:08AM +0530, Santosh Srinivas wrote: I am trying to find the function where I can search for a pattern in a text string (I thought I could use grep for this but no :(). x [1] abcdefghijkl I want to find the positions (i.e. equivalent of nchar) for cd and in