[R] xyplot question

2009-06-30 Thread jlfmssm
I have a data set like this ID=c("A","A","A","A","A","A","A","B","B","B","B","B","B","B") s=c(1.1,2.2,1.3,1.1,3.1,4.1,4.2,1.1,2.2,1.3,1.1,3.1,4.1,4.2) d=c(1,2,3,4,5,6,7,1,2,3,4,5,6,7) t=c(-3,-2,-1,0,1,2,3,-3,-2,-1,0,1,2,3) mydata<-data.frame(cbind(as.character(ID),as.numeric(s),as.integer(d),as.

Re: [R] garchFit in fGarch fitted values are all the same

2009-06-30 Thread Liviu Andronic
Hello, On 7/1/09, Ron Burns wrote: > In trying to fit garch models in above environment. I am getting > "reasonable" fitted coefficients, but the fitobj...@fitted are all the > same. This is true even for the help page example: > There is a better chance of getting good answers if asking finan

Re: [R] hierarchical clustering - variable selection

2009-06-30 Thread Dylan Beaudette
varclust() in the Hmisc package might be what you are looking for. Dylan On Tue, Jun 30, 2009 at 7:27 PM, wrote: > > Hi List, > > I am looking for a procedure that allows selection of variables in a > clustering attempt. > > Specifically I am searching for a way of selecting out noise variables

Re: [R] difference between "names", "colnames" and "dimnames"

2009-06-30 Thread jim holtman
You should be doing colnames(tester) <- c("uno","dos","tres","cuatro","cinco","seis","siete","ocho") On Tue, Jun 30, 2009 at 7:08 PM, Germán Bonilla wrote: > Hi all... > > I built a matrix binding vectors with rbind, and have something like this: > >[,1] [,2][,3] [,4] [,

Re: [R] Clearing out or reclaiming memory

2009-06-30 Thread gug
Thanks to everyone who has posted. These posts have really helped me to budge forward my understanding of R, as well as giving me a couple of new areas that I still need to work on. These (below) won't be news to the people who have posted, but for anyone who is in my position, here are a couple

[R] xemacs and ess: keyboard shortcut for sending line to R

2009-06-30 Thread Christopher W. Ryan
running R 2.9.1 on Windows XP. Formerly used Tinn-R but it has been acting strangely lately and I haven't been able to fix it, so I am trying to learn ESS. I have Xemacs 21.4.19. I have ESS configured, I think, as per John Fox: An Introduction to ESS + XEmacs for Windows Users of R John Fox McMas

Re: [R] running count in data.frame

2009-06-30 Thread jim holtman
Not exactly sure what you want to count. Does this do what you want (made a change in RunningCount) > AddCols = function (MyFrame) { +MyFrame$p<-0 +MyFrame$l<-0 +MyFrame$pc<-0 +MyFrame$lc<-0 +return(MyFrame) + } > > BinPosNeg = function (MyFrame) { + + ## P

[R] running count in data.frame

2009-06-30 Thread Mark Knecht
Hi, I need to keep a running count of events that have happened in my data.frame. I found a document called usingR that had an example of doing this for random coin flips and I tried to modify it. It seems to sort of work in the beginning, but then it stops and I don't understand why. I'm trying

[R] probit with sample selection error?

2009-06-30 Thread jun ki chang
Deal all: i want to do the probit with sample selection estimation, the following is my code: probit with sample selection can be done by stata :heckprob The heckprobll is the likelihood function shown in W.H. Greene 5th p714 ¡´ The question is the convergence is very slow compare with Stata

[R] hierarchical clustering - variable selection

2009-06-30 Thread Alexander.Herr
Hi List, I am looking for a procedure that allows selection of variables in a clustering attempt. Specifically I am searching for a way of selecting out noise variables from a set of numeric/categorical variables (or of course selecting "non-noise" variables). The procedure should work wit

Re: [R] odfWeave : problems with odfInsertPlot() and odfFigureCaption()

2009-06-30 Thread Max Kuhn
Well, on this one, I might bring my record down to commercial software bug fix time lines... > I have trouble using odfInsertPlot to insert plots outside fig=TRUE > chunks. > > My goal is to dump a bunch of (relatively uninteresting, but required) > graphs from within a loop, possibly interspeded

[R] number of iterations exceeded maximum of 50 using profile

2009-06-30 Thread KENNETH R CABRERA
Hi R users and experts: I got the following message when I use the profile function on a nls models. The nls function converges at 19 interactions, but I don't know what I am doing wrong using the "profile" function. "Error en prof$getProfile() : number of iterations exceeded maximu

Re: [R] How to get best performance from R on Linux?

2009-06-30 Thread Dirk Eddelbuettel
Rainer, On 30 June 2009 at 14:30, Rainer M Krug wrote: | following a discussion on difference in speed of R between R and Linux, I am | wondering: is there a howto to get the most (concerning speed) out of R? I | am not talking about vectorisation and techniques in doing the analysis, but | what

Re: [R] How do I change which R Graphics Device is active?

2009-06-30 Thread hadley wickham
On Tue, Jun 30, 2009 at 2:12 PM, Barry Rowlingson wrote: > On Tue, Jun 30, 2009 at 8:05 PM, Mark Knecht wrote: > >> You could wrap it in a function of your own making, right? >> >> AddNewDev = function() {dev.new();AddNewDev=dev.cur()} >> >> histPlot=AddNewDev() >> >> Seems to work. > >  You leaRn

Re: [R] symbols duplicated in plot output

2009-06-30 Thread Paul Murrell
Hi It is indeed a bug. Should have a fix soon. Thanks for the report! Paul baptiste auguie wrote: Thanks for the info. It does look like a bug to me, but it's always best to try and identify the cause before facing the challenge of a legitimate bug submission. On Mac OS (same info as my fir

Re: [R] system function question

2009-06-30 Thread Thomas Lumley
On Tue, 30 Jun 2009, Erin Hodgess wrote: Dear R People: Does the system function return a code, (maybe zero if ok, non-zero otherwise), please? Let's see a<-system("ls") str(a) int 0 a<-system("ls foo") ls: foo: No such file or directory str(a) int 256 Sure looks like it. And the h

[R] quwstion about elrm package for Exact Logistic Regrassion

2009-06-30 Thread Masoud
Hi I am a new R user and I did try elrm package to do Exact Logistic regression for my dataset ( about 170 patients with a binary dependent variable against age and 6 other binary covariates), I did not have n column because it was about individuals, I made n column with 1 for each individual, h

Re: [R] system function question

2009-06-30 Thread Uwe Ligges
Erin Hodgess wrote: Dear R People: Does the system function return a code, (maybe zero if ok, non-zero otherwise), please? Dear Erin, it depends on its arguments and the OS. See the "value" section of ?system. Best, Uwe Thanks, Erin __

Re: [R] Using functions to change values in a data.frame

2009-06-30 Thread Duncan Murdoch
On 30/06/2009 7:13 PM, Mark Knecht wrote: On Tue, Jun 30, 2009 at 3:57 PM, Duncan Murdoch wrote: On 30/06/2009 6:47 PM, Mark Knecht wrote: I'm having trouble with something that looks easy. (And I'm sure it will be easier within about 1 minute of receiving my first response.) Thanks in advance.

Re: [R] Using functions to change values in a data.frame

2009-06-30 Thread Mark Knecht
On Tue, Jun 30, 2009 at 3:57 PM, Duncan Murdoch wrote: > On 30/06/2009 6:47 PM, Mark Knecht wrote: >> >> I'm having trouble with something that looks easy. (And I'm sure it >> will be easier within about 1 minute of receiving my first response.) >> Thanks in advance. >> >> I have a collection of da

[R] difference between "names", "colnames" and "dimnames"

2009-06-30 Thread Germán Bonilla
Hi all... I built a matrix binding vectors with rbind, and have something like this: [,1] [,2][,3] [,4] [,5] [,6] [,7] [,8] CLS 3.877328 4.087636 4.72089 4.038361 3.402942 2.786285 2.671222 3.276419 ORD NaN NaN NaN NaN 5.770780 5.901113 11.

[R] garchFit in fGarch fitted values are all the same

2009-06-30 Thread Ron Burns
Dear all- Package /fGarch/ version 2100.78 in R version 2.8.1 (2008-12-22) running on linux 2.6.22.9-91.fc7 In trying to fit garch models in above environment. I am getting "reasonable" fitted coefficients, but the fitobj...@fitted are all the same. This is true even for the help page example

Re: [R] Using functions to change values in a data.frame

2009-06-30 Thread Duncan Murdoch
On 30/06/2009 6:47 PM, Mark Knecht wrote: I'm having trouble with something that looks easy. (And I'm sure it will be easier within about 1 minute of receiving my first response.) Thanks in advance. I have a collection of data frames that I need to add columns, do some calculations and then fill

Re: [R] Using functions to change values in a data.frame

2009-06-30 Thread Uwe Ligges
Mark Knecht wrote: I'm having trouble with something that looks easy. (And I'm sure it will be easier within about 1 minute of receiving my first response.) Thanks in advance. I have a collection of data frames that I need to add columns, do some calculations and then fill in the new columns.

