Re: [R] Inference for R Spam

2009-03-05 Thread Mark Difford
Rolf Turner wrote: >> What is your point, exactly? My point is that you are making some very broad generalizations on the basis of your own (perhaps limited) experience and knowledge of the history of science. You say: "My impression --- and I could be wrong --- is that physicists understanding

[R] Variance inflation factors (VIF)

2009-03-05 Thread per243
I have the following script, how can I implement to achieve that calculate the VIF. Thanks. U1.7km<-c(15:24) R<-c(1.2,0.2,3.6,2.5,4.8,6.3,2.3,4.1,7.2,6.1) Hm<-c(1:10) mod<-nls(R~a*(U1.7km^b)*(Hm^c), start=list(a=2.031, b=0.800, c=-0.255), trace=T) summary(mod) coef(mod) coef(summary(mod)) -- V

Re: [R] including tabular information with a plot in R Graphics

2009-03-05 Thread Jim Lemon
R User R User wrote: Hi all, I have a presentation problem that I cannot find a solution to in the documetnation. I have a nice barplot. Below this I would also like a table with some information relating to the plot. My idea was to have the plot and table on the same graphics window so I can out

[R] sm.options

2009-03-05 Thread Viviana Ruiz
Hi, I am doing kernel density plots, and am trying to make the lines thicker. I comparing three groups, in sm.density.compare. I tried changing lwd to make the line sthicker right on the density compare call, but was not able to do it. There is not an option in sm.options to specify line thickn

Re: [R] R on netbooks et al?

2009-03-05 Thread ronggui
May I ask what is the OS? Thanks. 2009/3/5 Erik Iverson : > I've installed Ubuntu, Emacs, and R on my Samsung NC10 with 2 GB RAM.  I > think the keyboard is very usable on the NC10, and it has about 5-7 hours of > battery life, which is also nice.  R runs just fine on it.  I'd consider > paying ex

[R] about the Batch Execution of R document

2009-03-05 Thread Nash
Dear all, Have a complete document about the Batch Execution of R or nice website? -- Nash - morri...@ibms.sinica.edu.tw __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-

[R] Statistics

2009-03-05 Thread per243
How can a non-linear regression to calculate the statistical R-square, R-square adjusted, RMSE, VIF?? Thanks jose -- View this message in context: http://www.nabble.com/Statistics-tp22364717p22364717.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] how to omit NA without using ifelse

2009-03-05 Thread markleeds
Hi: what you want to do is not recommended if you're doing a statistical computation ( many threads on this. search the archives if you want more details ) but if you really want to do that below should work: mat[is.na(mat)]<-0 On Thu, Mar 5, 2009 at 11:22 PM, Manli Yan wrote: I have a 50

[R] how to omit NA without using ifelse

2009-03-05 Thread Manli Yan
I have a 50*50 matrix,some entry are NAs,I want to replace these NA by 0,so can I use some syntax to do so other than using ifelse? I tried to use replace(a,NA,0),it didnt work~~(a is matrix name) Thanks~ [[alternative HTML version deleted]] __

Re: [R] OT: SAS on Open Source ,R and Code

2009-03-05 Thread Frank E Harrell Jr
Ajay ohri wrote: Hi List, This is a slightly non technical ,hence OT topic. Here is an Interview with Anne Milley of the SAS Institute. Anne Milley is director of product marketing, SAS Institute . In part 2 of the interview Anne talks of immigration in technology areas, open source networks ,

[R] OT: SAS on Open Source ,R and Code

2009-03-05 Thread Ajay ohri
Hi List, This is a slightly non technical ,hence OT topic. Here is an Interview with Anne Milley of the SAS Institute. Anne Milley is director of product marketing, SAS Institute . In part 2 of the interview Anne talks of immigration in technology areas, open source networks ,how she misses codi

Re: [R] Extract Row on Criteria

2009-03-05 Thread David Winsemius
On Mar 5, 2009, at 10:38 PM, David Winsemius wrote: See if this gets you further along: ?order ?rev ?"[" > df <- data.frame(x = 1:20, rsamp = sample(1:20,20), Lets =LETTERS[1:20]) > ord <- order(df$rsamp) # creates a sorted vector of row numbers > df[ord,] x rsamp Lets 16 16 1P

Re: [R] Extract Row on Criteria