[R] system function question

2009-06-30 Thread Erin Hodgess
Dear R People: Does the system function return a code, (maybe zero if ok, non-zero otherwise), please? Thanks, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodg...@gmail.com _

[R] Using functions to change values in a data.frame

2009-06-30 Thread Mark Knecht
I'm having trouble with something that looks easy. (And I'm sure it will be easier within about 1 minute of receiving my first response.) Thanks in advance. I have a collection of data frames that I need to add columns, do some calculations and then fill in the new columns. Since I have a large nu

Re: [R] Problem in R with TCL 8.4

2009-06-30 Thread Uwe Ligges
Which R, which OS, which affylmGUI (which prety much sounds like BioConductor) version, ..??? If this is R-2.9.1 under Windows: It ships with tcl85.dll, hence there might be some side effects of your additional tcl 8.4 installation. But hard to guess without seeing more details of you syst

Re: [R] beadarray package

2009-06-30 Thread Uwe Ligges
Vallejo, Roger wrote: Dear R users, I am using the beadarray package. I am trying to upload raw bead-level data using these commands: "beadarray" is a BioConductor package. You may want to report it again on the BioC mailing list, perhaps with some *reproducible* example... Best, Uwe Lig

Re: [R] NaiveBayes fails with one input variable (caret and klarR packages)