2009-03-05 Thread David Winsemius
See if this gets you further along: ?order ?rev ?"[" > df <- data.frame(x = 1:20, rsamp = sample(1:20,20), Lets =LETTERS[1:20]) > ord <- order(df$rsamp) # creates a sorted vector of row numbers > df[ord,] x rsamp Lets 16 16 1P 14 14 2N 18 18 3R 15 15 4O 1

[R] Extract Row on Criteria

2009-03-05 Thread Bob Roberts
Hi, I have a data frame and I want to extract the entire rows that have the 20 largest numbers in column Z. How would I go about doing that? Thanks. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://s

Re: [R] Does R have function or method to finish my task?

2009-03-05 Thread zhijie zhang
Actually, i had checked out the methods of time series (TS), but i had thought it cannot solve it. TS may only considers the autocorrelation of Y in different time, but not Xs. Besides Y, i also have several independent variables. Following your suggestion, i browsed the dynlm package and found

Re: [R] latex output of regressions with standardized regression coefficients and t-statistics based on Huber-White

2009-03-05 Thread Jan Schulz
Hello again, Jan Schulz schrieb: What I couldn't figure out how to put that all together, so that I get a latex table with standardized regression coefficients and corrected t-statistics based on H-W sandwich. Seems that there is a way, I just can't figure out how :-) It seems to me, that I

Re: [R] Constructing a barplot in R

2009-03-05 Thread Rolf Turner
On 6/03/2009, at 12:03 PM, SIrEllwood wrote: Hi all, 3. The probabilities are 0.06, 0.21, 0.24, 0.18, 0.14, 0.10, 0.04, 0.02 and 0.01 that an airline will receive 0,1,2,3,4,5,6,7 or 8 complaints per day about its luggage.Find e(x) and e(x^2) Give the R commands you use and the two numer

Re: [R] ANOVA

2009-03-05 Thread Kingsford Jones
On Thu, Mar 5, 2009 at 8:31 AM, kayj wrote: > > Hi All, > > > I have about one hundred patients and all the patients had their glucose > measured on three different days. The days are all the same for all he > patients. So I have three measurement for each patient . I want to know > whether the da

[R] Constructing a barplot in R

2009-03-05 Thread SIrEllwood
Hi all, 3. The probabilities are 0.06, 0.21, 0.24, 0.18, 0.14, 0.10, 0.04, 0.02 and 0.01 that an airline will receive 0,1,2,3,4,5,6,7 or 8 complaints per day about its luggage.Find e(x) and e(x^2) Give the R commands you use and the two numerical values. Use the sample function to simulate co

Re: [R] Installing the Rstem package

2009-03-05 Thread Maria I. Tchalakova
Hello, yes with loading the package: library("Rstem") works! Thank you. On 3/6/09, Rolf Turner wrote: > > On 6/03/2009, at 10:29 AM, Maria I. Tchalakova wrote: > >> Hello, >> >> thanks a lot for the replies. I've installed the binary for R-2.8.x >> available at: >> http://www.statistik.uni-dor

Re: [R] Inference for R Spam

2009-03-05 Thread Wacek Kusnierczyk
Rolf Turner wrote: > > I certainly never said that no statisticians are arrogant; some > of them may well be. I never met one, but. :-) this can't be true. vQ __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PL

Re: [R] Boostrapping

2009-03-05 Thread Elena Wilson
We have used function srswor from package Sampling... -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of march Sent: Friday, 6 March 2009 2:52 AM To: r-help@r-project.org Subject:[R] Boostrapping Hi Everybody, I

Re: [R] problems with exporting a chart

2009-03-05 Thread Elena Wilson
Thanks a lot for your suggestion Uwe! This is something for me to get my head around! Best regards Lena -Original Message- From: Uwe Ligges [mailto:lig...@statistik.tu-dortmund.de] Sent: Thursday, 5 March 2009 10:54 PM To: Elena Wilson Cc: r-help@r-project.org Subject:

Re: [R] Installing the Rstem package

2009-03-05 Thread Rolf Turner
On 6/03/2009, at 10:29 AM, Maria I. Tchalakova wrote: Hello, thanks a lot for the replies. I've installed the binary for R-2.8.x available at: http://www.statistik.uni-dortmund.de/~ligges/Rstem_0.3-1.zip However, when I try using some of the functions, such as getStemLanguages() or wordStem()

Re: [R] Inference for R Spam

2009-03-05 Thread Rolf Turner
On 6/03/2009, at 10:38 AM, Mark Difford wrote: Hi Rolf, ... From the beginner's point of view it is useful to think of random variables ... Who, exactly, is the beginner ? The OP --- well, not the OP, but the person who introduced this line of discussion to this thread,