2009-06-30 Thread Emmanuel Charpentier
Le mardi 30 juin 2009 à 14:51 -0400, Max a écrit : > I just put a new version on cran... Now, *that's* support !!! bug report at 17:31, acknowledgement at 20:12, (probable) bug fix at 20:51. Bravo, bravissimo, Max ! Try that, SAS support ! Emmanuel Charpen

Re: [R] odd behaviour in quantreg::rq

2009-06-30 Thread roger koenker
Admittedly this seemed quite peculiar but if you look at the entrails of the following code you will see that with the weights the first and second levels of your x$method variable have the same (weighted) median so the contrast that you are estimating SHOULD be zero. Perhaps there is some

[R] odfWeave : problems with odfInsertPlot() and odfFigureCaption()

2009-06-30 Thread Emmanuel Charpentier
Dear Max, dear list, I have trouble using odfInsertPlot to insert plots outside fig=TRUE chunks. My goal is to dump a bunch of (relatively uninteresting, but required) graphs from within a loop, possibly interspeded with some tables. This is not possible within a normal fig=TRUE chunk. odfInsert

Re: [R] NaiveBayes fails with one input variable (caret and klarR packages)

2009-06-30 Thread Uwe Ligges
Damian Krstajic wrote: Hello, We have a system which creates thousands of regression/classification models and in cases where we have only one input variable NaiveBayes throws an error. Maybe I am mistaken and I shouldn't expect to have a model with only one input variable. We use R versi

Re: [R] Question about creating lists with functions as elements

2009-06-30 Thread Greg Snow
Craig, There is an R package called fortunes that contains many quotes from the mailing list and other sources that are humorous, insightful, or profound. Much can be learned by browsing these fortunes (and entertainment as well). Rolf has just nominated your quote to be forever enshrined wit

Re: [R] fitting in logistic model

2009-06-30 Thread Marc Schwartz
On Jun 30, 2009, at 2:12 PM, Marc Schwartz wrote: Wellbarring a correction from someone with more low level insight, I would tend to suspect that the difference in our findings may be attributed to some interaction of hardware, OS, compiler and BLAS, perhaps weighted more to the latt

Re: [R] Question about creating lists with functions as elements

2009-06-30 Thread Duncan Murdoch
On 30/06/2009 5:11 PM, Craig P. Pyrame wrote: Dear Rolf, What do you mean? He was talking about the fortunes package. Install it, type fortune(), and you'll get a fortune cookie message. Maybe one with your name on it. Duncan Murdoch Best regards, Craig Rolf Turner wrote: On 1/07/200

Re: [R] Interaction plots (six on one page)

2009-06-30 Thread jim holtman
add par(mar=c(2.5,4,1,1)) just after layout On Tue, Jun 30, 2009 at 4:20 PM, wrote: > #Dear R users, > #I want six interaction plots to be on one page, > #but the following problem occurs: the legend "BMIakt" appears, > #but it is exactly on the border of the plots (too far right). > #My s

Re: [R] Question about creating lists with functions as elements

2009-06-30 Thread Craig P. Pyrame
Dear Rolf, What do you mean? Best regards, Craig Rolf Turner wrote: On 1/07/2009, at 12:34 AM, Craig P. Pyrame wrote: ... it's probably not a good idea to submit bug reports just because I misunderstand what R does. Gotta be a fortune!!! cheers, Rolf ##

[R] Installing MCMCpack on Solaris 10 X86

2009-06-30 Thread Sul, Young L
Hi, I've been having problems getting MCMCpack installed on my Solaris 10 x86 system. I've installed gcc from opencsw.org, and, for the most part, other R packages install nicely. >From what I can gather, the build fails due to a mismatch of include files. I >*think* it wants to use the includ

[R] odd behaviour in quantreg::rq

2009-06-30 Thread Dylan Beaudette
Hi, I am trying to use quantile regression to perform weighted-comparisons of the median across groups. This works most of the time, however I am seeing some odd output in summary(rq()): Call: rq(formula = sand ~ method, tau = 0.5, data = x, weights = area_fraction) Coefficients:

Re: [R] How to pass parameters to htmlParse Bank of Canada html pages

2009-06-30 Thread Barry Rowlingson
On Tue, Jun 30, 2009 at 9:32 PM, wrote: > To get USDCAD rates from Bank of Canada, we first go > > url <- "http://banqueducanada.ca/en/rates/exchange-avg.html"; > > select 12 months for Rates for the past and click "Get Rates" button. Then > the page moves to > > address <- "http://banqueducanada.

[R] How to pass parameters to htmlParse Bank of Canada html pages

2009-06-30 Thread guox
To get USDCAD rates from Bank of Canada, we first go url <- "http://banqueducanada.ca/en/rates/exchange-avg.html"; select 12 months for Rates for the past and click "Get Rates" button. Then the page moves to address <- "http://banqueducanada.ca/cgi-bin/famecgi_fdps"; and the rates show in the h

Re: [R] Equivalent to Matlab's "Ans"

2009-06-30 Thread Stephane Reissfelder
Thanks a lot for all your answers 2009/6/30 Liaw, Andy > Something like this? > > R> mean(rnorm(100)) > [1] -0.0095774 > R> .Last.value > [1] -0.0095774 > > Andy > > > -Original Message- > > From: r-help-boun...@r-project.org > > [mailto:r-help-boun...@r-project.org] On Behalf Of Stephan

Re: [R] How to wrap my (working) code in a loop or function? (loop/function newbie alert)