Re: [R] Installing the Rstem package

2009-03-05 Thread Uwe Ligges
Maria I. Tchalakova wrote: Hello, thanks a lot for the replies. I've installed the binary for R-2.8.x available at: http://www.statistik.uni-dortmund.de/~ligges/Rstem_0.3-1.zip However, when I try using some of the functions, such as getStemLanguages() or wordStem(), I get: Have you loaded

Re: [R] Using vectors of names in calls for functions

2009-03-05 Thread hadley wickham
Hi Pascal, You need the aes_string function: V1_P2_plot<-function(df, x, y, z) { ggplot(df, aes_string(x = x, y= y, fill = z)) + geom_tile() } j<-c("k", "l") i<-"m" m<-rnorm(25) vsim<-cbind(expand.grid(k=1:5, l=1:5*10), m) V1_P2_plot(df=vsim, x=j[1], y=j[2], z=i) Hadley On Thu, Mar 5, 2

[R] AEA 2009 Conference

2009-03-05 Thread Christopher David Desjardins
Colleagues, I am apologize in advance if there is a more appropriate R mailing list for this announcement but this list seems to be the most relevant. I am a Topical Interest Group (TIG) leader for the Quantitative Methods: Theory and Design TIG of The American Evaluation Association. Each ye

Re: [R] dummy variable encoding

2009-03-05 Thread news
richard.cot...@hsl.gov.uk writes: > The best encoding depends upon which language you would like to manipulate > the variable in. In R, genders are most naturally represented as factors. > That means that in an external data source (like a spreadsheet of data), > you should ideally have the g

Re: [R] Inference for R Spam