2009-06-30 Thread jim holtman
Something like this where you use lapply to pass in each element of the list to a function and then rbind the result: datalist <- split(data,data$UNIT) result <- lapply(datalist, function(.unit){ t0<-match(times$START_DT, .unit$DATETIME) #MAKE A VECTOR OF START TIMES t1<-match(times$STOP_D

[R] Interaction plots (six on one page)

2009-06-30 Thread ukoenig
#Dear R users, #I want six interaction plots to be on one page, #but the following problem occurs: the legend "BMIakt" appears, #but it is exactly on the border of the plots (too far right). #My seccond question is, how I can reduce the empty space in the y-direction #between the plots. #Please h

[R] How to wrap my (working) code in a loop or function? (loop/function newbie alert)

2009-06-30 Thread Mark Na
Dear R-helpers, I have split a dataframe into a list with five elements, with the following code: > datalist<-split(data,data$UNIT) I would now like to run some code (below) on each element of the list to extract rows from the list elements; then I would like to rbind the extracted rows into a n

Re: [R] Equivalent to Matlab's "Ans"

2009-06-30 Thread Hans W. Borchers
There is a discussion on this topic under the heading "A shorter version of .Last.value" on July 7, 2008, see for example http://www.nabble.com/A-shorter-version-of-%22.Last.value%22--to18322831.html#a18322831 --Hans Werner Stephane-18 wrote: > > Hi everyone, > I was just wondering if there i

Re: [R] Question about creating lists with functions as elements

2009-06-30 Thread Rolf Turner
On 1/07/2009, at 12:34 AM, Craig P. Pyrame wrote: ... it's probably not a good idea to submit bug reports just because I misunderstand what R does. Gotta be a fortune!!! cheers, Rolf ## Attention:\

Re: [R] (no subject)

2009-06-30 Thread jim holtman
I assume that when you read in the data, you assigned it to an object; e.g., myData <- read.table("yourFile") you can then plot a histogram by: hist(myData$V1) you may need to reread "Introduction to R" that comes with the software. On Tue, Jun 30, 2009 at 6:34 AM, maram salem wrote: > Hi Gr

[R] dbWriteTable in loop

2009-06-30 Thread jasmine1958
Hi, I have to write the results of a loop in a database, and I'm using dbWriteTable(con, "output", data). Is it possible to use something like for(i in 1:n) ... tmp <- sprintf("output%s", i) dbWriteTable(con, tmp, dati) to write in the database each table produced by each run of the loop? if

Re: [R] NaiveBayes fails with one input variable (caret and klarR packages)

2009-06-30 Thread Max
I just put a new version on cran... On 6/30/09 2:12 PM, "Max Kuhn" wrote: > I'm figuring this out now and I'll let you know when it is resolved... > > On Tue, Jun 30, 2009 at 11:31 AM, Damian Krstajic > wrote: >> >> Hello, >> >> We have a system which creates thousands of regression/classifi

Re: [R] fitting in logistic model

2009-06-30 Thread Marc Schwartz
On Jun 30, 2009, at 12:54 PM, Ted Harding wrote: On 30-Jun-09 17:41:20, Marc Schwartz wrote: On Jun 30, 2009, at 10:44 AM, Ted Harding wrote: On 30-Jun-09 14:52:20, Marc Schwartz wrote: On Jun 30, 2009, at 4:54 AM, Renzi Fabrizio wrote: I would like to know how R computes the probability

Re: [R] How do I change which R Graphics Device is active?

2009-06-30 Thread Mark Knecht
Oops sorry. Thanks BARRY! On Tue, Jun 30, 2009 at 12:14 PM, Mark Knecht wrote: > On Tue, Jun 30, 2009 at 12:12 PM, Barry > Rowlingson wrote: >> On Tue, Jun 30, 2009 at 8:05 PM, Mark Knecht wrote: >> >>> You could wrap it in a function of your own making, right? >>> >>> AddNewDev = function() {dev.

Re: [R] How do I change which R Graphics Device is active?

2009-06-30 Thread Mark Knecht
On Tue, Jun 30, 2009 at 12:12 PM, Barry Rowlingson wrote: > On Tue, Jun 30, 2009 at 8:05 PM, Mark Knecht wrote: > >> You could wrap it in a function of your own making, right? >> >> AddNewDev = function() {dev.new();AddNewDev=dev.cur()} >> >> histPlot=AddNewDev() >> >> Seems to work. > >  You leaRn

Re: [R] How do I change which R Graphics Device is active?

2009-06-30 Thread Barry Rowlingson
On Tue, Jun 30, 2009 at 8:05 PM, Mark Knecht wrote: > You could wrap it in a function of your own making, right? > > AddNewDev = function() {dev.new();AddNewDev=dev.cur()} > > histPlot=AddNewDev() > > Seems to work. You leaRn fast :) Probably better style is: newDev = function(){dev.new();retu

Re: [R] R version-2.9.1 for Linux

2009-06-30 Thread Mark Knecht
On Mon, Jun 29, 2009 at 11:20 PM, utkarshsinghal wrote: > Hi All, > > I am currently using R version 2.8.1 on linux cent os 4.4 (i386) and > want to upgrade to version 2.9.1. It seems to me that version-2.9.1 is > it not for my OS. > Am I right? > > > Regards > Utkarsh > Build it from source? Che

Re: [R] How do I change which R Graphics Device is active?

2009-06-30 Thread Mark Knecht
On Tue, Jun 30, 2009 at 11:45 AM, Barry Rowlingson wrote: > On Tue, Jun 30, 2009 at 6:33 PM, Ted > Harding wrote: > >> Barry, spot on! If there were a prize for postings with >> simplicity, clarity, conciseness and usability, I would nominate >> yours (especially in the "Why didn't *I* think of tha

[R] R version-2.9.1 for Linux

2009-06-30 Thread R P Herrold
On Tue, 30 Jun 2009, utkarshsinghal wrote: I am currently using R version 2.8.1 on linux cent os 4.4 (i386) and want to upgrade to version 2.9.1. It seems to me that version-2.9.1 is it not for my OS. Am I right? CentOS 4.4 is quite old at this point ... The following Build Requirements for

Re: [R] Equivalent to Matlab's "Ans"

2009-06-30 Thread Liaw, Andy
Something like this? R> mean(rnorm(100)) [1] -0.0095774 R> .Last.value [1] -0.0095774 Andy > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Stephane > Sent: Tuesday, June 30, 2009 2:07 PM > To: r-help@r-project.org > Subject

Re: [R] How do I change which R Graphics Device is active?

2009-06-30 Thread Barry Rowlingson
On Tue, Jun 30, 2009 at 6:33 PM, Ted Harding wrote: > Barry, spot on! If there were a prize for postings with > simplicity, clarity, conciseness and usability, I would nominate > yours (especially in the "Why didn't *I* think of that?" category). Thanks Ted! It's just a shame dev.new() doesn't

Re: [R] conditional coloring of output text in console or in GUI

2009-06-30 Thread Liviu Andronic
Hello, On 6/30/09, Christopher W. Ryan wrote: > suppose I have some logical vector > > x <- as.logical(c(0,0,0,1,0,0,1,1,0)) > x > > How would I make the words TRUE appear on the screen in a different > color from the words FALSE? > I believe xterm256 would help with this, and perhaps highlig

Re: [R] sampling quadrats of increasing size in a list of matrices

2009-06-30 Thread Chris Stubben
Jens Oldeland wrote: > > I am looking for a solution on how to sample increasing sizes of > "quadrats" in a list of matrices. Each matrix is a binary raster map and > I want to know if there is a 1 or only 0 s in the sampling unit > (quadrat, e.g. 4x4 cells). > You could just use a few lo

Re: [R] NaiveBayes fails with one input variable (caret and klarR packages)

2009-06-30 Thread Max Kuhn
I'm figuring this out now and I'll let you know when it is resolved... On Tue, Jun 30, 2009 at 11:31 AM, Damian Krstajic wrote: > > Hello, > > We have a system which creates thousands of regression/classification models > and in cases where we have only one input variable  NaiveBayes throws an >

[R] Equivalent to Matlab's "Ans"

2009-06-30 Thread Stephane
Hi everyone, I was just wondering if there is an equivalent in R to the shortcut "Ans" in MatLab whereby I can use the previous result for the current command? This could save a lot of time when hacking in R itself, not from an editor. Thanks, Stephane [[alternative HTML version deleted]]

Re: [R] fitting in logistic model

2009-06-30 Thread Ted Harding
On 30-Jun-09 17:41:20, Marc Schwartz wrote: > On Jun 30, 2009, at 10:44 AM, Ted Harding wrote: > >> >> On 30-Jun-09 14:52:20, Marc Schwartz wrote: >>> On Jun 30, 2009, at 4:54 AM, Renzi Fabrizio wrote: >>> I would like to know how R computes the probability of an event in a logistic mod

Re: [R] How do I change which R Graphics Device is active?

2009-06-30 Thread Mark Knecht
On Tue, Jun 30, 2009 at 9:48 AM, Barry Rowlingson wrote: > On Tue, Jun 30, 2009 at 5:15 PM, milton ruser wrote: >> How about: >> >> dev.cur() >> dev.list() >> dev.next(which = dev.cur()) >> dev.prev(which = dev.cur()) >> dev.off(which = dev.cur()) >> dev.set(which = dev.next()) >> dev.new(...) >> g

Re: [R] fitting in logistic model

2009-06-30 Thread Marc Schwartz
On Jun 30, 2009, at 10:44 AM, Ted Harding wrote: On 30-Jun-09 14:52:20, Marc Schwartz wrote: On Jun 30, 2009, at 4:54 AM, Renzi Fabrizio wrote: I would like to know how R computes the probability of an event in a logistic model (P(y=1)) from the score s, linear combination of x and beta. I

Re: [R] Sweave: multiline Sexpr?

2009-06-30 Thread David Huffer
Duncan, it's the first example you provide that I'm looking to do. These Sexpr quickly exceed 80 columns and I was wanting to make them more readable in the latex code by blocking and indenting the R code. Dieter suggests putting the R code into a code block then Sexpr-ing that object. That seems

Re: [R] How do I change which R Graphics Device is active?

2009-06-30 Thread Ted Harding
On 30-Jun-09 16:48:15, Barry Rowlingson wrote: > To keep track, call dev.cur() after creating a new plot > and assign it to something memorable. Here's how to keep > a histogram and an xy plot: > >> dev.new();histPlot = dev.cur() >> dev.new();xyPlot = dev.cur() >> dev.set(histPlot);hist(runif(100)

[R] conditional coloring of output text in console or in GUI

2009-06-30 Thread Christopher W. Ryan
suppose I have some logical vector x <- as.logical(c(0,0,0,1,0,0,1,1,0)) x How would I make the words TRUE appear on the screen in a different color from the words FALSE? Thanks. --Chris -- Christopher W. Ryan, MD SUNY Upstate Medical University Clinical Campus at Binghamton 40 Arch Street, Jo

Re: [R] Large Stata file Import in R

2009-06-30 Thread Thomas Lumley
On Tue, 30 Jun 2009, Xavier wrote: saurav pathak vas escriure el dia dl, 29 jun 2009: Hi I am using Stata 10 and I need to import a data set in stata 10 to R, I have saved the dataset in lower versions of Stata as well by using saveold command in Stata. My RAM is 4gb and the stata file is 60

[R] beadarray package

2009-06-30 Thread Vallejo, Roger
Dear R users, I am using the beadarray package. I am trying to upload raw bead-level data using these commands: library(beadarray) datadir <- ("C:/Computer_programs/R/beadarray/cecilia") targets = read.table("targets.txt", sep = "\t", he

Re: [R] Sweave: multiline Sexpr?

2009-06-30 Thread Dieter Menne
HufferD wrote: > > Is there any way to have Sexpr span multiple lines? > > Use an R block to create the output as as string, and Sexpr that one. It's anyway much more readable than to hide complex calculations in the latex part. Dieter -- View this message in context: http://www.nabble.c

Re: [R] Sweave: multiline Sexpr?

2009-06-30 Thread Duncan Murdoch
On 30/06/2009 12:44 PM, David Huffer wrote: Is there any way to have Sexpr span multiple lines? For input or output? I.e. do you want \Sexpr{x + y} or do you want the value to display on multiple lines? I think you can't do the first. To do the second, returning a character value with an

[R] grep on vectors?

2009-06-30 Thread Chuck White
Input: dataframe with 300+columns for a regression. It consists of sets of factors whose names have the same structure. For example, aa1,aa2,aa3 could be one set of factors. After reading in the dataframe, I would like to compute the density (%nonzeroes) for certain groups of factors and delete

Re: [R] How do I change which R Graphics Device is active?

2009-06-30 Thread Barry Rowlingson
On Tue, Jun 30, 2009 at 5:15 PM, milton ruser wrote: > How about: > > dev.cur() > dev.list() > dev.next(which = dev.cur()) > dev.prev(which = dev.cur()) > dev.off(which = dev.cur()) > dev.set(which = dev.next()) > dev.new(...) > graphics.off() > dev.cur() > dev.list() > dev.next(which = dev.cur())

Re: [R] Large Stata file Import in R

2009-06-30 Thread Xavier
saurav pathak vas escriure el dia dl, 29 jun 2009: > Hi > > I am using Stata 10 and I need to import a data set in stata 10 to R, I have > saved the dataset in lower versions of Stata as well by using saveold > command in Stata. > > My RAM is 4gb and the stata file is 600MB, I am getting an erro

[R] Sweave: multiline Sexpr?

2009-06-30 Thread David Huffer
Is there any way to have Sexpr span multiple lines? -- David   - David Huffer, Ph.D. Senior Statistician CSOSA/Washington, DC david.huf...@csosa.gov - __

Re: [R] Using regular expressions to detect clusters of consonants in a string

2009-06-30 Thread Gabor Grothendieck
Try this: library(gsubfn) s <- "mystring" strapply(s, "[bcdfghjklmnpqrstvwxyz]+", nchar)[[1]] which returns a vector of consonant string lengths. Now apply your algorithm to that. See http://gsubfn.googlecode.com for more. On Tue, Jun 30, 2009 at 11:30 AM, Mark Heckmann wrote: > Hi, > > I want t

[R] Multiple of independet Anova without loop?

2009-06-30 Thread Sungeun Kim
Hello All, I have one question about how to speed up my calculation: I have multiple independent observations and would like to perform Anova with type 3 sum of square. For this, I also have 2 factors and 3 covariates and want to see the main effects of 2 factors and the interaction on each of t

Re: [R] Using regular expressions to detect clusters of consonants in a string

2009-06-30 Thread Greg Hirson
Mark, "Abstraction" also has a valid two consonant cluster ("ct"). Some logic could be added to reject words that have valid twos if they also have longer strings of consonants. This may work as a starting off point, using strsplit: twocons = function(word){ chars = strsplit(word, "[aeiou

Re: [R] How do I change which R Graphics Device is active?

2009-06-30 Thread Mark Knecht
Thanks milton! Beautiful! Cheers, Mark On Tue, Jun 30, 2009 at 9:15 AM, milton ruser wrote: > How about: > > dev.cur() > dev.list() > dev.next(which = dev.cur()) > dev.prev(which = dev.cur()) > dev.off(which = dev.cur()) > dev.set(which = dev.next()) > dev.new(...) > graphics.off() > dev.cur() >

Re: [R] How do I change which R Graphics Device is active?

2009-06-30 Thread milton ruser
How about: dev.cur() dev.list() dev.next(which = dev.cur()) dev.prev(which = dev.cur()) dev.off(which = dev.cur()) dev.set(which = dev.next()) dev.new(...) graphics.off() dev.cur() dev.list() dev.next(which = dev.cur()) dev.prev(which = dev.cur()) dev.off(which = dev.cur()) dev.set(which = dev.nex

Re: [R] Stata file and R Interaction :File Size Problem in Import

2009-06-30 Thread Thomas Lumley
This is at least the fourth time you have asked this question, which is at least two more than the maximum excusable number of times. The error message says that your computer doesn't have enough memory to load this data set. This pretty clearly suggests that the size of the file is the proble

[R] How do I change which R Graphics Device is active?

2009-06-30 Thread Mark Knecht
Hello, If I execute X11() plot( stuff ) X11() plot( other stuff) then at this point I have two windows with plots and the second graphics window is active. I don't see the devices using ls(). 1) Without destroying the second window how do I make the first window active again? 2) How do I dest

[R] Using regular expressions to detect clusters of consonants in a string

2009-06-30 Thread Mark Heckmann
Hi, I want to parse a string extracting the number of occurrences where two consonants clump together. Consider for example the word "hallo". Here I want the algorithm to return 1. For "chess" if want it to return 2. For the word "screw" the result should be negative as it is a clump of three cons

Re: [R] fitting in logistic model

2009-06-30 Thread Ted Harding
On 30-Jun-09 14:52:20, Marc Schwartz wrote: > On Jun 30, 2009, at 4:54 AM, Renzi Fabrizio wrote: > >> I would like to know how R computes the probability of an event >> in a logistic model (P(y=1)) from the score s, linear combination >> of x and beta. >> >> I noticed that there are differences (

Re: [R] Large Stata file Import in R

2009-06-30 Thread Thomas Lumley
On Tue, 30 Jun 2009, Carlos J. Gil Bellosta wrote: Hello, You are dealing with two different problems at the same time: importing Stata data and importing a relatively big file. Can you try to export your data to txt file first and try to import from it directly? That's likely to be worse in

[R] NaiveBayes fails with one input variable (caret and klarR packages)

2009-06-30 Thread Damian Krstajic
Hello, We have a system which creates thousands of regression/classification models and in cases where we have only one input variable NaiveBayes throws an error. Maybe I am mistaken and I shouldn't expect to have a model with only one input variable. We use R version 2.6.0 (2007-10-03). We

[R] Stata file and R Interaction :File Size Problem in Import

2009-06-30 Thread saurav pathak
Hi I am using Stata 10 and I need to import a data set in stata 10 to R, I have saved the dataset in lower versions of Stata as well by using saveold command in Stata. My RAM is 4gb and the stata file is 600MB, I am getting an error message which says : "Error: cannot allocate vector of si

Re: [R] Clearing out or reclaiming memory

2009-06-30 Thread Bert Gunter
It is usually better (and easier) to use the data argument that comes with many modelling functions -- Yes. And for functions without a data argument, see ?with. Bert Gunter Genentech Nonclinical Biostatistics __ R-help@r-project.org mailing l

[R] Problem in R with TCL 8.4

2009-06-30 Thread Bilal Bayindir
Hello, We are using the TCL 8.4. We have a problem that we got when trying to start the affylmGUI library in R. The error is like this: " This application has failed to start because tk85.dll was not found. Re-installing the application my fix the problem. " We thought that may be we can p

[R] Multiple of independet Anova without loop?

2009-06-30 Thread Sungeun Kim
Hello All, I have one question about how to speed up my calculation: I have multiple independent observations and would like to perform Anova with type 3 sum of square. For this, I also have 2 factors and 3 covariates and want to see the main effects of 2 factors and the interaction on each of t

[R] TukeyHSD - t-value

2009-06-30 Thread Martin Batholdy
Hi, how do I get the t-value when I perform multiple comparisons with the TukeyHSD() - function? thanks for any help! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-pr

Re: [R] fitting in logistic model

2009-06-30 Thread Marc Schwartz
On Jun 30, 2009, at 4:54 AM, Renzi Fabrizio wrote: I would like to know how R computes the probability of an event in a logistic model (P(y=1)) from the score s, linear combination of x and beta. I noticed that there are differences (small, less than e-16) between the fitting values automati

[R] R version-2.9.1 for Linux

2009-06-30 Thread R P Herrold
On Tue, 30 Jun 2009, Marc Schwartz wrote: There is usually a bit of a delay in the Fedora/EPEL repos releasing a new version of R, but I would expect to see something soon. I have R-2.9.1 on CentOS 5, and did since the day of release announcement. I am not so sure it would build on CentOS 4

[R] Windowing issue with diagram package & R 9.1

2009-06-30 Thread Robert W. Baer, Ph.D.
I had strange windowing behavior with R 9.1 on Windows XP when executing code from the diagram package. Perhaps it is even normal behavior that I don't understand as it was an unintentional discovery. I don't even know if it is a package issue or a windowing issue. Reproducing it. Execute th

[R] TukeyHSD with Cohens d ?

2009-06-30 Thread Martin Batholdy
hi, is there a function or an easy way to get the effect size (cohens d) while performing multiple comparisons via the TukeyHSD function? thanks! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the pos

[R] anova with missing data (incomplete design)

2009-06-30 Thread Martin Batholdy
hi, I have the following data: x1 y1 y2 y3 1.3 grp1a1 NA 2.4 grp1a1 NA 3.7 grp1a2 NA 1.9 grp1a2 NA 2.2 grp2NA

Re: [R] Indexing matrix

2009-06-30 Thread Rainer M Krug
On Tue, Jun 30, 2009 at 3:26 PM, Gabor Grothendieck wrote: > On Tue, Jun 30, 2009 at 9:19 AM, Rainer M Krug wrote: > > Hi > > > > imagine the following situation: > > > > a <- runif(100) > > plot(a[a>0.5]) > > > > plots only the elements in the vector which are larger then 0.5 > > > > Now imagine

Re: [R] symbols duplicated in plot output

2009-06-30 Thread baptiste auguie
Thanks for the info. It does look like a bug to me, but it's always best to try and identify the cause before facing the challenge of a legitimate bug submission. On Mac OS (same info as my first post), the duplicated "mu" is only present in the pdf output of pdf(), for both grid and base graphic

  1   2   >