2009-03-05 Thread Mark Difford
Hi Rolf, >> ... From the beginner's point of view it is useful to think of random >> variables ... Who, exactly, is the beginner ? And was not Sir R. A. Fisher pretty arrogant and fractious ? He also was highly dismissive of Sir Richard Doll's conclusion that smoking caused cancer (himself bei

Re: [R] Import the files.

2009-03-05 Thread Rowe, Brian Lee Yung (Portfolio Analytics)
I get the same error message when I do this: > read.table('NA',header=TRUE,stringsAsFactors=FALSE) Error in file(file, "r") : unable to open connection In addition: Warning message: In file(file, "r") : cannot open file 'NA', reason 'No such file or directory' I get this error when I call list.

[R] Using vectors of names in calls for functions

2009-03-05 Thread Pascal Boisson
Dear R people, it is a pleasure to try and use functionnalities that are in ggplot, even with my poor capacities in R. so far, i'dlike to be able to use these in my own function, and to "be able to use it repeatedly from vectors where I store the names of my columns." I have understood that this

Re: [R] Installing the Rstem package

2009-03-05 Thread Maria I. Tchalakova
Hello, thanks a lot for the replies. I've installed the binary for R-2.8.x available at: http://www.statistik.uni-dortmund.de/~ligges/Rstem_0.3-1.zip However, when I try using some of the functions, such as getStemLanguages() or wordStem(), I get: > getStemLanguages() Error: could not find funct

Re: [R] modifying a built in function from the stats package (fixing arima)

2009-03-05 Thread Mark Difford
Hi Marc, There is in fact an even shorter route: ?fix Regards, Mark. Rolf Turner-3 wrote: > > > On 5/03/2009, at 10:00 PM, Marc Vinyes wrote: > >> It is quite exagerated that I have to build R in order to modify an >> R file >> without messing with dlls, and I think it would be interestin

Re: [R] Import the files.

2009-03-05 Thread David Scott
On Thu, 5 Mar 2009, ling ling wrote: Dear all, I am a newcomer to R programming, I met the problem: I have a lot of .txt files in my directory. Firstly, I check whether the file satisfies the conditions: 1.empty 2.the "Rep" column of the file has no "useractivity_idle" or "useractivity_act"

Re: [R] 3D or 4D plot

2009-03-05 Thread Mike Prager
kapo coulibaly wrote: > I have data on a regular grid in the format: x y z data. I would like to > be able to plot them in 3d kind of like a volume or a mesh with colors. Is > that possible in R and how? > I've posted code for a 4-D plot here: http://addictedtor.free.fr/graphiques/RGraphGall

Re: [R] R on netbooks et al?

2009-03-05 Thread Liaw, Andy
From: Michael A. Miller Subject: Re: [R] R on netbooks et al? > > > "Jim" == Jim Lemon writes: > > > I've got R on my little EeePC as well. Great for most jobs > > and I highly recommend a DC/DC convertor for plugging into > > your car's cigarette lighter to get around the crap

Re: [R] Inference for R Spam

2009-03-05 Thread Rolf Turner
On 5/03/2009, at 8:48 PM, Wacek Kusnierczyk wrote: Rolf Turner wrote: Sports scores are random variables. You don't know a priori what the scores are going to be, do you? (Well, if you do, you must be able to make a *lot* of money betting on games!) After the game is over they aren't rando

Re: [R] RES: R on netbooks et al?

2009-03-05 Thread Warren Young
Leandro Marino wrote: I use it on an ASUS EEE 701 PC! It works with some limitation, because this model have only 512mb of RAM. But it is working fine. The OS is Windows XP. Ditto, except that I put Ubuntu Eee on my 701. (Since renamed "Easy Peasy" http://www.geteasypeasy.com/) A nice t

Re: [R] Installing the Rstem package

2009-03-05 Thread Prof Brian Ripley
I don't understand the last message either: the build environment has problems. a) There seem to be no Windows binaries on Omegahat for R > 2.7. b) A few are available from CRAN extras (one of the default repositories on Window), and I've added Rstem. So please try again now. On Thu, 5 Mar

Re: [R] preparing data for barplot()

2009-03-05 Thread Andrew Ziem
Hello Petr, Thank you. That works beautifully. I searched for a way to transpose a data frame, but you are right: barplot() wants a matrix. Andrew On Wed, Mar 4, 2009 at 1:49 AM, Petr PIKAL wrote: > Read what barplot does and look to your plot. > > If you want each row to be plotted as stack

Re: [R] modifying a built in function from the stats package (fixing arima)

2009-03-05 Thread Rolf Turner
On 5/03/2009, at 10:00 PM, Marc Vinyes wrote: It is quite exagerated that I have to build R in order to modify an R file without messing with dlls, and I think it would be interesting to make this process easier, but for now I'm happy to be productive again. There is probably (almost sure

[R] Using only one grid direction in filled.contour.

2009-03-05 Thread Todd Remund
I have a 3 dimensional plot using filled.contour. Normally the function provides a grid or wire plot with lines referencing the y and x axis values. Is there a way to use only one direction, say the y or x only? I'm not sure this helps, but it would be similar to plotting data in a 2 dimensi

Re: [R] How to dump plots as bas64 strings?

2009-03-05 Thread Gabor Grothendieck
On Thu, Mar 5, 2009 at 1:27 PM, Duncan Temple Lang wrote: > > > Patrick Meyer wrote: >> >> Here's the solution I'm using now, but it is not very "clean": >> >> png("out.png") >> plot(c(1,2,3)) >> dev.off() >> >> system("base64 -w0 out.png > out.base64") >> b64txt <- readLines(file("out.base64","rt

[R] Undirected to Directed Graph ( Clustering Based on Link Strength)

2009-03-05 Thread Sur Nathan
Hello All, I went through lot of searching for papers to do clustering on Co-Authroship.I ran SNA metrics on my Undirected Graph(betweenness,Closeness,Eigen Vector) using R. After running the sna Metrics I found important nodes and did clustering on those nodes based on Binding strength .This c

Re: [R] Installing the Rstem package

2009-03-05 Thread Uwe Ligges
Have you tried the binary for R-2.7.x available from http://www.omegahat.org/R/bin/windows/contrib/2.7/Rstem_0.3-1.zip which might or might not work for recent versions of R. Have you asked the Omegahat maintainer for an update of the (obviously quite outdated) Windows repositories? CCing now.

Re: [R] File checking problem

2009-03-05 Thread Barry Rowlingson
2009/3/5 ling ling : > > Dear all, > > I am a newcomer to R programming, I met the problem: > > I have a lot of .txt files in my directory. > > Firstly, I check whether the file satisfies the conditions: > 1.empty > 2.the "Rep" column of the file has no "useractivity_idle" or > "useractivity_act" >

Re: [R] Overriding contributed package functions

2009-03-05 Thread Prof Brian Ripley
The problem is that tsdiag is a generic (the same in both packages), and package TSA sets methods for it (and methods for classes in package stats which has already registered methods). stats:::tsdiag.Arima(model1) ought to work (it does for me in your example), but please take with up with

[R] File checking problem

2009-03-05 Thread ling ling
Dear all, I am a newcomer to R programming, I met the problem: I have a lot of .txt files in my directory. Firstly, I check whether the file satisfies the conditions: 1.empty 2.the "Rep" column of the file has no "useractivity_idle" or "useractivity_act" 3.even The "rep" has both of them, numb

[R] Installing the Rstem package

2009-03-05 Thread Maria I. Tchalakova
Hello, I am trying to install the Rstem package, but I have problems. I am using Windows XP and the 2.8.1 version of R. I have read the "Add-on packages" chapter of the "R Installation and Administration" manual, and also have tried several things, which worked for other people on the mailing list

Re: [R] How to dump plots as bas64 strings?

2009-03-05 Thread Duncan Temple Lang
Patrick Meyer wrote: Here's the solution I'm using now, but it is not very "clean": png("out.png") plot(c(1,2,3)) dev.off() system("base64 -w0 out.png > out.base64") b64txt <- readLines(file("out.base64","rt")) It would be nice to have an internal solution, even if this exactly does what I w

Re: [R] Error in var(x, na.rm = na.rm) : no complete element pairs

2009-03-05 Thread ml-r-help
Carlos Morales wrote: > Hello, > > I still have the same error which I have written in the Subject field, I > leave here the code and I hope you can help me with this: > [removed] the lengthy code example does not make it easier to help you, in particular without the data you used. All the com

Re: [R] R on netbooks et al?

2009-03-05 Thread chaogai
I'm having similar experiences on my Acer Aspire One. Everything will work good. Only thing that takes a lot of time is compiling R if you are in the habit of doing so. herrdittm...@yahoo.co.uk wrote: > Dear useRs, > > With the rise of netbooks and 'lifestyle laptops" I am tempted to get one of

Re: [R] Date conversion

2009-03-05 Thread Pele
Hi Uwe, You are correct - that was a type O (52) and thanks for you your suggestion that works.. Pele wrote: > > > > Hi R users, > > I have a factor variable called date as shown below: Can anyone share the > best / most efficient way to extract year and week (e.g. year = 2006, > week = 52

Re: [R] Sending an alert / email when R finished?

2009-03-05 Thread Gesmann, Markus
You could send a message to Twitter, see: http://finzi.psych.upenn.edu/R/Rhelp08/2009-February/187822.html Regards Markus -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Charles C. Berry Sent: 05 March 2009 17:03 To: nhawrylyshyn

Re: [R] Inference for R Spam

2009-03-05 Thread Michael A. Miller
> "Rolf" == Rolf Turner writes: > My impression --- and I could be wrong --- is that > physicists understanding of randomness is very narrow and > constrained. They tend to think along the lines of chaotic > dynamical systems (although perhaps not consciously; and > they

Re: [R] Overriding contributed package functions

2009-03-05 Thread Greg Snow
Have you tried using the pos argument in the library function to load the TSA package after the stats package? -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [ma

Re: [R] Date conversion

2009-03-05 Thread Sundar Dorai-Raj
Hi, There are possibly several ways to do this. My approach would be: dates <- strptime(as.character(DATE), "%d%b%Y") year <- dates$year + 1900 week <- floor(dates$yday/365 * 52) HTH, --sundar On Thu, Mar 5, 2009 at 8:58 AM, Pele wrote: > > Hi R users, > > I have a factor variable called date

Re: [R] Does R have function or method to finish my task?

2009-03-05 Thread Greg Snow
I think that the dynlm package was designed for just such a problem. I also would not be surprised if there are tools in the zoo package to do this. You should probably check out the time series task view on CRAN as well. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Cent

Re: [R] Date conversion

2009-03-05 Thread Uwe Ligges
Pele wrote: Hi R users, I have a factor variable called date as shown below: Can anyone share the best / most efficient way to extract year and week (e.g. year = 2006, week = 52 for first record, etc..)? My data set has 1 million records. DATE 11DEC2006 11SEP2006 01APR2007 02DEC2

Re: [R] a few scatter plots for a specific correlation value

2009-03-05 Thread Greg Snow
See the run.cor.examp function in the TeachingDemos package (in addition to the mvrnorm function in MASS). Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-p

Re: [R] missings

2009-03-05 Thread jim holtman
This seems to work fine without the na.strings. Can you include the data that you were reading: > x <- read.table(textConnection("1,2,3,4 + 5,,6,NA + ,7,NA,8 + ,,NA,9"), sep=',') > closeAllConnections() > x V1 V2 V3 V4 1 1 2 3 4 2 5 NA 6 NA 3 NA 7 NA 8 4 NA NA NA 9 On Thu, Mar 5, 200

Re: [R] including tabular information with a plot in R Graphics

2009-03-05 Thread Greg Snow
Also see the addtable2plot in the plotrix package. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of R User R U

[R] RV: help

2009-03-05 Thread Jani Lobo
Dear Sirs, I want to estimate the survival mean of a few specific teams. I'm trying to calculate it through a Kaplan Meier estimator. For doing so, I load the "survival" package and run the following instructions: "options(survfit.print.mean=TRUE)" allows showing the mea

Re: [R] R editor that will work with Rcmdr

2009-03-05 Thread John Fox
Dear John, If you tell me what you want to happen, I'll consider it when I next make substantial revisions to the package in the summer. I'm still sceptical about using the Rcmdr as a programming editor; among other things, it doesn't provide a true R console. Regards, John > -Original M

Re: [R] hatvalues?

2009-03-05 Thread John Fox
Dear Kevin, If you do the same regression as in the text then you'll get the same hat-values; the regression is the one on the top of p. 244: > mod <- lm(repwt ~ weight*sex, data=Davis) > max(hatvalues(mod)) [1] 0.7141856 As to making sense of the computations: > X <- model.matrix(mod) > head(X

[R] Import the files.

2009-03-05 Thread ling ling
Dear all, I am a newcomer to R programming, I met the problem: I have a lot of .txt files in my directory. Firstly, I check whether the file satisfies the conditions: 1.empty 2.the "Rep" column of the file has no "useractivity_idle" or "useractivity_act" 3.even The "rep" has both of them, numb

Re: [R] text at the upper left corner outside of the plot region

2009-03-05 Thread Greg Snow
In addition to the other responses that you have received, you can use the grconvertX and grconvertY functions to convert between the different coordinate systems, the upper left corner will be 0,1 in ndc (whole device/page), nfc (figure region), npc (plot region), or nic (inside the outer margi

[R] Date conversion

2009-03-05 Thread Pele
Hi R users, I have a factor variable called date as shown below: Can anyone share the best / most efficient way to extract year and week (e.g. year = 2006, week = 52 for first record, etc..)? My data set has 1 million records. DATE 11DEC2006 11SEP2006 01APR2007 02DEC2007 Thanks in

Re: [R] Sending an alert / email when R finished?

2009-03-05 Thread Charles C. Berry
On Thu, 5 Mar 2009, nhawrylyshyn wrote: Hi, Not sure if this is the best section to post it in. I'm doing lengthy runs on a 30GB data set - I would like to know if it is possible through any means for R to send an email / text message or anything when it has finished running a source file. An

[R] Overriding contributed package functions

2009-03-05 Thread Richard Saba
The "tsdiag" function in the TSA package overrides the "tsdiag" function in the "stats" package. There are a few annoying bugs in the TSA's version of the function so I would like to use the "stats" function but still have access to other TSA functions. I have tried using stats::tsdiag( ) but as

Re: [R] character string as object name

2009-03-05 Thread Wacek Kusnierczyk
Fuchs Ira wrote: > Can someone please tell me why the following (last line) doesn't work > (as I expect it to :-) > > library(quantmod) > a = getSymbols("MSFT",from="2009-3-01") > a > MSFT > eval(as.name(a)) > MSFT$MSFT.Adjusted > b=paste(a,'$MSFT.Adjusted',sep='') > b > eval(as.name(b)) > > Why do

Re: [R] identify() and postscript output

2009-03-05 Thread Michael Friendly
Prof Brian Ripley wrote: If instead, I use dev.copy2eps() after getting output to the screen, the point labels do not appear in the resulting .eps graph. Why? Is there a workaround? I don't think that is true: plot(1:10) identify(1:10) ## Click near points 6 and 7 dev.copy2eps("test.eps") a

Re: [R] character string as object name

2009-03-05 Thread Fuchs Ira
I thought that's what I had: > b [1] "MSFT$MSFT.Adjusted" > eval(as.name(b)) Error in eval(expr, envir, enclos) : object "MSFT$MSFT.Adjusted" not found However, Patrick's suggestion of eliminating the '$' gave me what I was looking for: > b=paste(a,'.Adjusted',sep='') > eval(as.name(a))[,b

Re: [R] programing for partial maximum likelihood for cox models with two covariate

2009-03-05 Thread David Winsemius
On Mar 5, 2009, at 10:08 AM, Kourosh Ks wrote: dears, I like two write a program with R to estimate the coefficients of covariate,I like two know the original program for this programing for partial maximum likelihood for cox models with two co variate. I did it with coxph command, >

[R] hatvalues?

2009-03-05 Thread rkevinburton
I am struiggling a bit with this function 'hatvalues'. I would like a little more undrestanding than taking the black-box and using the values. I looked at the Fortran source and it is quite opaque to me. So I am asking for some help in understanding the theory. First, I take the simplest case

Re: [R] R editor that will work with Rcmdr

2009-03-05 Thread John Fox
Dear Peter, I've resisted trying to make the script window a full-fledged editor but it's been moving in that direction (right-click context menu, line wrapping, etc). I don't think that the Ctext widget is currently provided via the tcltk package. I still think that people who want a real prog

[R] Boostrapping

2009-03-05 Thread march
Hi Everybody, I am trying to use the no parametric boostrapping methos to validate a logistic regression model. My idea is to randomly select the observations of a dataset and estimating the coefficients of the model for each random selection. Do you have any idea about that? Please, Let me k

[R] Sending an alert / email when R finished?

2009-03-05 Thread nhawrylyshyn
Hi, Not sure if this is the best section to post it in. I'm doing lengthy runs on a 30GB data set - I would like to know if it is possible through any means for R to send an email / text message or anything when it has finished running a source file. Any suggestions would be appreciated. Nick.

Re: [R] R editor that will work with Rcmdr

2009-03-05 Thread John Sorkin
Peter, I see that you do not think Rcmdr should be used to as a program editor for R code. I understand that modifying Rmcdr to make it an editor would be an enormous undertaking, nevertheless, having a program editor that works with Rcmdr would be a wonderful addition to what is already an outstan

[R] missings

2009-03-05 Thread kayj
I have a file where the missings are coded as NA or blank. how can I tell R to read the data set and to consider the missings NA or a blank. I tried the following data<-read.table("data.txt", sep='\t', header=T, na.strings=c("NA","")) is it correct? I am new to R and I am not sure if R is con

[R] Time Series - ARIMA differencing problem

2009-03-05 Thread thefurryblur
Hi, I have been using this website ( http://www.stat.pitt.edu/stoffer/tsa2/Rissues.htm http://www.stat.pitt.edu/stoffer/tsa2/Rissues.htm ) to help me to fit ARIMA models to my data. At the moment I have two possible methods to use. Method 1 If I use arima(ts.data, order=c(1,2,0), xreg=1:length(

[R] R 2.9.0 is scheduled for April 17

2009-03-05 Thread Peter Dalgaard
This is to announce that we plan to release R version 2.8.0 on Friday, April 17, 2009. Release procedures start Tuesday March 17. The detailed schedule can be found on http://developer.r-project.org The source tarballs will be made available daily (barring build troubles) and the tarballs can be

[R] ANOVA

2009-03-05 Thread kayj
Hi All, I have about one hundred patients and all the patients had their glucose measured on three different days. The days are all the same for all he patients. So I have three measurement for each patient . I want to know whether the day when the glucose was measured has an effect on the measu

Re: [R] dummy variable encoding

2009-03-05 Thread Richard . Cotton
>can anyone tell me why an encoding of 1/2 for a dummy variable for >two groups (e.g. gender) seems to be preferred over 0/1? >It's been bugging me for a while, 0/1 seems more natural, but I have >been told (without explanation) that 1/2 is better. Why? The best encoding depends up

Re: [R] R on netbooks et al?

2009-03-05 Thread Michael A. Miller
> "Jim" == Jim Lemon writes: > I've got R on my little EeePC as well. Great for most jobs > and I highly recommend a DC/DC convertor for plugging into > your car's cigarette lighter to get around the crap battery > problem. I run R on my Eee PC as well - no problems there. A

Re: [R] character string as object name

2009-03-05 Thread Patrick Burns
Does the first item on page 52 of 'The R Inferno' explain it for you? If not, can you give some hints about how to improve the explanation? Patrick Burns patr...@burns-stat.com +44 (0)20 8525 0696 http://www.burns-stat.com (home of "The R Inferno" and "A Guide for the Unwilling S User") Fuchs

[R] Does R have function or method to finish my task?

2009-03-05 Thread zhijie zhang
Dear all, Does R have function or method to finish the following task. Say i have a dataset. The response variable is Y, and the indepedent variables are X1, X2, X3, and YEAR. See an example. Y X1X2X3 X4YEAR 13.4 2.8 3.5

Re: [R] FW: flow control

2009-03-05 Thread Peter Dalgaard
William Dunlap wrote: >The help page for ?"for" says that: > >The index seq in a for loop is evaluated at the start of the loop; > changing >it subsequently does not affect the loop. The variable var has the > same type >as seq, and is read-only: assigning to it does not alter seq.

Re: [R] Fast Fourier Transform w.r.t. CreditRisk+

2009-03-05 Thread Carlos J. Gil Bellosta
Hello, You have a link on the subject here: http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1122844 The author has extra literature and code on the subject. Also, there was a thread in R-SIG-Finance list on the subject a few months ago. Best regards, Carlos J. Gil Bellosta http://www.data

[R] Time Series - ARIMA differencing problem

2009-03-05 Thread thefurryblur
Hi, I have been using this website ( http://www.stat.pitt.edu/stoffer/tsa2/Rissues.htm http://www.stat.pitt.edu/stoffer/tsa2/Rissues.htm ) to help me to fit ARIMA models to my data. At the moment I have two possible methods to use. Method 1 If I use arima(ts.data, order=c(1,2,0), xreg=1:length(t

Re: [R] character string as object name

2009-03-05 Thread Prof Brian Ripley
b is character string: as.name(b) `MSFT$MSFT.Adjusted` Note the backticks: that is a valid (if non-syntatatic) name, but you don't have an object of that name. On Thu, 5 Mar 2009, Fuchs Ira wrote: Can someone please tell me why the following (last line) doesn't work (as I expect it to :-)

Re: [R] Fast Fourier Transform w.r.t. CreditRisk+

2009-03-05 Thread stephen sefick
schmway and morgan time series analysis with R examples is a good intro to fourier analysis. Also there are probably references in the help for ?fft Stephen On Thu, Mar 5, 2009 at 5:48 AM, Maithili Shiva wrote: > > Dear R Helpers, > > Is there any literaure available (including R code) on Fast

[R] character string as object name

2009-03-05 Thread Fuchs Ira
Can someone please tell me why the following (last line) doesn't work (as I expect it to :-) library(quantmod) a = getSymbols("MSFT",from="2009-3-01") a MSFT eval(as.name(a)) MSFT$MSFT.Adjusted b=paste(a,'$MSFT.Adjusted',sep='') b eval(as.name(b)) Why does this last line not work the way the e

[R] programing for partial maximum likelihood for cox models with two covariate

2009-03-05 Thread Kourosh Ks
dears, I like two write a program with R to estimate the coefficients of covariate,I like two know the original program for this programing for partial maximum likelihood for cox models with two co variate. I did it with coxph command, thanks [[alternative HTML version deleted

Re: [R] identify() and postscript output

2009-03-05 Thread David Winsemius
From the help page: "Details identify is a generic function, and only the default method is described here. identify is only supported on screen devices such as X11, windows and quartz. On other devices the call will do nothing." Why not collect the specifics of the identified points and t

[R] dummy variable encoding

2009-03-05 Thread news
Hi, can anyone tell me why an encoding of 1/2 for a dummy variable for two groups (e.g. gender) seems to be preferred over 0/1? It's been bugging me for a while, 0/1 seems more natural, but I have been told (without explanation) that 1/2 is better. Why? -- aleblanc __

Re: [R] dividing ts objects of different frequencies

2009-03-05 Thread Jeffrey J. Hallman
"Stephen J. Barr" writes: > I have two time series (ts) objects, 1 is yearly (population) and the > other is quarterly (bankruptcy statistics). I would like to produce a > quarterly time series object that consists of bankruptcy/population. > Is there a pre-built function to intelligently divide t

[R] RES: R on netbooks et al?

2009-03-05 Thread Leandro Marino
I use it on an ASUS EEE 701 PC! It works with some limitation, because this model have only 512mb of RAM. But it is working fine. The OS is Windows XP. I think that the better netbooks is one from HP, this netbook have an normal keyboard. Atenciosamente, Leandro Lins Marino Centro de Avaliação

Re: [R] Odp: nice way to find or not a value (problem with numeric(0))

2009-03-05 Thread Ptit_Bleu
Hello Petr, In fact spec is data.frame with a column called code (containing numerical values) and some other columns called data1, data2, ... containing data for each equipment (that is for each code). But I don't have the data for all my devices. It means that some 'code' are not in spec$Code.

  1   2   >