Re: [R] locate word in vector

2007-09-14 Thread Chuck Cleland
kevinchang wrote: > Hey All, > > > I am wondering if there is a built-in function allowing us to locate a > particular word in a character vector. > > ex: vector a > > a > [1] "superman" "xamn" "spiderman" "superman" "superman" "xman" > [7] "spiderman" > > Is there any built-in fu

Re: [R] locate word in vector

2007-09-14 Thread jim holtman
Is this what you want: > x <- c("superman" , "xamn" , "spiderman", "superman" , "superman" , > "xman", + "spiderman" ) > which(x == "superman") [1] 1 4 5 > On 9/14/07, kevinchang <[EMAIL PROTECTED]> wrote: > > Hey All, > > > I am wondering if there is a built-in function allowing us to loca

[R] locate word in vector

2007-09-14 Thread kevinchang
Hey All, I am wondering if there is a built-in function allowing us to locate a particular word in a character vector. ex: vector a a [1] "superman" "xamn" "spiderman" "superman" "superman" "xman" [7] "spiderman" Is there any built-in function that can show "superman" are the fir

Re: [R] xyplot question

2007-09-14 Thread Deepayan Sarkar
On 9/14/07, Raymond Balise <[EMAIL PROTECTED]> wrote: > I am tring to do an xyplot where I want to plot 5 dots in each pane of > the trellice and the dots need to have lines (whiskers) extending up > and down at each point(plus a 45 degree reference line). The data > frame is set up with the varia

[R] lme for repeated measurements over time

2007-09-14 Thread Armin Goralczyk
Hi list I am just beginning to understand the complexities of linear mixed effects models. Maybe someone can give advise concerning the following problem: I have two groups of surgical patients in which repeated laboratory measurements were taken over time after surgery. I decided that lme would

[R] question on layout and image.plot

2007-09-14 Thread Ranjan Maitra
Dear colleagues, I have struggled for the past couple of days with the following layout of plots. First, for something that finally works (and I understand it also, or so I think!): A B x where A and B are 4x4 matrices of images, x is the common legend for A and B. The following does what I

Re: [R] xyplot question

2007-09-14 Thread hadley wickham
Hi Raymond, It isn't lattice, but this is fairly easy to do with ggplot2: install.packages("ggplot2") library(ggplot2) qplot(x, y, facets = group ~ Method) + geom_linerange(aes(min = lcl, max=ucl)) + geom_abline() See more at http://had.co.nz/ggplot2 Hadley On 9/14/07, Raymond Balise <[EMAIL

[R] xyplot question

2007-09-14 Thread Raymond Balise
I am tring to do an xyplot where I want to plot 5 dots in each pane of the trellice and the dots need to have lines (whiskers) extending up and down at each point(plus a 45 degree reference line). The data frame is set up with the variables x y lcl and ucl (where the lcl and ucl are the limits on

Re: [R] Copying row names

2007-09-14 Thread Paul Smith
On 9/14/07, kwaj <[EMAIL PROTECTED]> wrote: > I have been trying to copy the row names of one matrix to another matrix but > having difficulty. The original matrix contains a row name which I would > like to replicate in the new matrix. I use the following approach? > The two matrices have identica

[R] Copying row names

2007-09-14 Thread kwaj
I have been trying to copy the row names of one matrix to another matrix but having difficulty. The original matrix contains a row name which I would like to replicate in the new matrix. I use the following approach? The two matrices have identical dimensions. rN <- row.names(origMatrix) row.name

Re: [R] add boxplot to histogram

2007-09-14 Thread Henrique Dallazuanna
Like this: x <- rnorm(100) hist(x) op <- par(fig=c(.02,.5,.5,.98), new=TRUE) boxplot(x) -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O On 14/09/2007, Haiyong Xu <[EMAIL PROTECTED]> wrote: > > Hi there, > > I am wondering if it is possible to add a small boxplot

Re: [R] Comparing regression models

2007-09-14 Thread Lucke, Joseph F
The classic way to test for better fit with an additional variable is to use the anova() function. The model must have the suspect variable listed last into your model. The anova() function will give you the correct sequential decomposition of your model effects and their conditional (F or t)

Re: [R] covariates in nlmer function

2007-09-14 Thread Douglas Bates
On 9/14/07, Kari Ruohonen <[EMAIL PROTECTED]> wrote: > I am trying to explore nlmer by running some nlme examples from Pinheiro > & Bates (2000). I do not seem to find information how to specify fixed > effects covariates to nlmer models. Specifically, I tried to run the > "Carbon Dioxide Uptake" e

[R] unbalanced effects in aov

2007-09-14 Thread Brooke LaFlamme
Hi, I have been having some trouble using aov to do an anova, probably because I'm not understanding how to use this function correctly. For some reason it always tells me that "Estimated effects may be unbalanced", though I'm not sure what this means. Is the formula I am using written incorrect

Re: [R] Cross Compiling

2007-09-14 Thread Douglas Bates
An alternative to cross-compiling when you have a source package is to use the Win-builder facility at win-builder.R-project.org Thanks to Uwe for providing this facility. I find it much, much easier than trying to cross-compile or to set up a Windows computer for compiling R packages. On 9/14/0

[R] add boxplot to histogram

2007-09-14 Thread Haiyong Xu
Hi there, I am wondering if it is possible to add a small boxplot in a histogram, just like the legend. Thanks. Haiyong __ 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] Collapsing data frame; aggregate() or better function?

2007-09-14 Thread jim holtman
Here is a way that I have used when the data get big. The 'trick' is to create the key (in your case concatenating columns 1:8) and then creating a list of indices (row numbers) of the dataframe that correspond to the grouping (using split). The you have the lapply operate on the list of indices

Re: [R] Row-Echelon Form

2007-09-14 Thread John Fox
Dear Peter, I don't have sufficient confidence in the numerical methods that I employed in these functions to contribute them to CRAN as a package. I'm glad that you found them useful, however. Regards, John John Fox, Professor Department of Sociology McMaster U

Re: [R] Intercept in lm and in library(car): Anova

2007-09-14 Thread John Fox
Dear Stefan, > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Stefan Th. Gries > Sent: Friday, September 14, 2007 2:09 PM > To: [EMAIL PROTECTED] > Subject: [R] Intercept in lm and in library(car): Anova > > Hi > > I have two questions regarding th

Re: [R] x-axis order

2007-09-14 Thread jim holtman
This should do what you want. x<-c(26:52,1:25) y<-rnorm(52)+1:52 plot(seq_along(x), y, xaxt='n') axis(1, at=seq_along(x), labels=x) On 9/14/07, Gustaf Rydevik <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a time series which contain data collected weekly from week 26 > to week 25 the followi

[R] Intercept in lm and in library(car): Anova

2007-09-14 Thread Stefan Th. Gries
Hi I have two questions regarding the meaning of intercept outputs of lm. Question 1: In data set 1 (a fully-balanced design), the line with (Intercept) contains the overall mean, and the estimates contain the differences from the overall mean (matching those from model.tables). But in data set 2

[R] Cross Compiling

2007-09-14 Thread Scott Hyde
Hello All, I have a Linux computer and do all of my work from it. However, I teach also, which means that many of my students use windows. Hence, I need to create packages that work under windows as well as Linux. I have tried to follow the directions at http://cran.r-project.org/doc/contrib/

[R] Bootstrapping / stats question (not R)

2007-09-14 Thread Pedro Mardones
Dear all; I'm looking for some advice regarding the following idea: Let's say that I have a sample of y-values randomly taken from a population and I want to compute the mean of y and its confidence intervals but without assuming any particular distribution (I'm assuming that the mean of this sam

Re: [R] ISIN numbers into Bloomberg tickers

2007-09-14 Thread davidr
You can try > blpGetData(conn, "US912828HA15 Govt", c("ticker", "cpn", "maturity", "market_sector_des"), retval="raw") and paste together the parts. HTH, David L. Reiner Rho Trading Securities, LLC -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of

Re: [R] Collapsing data frame; aggregate() or better function?

2007-09-14 Thread Tobin, Jared
Thanks for the quick reply Jim. I haven't had any success when I whittle down 'by' list even further though. I believe I'm using the right command, but now it's just a matter of clear memory issues. > test <- aggregate(lf1.turbot[,17:217], list(lf1.turbot$vessel, lf1.turbot$trip, lf1.turbot$set)

Re: [R] Yahoo data feed in R / Corporate Actions

2007-09-14 Thread davidr
This came up last week on r-sig-finance: https://stat.ethz.ch/pipermail/r-sig-finance/2007q3/001686.html David L. Reiner Rho Trading Securities, LLC 550 W. Jackson Blvd #1000 Chicago, IL 60661-5704 312-244-4610 direct 312-244-4500 main 312-244-4501 fax -Original Message- From: [EMAIL

[R] 行=政=工=作=统=筹=管=理S

2007-09-14 Thread Nuafl
0 === 如-果-您-不-希-望-再-收-到-我-们-的-邮-件,请-直-接-回-复-推-定-信-箱 { tuidingyi@sohu.com } ===

[R] R2 in mixed model

2007-09-14 Thread Angelo Colombo
Hello. I have some basic question for you!. Has calculating R2 sense in mixed model? I think no! But i don't why! Thank in advance for your help Angelo __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] replace NA value with 0

2007-09-14 Thread John Kane
Seconded. --- Greg Snow <[EMAIL PROTECTED]> wrote: > > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of > Gabor Csardi > > Sent: Friday, September 14, 2007 2:56 AM > > To: S Ellison > > Cc: [EMAIL PROTECTED] > > Subject: Re: [R] replace N

Re: [R] Print to file

2007-09-14 Thread mel
Alessandra Marmo a écrit : > Hello list I'M new > I need help about print to file > How i can Print more table in a file (in append) > using xtable and print functions? ?write.table __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listi

[R] x-axis order

2007-09-14 Thread Gustaf Rydevik
Hi all, I have a time series which contain data collected weekly from week 26 to week 25 the following year. How do I plot this data, so that the x-axis is displaying the week numbers, ordered as in the data? Thanks in advance, Gustaf --- x<-c(26:52,1:25) y<-rnorm(52)+1:52 plot(x,y) ## How do

Re: [R] Row-Echelon Form

2007-09-14 Thread Peter Danenberg
> I append the function below, along with some other simple > linear-algebra functions. I never thanked you, by the way, John; have you considered incurring the overhead of producing a formal R package? Otherwise, it's worth its SLOC in gold. __ R-help

[R] Yahoo data feed in R / Corporate Actions

2007-09-14 Thread kwaj
Is there anyway to import data from Yahoo into R and to have it adjusted for share splits / dividend payouts (corporate actions)? I can currently import data into R but the price series is not adjusted -- View this message in context: http://www.nabble.com/Yahoo-data-feed-in-R---Corporate-Action

[R] ISIN numbers into Bloomberg tickers

2007-09-14 Thread Shubha Vishwanath Karanth
Hi R, Can I convert ISIN numbers into Bloomberg tickers in the RBloomberg package? BR, Shubha [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the post

Re: [R] replace NA value with 0

2007-09-14 Thread Ted Harding
On 14-Sep-07 09:22:36, S Ellison wrote: > Being a chemist, I have to confess that I can't always tell > that what I'm about to attempt is barking, trivial, uninteresting > or better done a completely different way; myself, I'd rather be > warned too often than left to dig my own pit and fall into i

[R] Print to file

2007-09-14 Thread Alessandra Marmo
Hello list I'M new I need help about print to file How i can Print more table in a file (in append) using xtable and print functions? Tanks Alessandra __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] replace NA value with 0

2007-09-14 Thread Greg Snow
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Gabor Csardi > Sent: Friday, September 14, 2007 2:56 AM > To: S Ellison > Cc: [EMAIL PROTECTED] > Subject: Re: [R] replace NA value with 0 I nominate the following paragraph for the fortunes packag

Re: [R] Comparing regression models

2007-09-14 Thread Wayne.W.Jones
I would suggest doing an F-test.A descrition is given here: http://www.graphpad.com/curvefit/2_models__1_dataset.htm. The method is valid becasue one of your models is a subset of another. Correct use of the anova function does indeed perform this test. For example: data(airquality) lm1<-l

[R] Comparing regression models

2007-09-14 Thread darteta001
Dear list, I am interested in comparing two linear regression models to see if including one extra variable improves the model significantly. I have read that one possibility is doing an F test on the goodness-of-fit values for both models, and another option that is comparing the residuals o

Re: [R] add a row...

2007-09-14 Thread Christoph Heibl
Use rbind: d <- c(14,21) b <- rbind(d, b) CH On 14.09.2007, at 16:15, Alfredo Alessandrini wrote: > Hi, > > If I've a dataframe like this: > > a <- data.frame(a=c(14,21,14,4), b=c(21,45,23,11)) > > print(a) > >a b > 1 14 21 > 2 21 45 > 3 14 23 > 4 4 11 > > I can delete the first row wit

[R] add a row...

2007-09-14 Thread Alfredo Alessandrini
Hi, If I've a dataframe like this: a <- data.frame(a=c(14,21,14,4), b=c(21,45,23,11)) print(a) a b 1 14 21 2 21 45 3 14 23 4 4 11 I can delete the first row with: b = a[-(1),] print (b) a b 2 21 45 3 14 23 4 4 11 Now, can I add to dataframe b the row that I've deleded? print (b)

Re: [R] t.test() with missing values

2007-09-14 Thread Birgit Lemcke
Am 14.09.2007 um 15:54 schrieb Petr PIKAL: >> Petr PIKAL wrote: >>> Hi >>> >>> [EMAIL PROTECTED] napsal dne 14.09.2007 13:50:58: >>> >>> Birgit Lemcke wrote: > Am 14.09.2007 um 12:05 schrieb Peter Dalgaard: > > >> S Ellison wrote: >> >> Peter Dalgaard <[EMAIL

Re: [R] t.test() with missing values

2007-09-14 Thread Petr PIKAL
> Petr PIKAL wrote: > > Hi > > > > [EMAIL PROTECTED] napsal dne 14.09.2007 13:50:58: > > > > > >> Birgit Lemcke wrote: > >> > >>> Am 14.09.2007 um 12:05 schrieb Peter Dalgaard: > >>> > >>> > S Ellison wrote: > > Peter Dalgaard <[EMAIL PROTECTED]> 14/09/2007 09:26:16 >>> > >>

Re: [R] t.test() with missing values

2007-09-14 Thread Birgit Lemcke
Am 14.09.2007 um 14:27 schrieb Peter Dalgaard: > Petr PIKAL wrote: >> Hi >> >> [EMAIL PROTECTED] napsal dne 14.09.2007 13:50:58: >> >> >>> Birgit Lemcke wrote: >>> Am 14.09.2007 um 12:05 schrieb Peter Dalgaard: > S Ellison wrote: > > Peter Dalgaard <[EMAIL PROTECTED

Re: [R] t.test() with missing values

2007-09-14 Thread Birgit Lemcke
Am 14.09.2007 um 14:12 schrieb Petr PIKAL: > Hi > > [EMAIL PROTECTED] napsal dne 14.09.2007 13:50:58: > >> Birgit Lemcke wrote: >>> >>> Am 14.09.2007 um 12:05 schrieb Peter Dalgaard: >>> S Ellison wrote: > Peter Dalgaard <[EMAIL PROTECTED]> 14/09/2007 09:26:16 >>> >>>

Re: [R] Logistic regression

2007-09-14 Thread David Barron
You might want to look at the lrm function in the Design package as an alternative to the standard tools. On 9/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Google search "Logistic Regression using R" > > There are loads of good links here. Basically you use a generalized linear > model

Re: [R] quantiles and dataframe

2007-09-14 Thread Gabor Grothendieck
Sorry, try this instead. It creates a data frame of 3 columns in which each column equals RQ[,1] except it has NAs where the columns of RQ[-1] has NAs. Perform the quantile operation on that. sapply(sign(RQ[-1]) * RQ[,1], quantile, probs = c(0, .05, .95, 1), na.rm = TRUE) On 9/14/07, Gabor Gro

Re: [R] building with atlas version of blas and lapack

2007-09-14 Thread K Vanw
On 9/12/07, Uwe Ligges <[EMAIL PROTECTED]> wrote: > > Flags should be >--with-blas="-L/usr/local/atlas/lib -lf77blas -latlas" That worked. Thanks. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the p

Re: [R] quantiles and dataframe

2007-09-14 Thread jim holtman
I think this does what you want: > RQ A B1 B2 B3 11 NA 112 12 22 NA 123 123 33 NA 324 13 44 3 21 535 55 4 12 33 66 7 1 335 77 4 NA 3535 88 4 NA NA 99 NA NA NA 10 10 5 NA NA 11 12 4 NA NA 12 15 2 NA NA 13 17 3 NA

Re: [R] t.test() with missing values

2007-09-14 Thread Peter Dalgaard
Petr PIKAL wrote: > Hi > > [EMAIL PROTECTED] napsal dne 14.09.2007 13:50:58: > > >> Birgit Lemcke wrote: >> >>> Am 14.09.2007 um 12:05 schrieb Peter Dalgaard: >>> >>> S Ellison wrote: Peter Dalgaard <[EMAIL PROTECTED]> 14/09/2007 09:26:16 >>>

Re: [R] replace NA value with 0

2007-09-14 Thread S Ellison
>>> Ted Harding <[EMAIL PROTECTED]> 14/09/2007 10:59:47 >>> >On the contrary! It adds to our "collective wisdom". > >We all have to suck eggs, and usually can successfully perform the act. Ted, Thanks for the kind remarks. But we'll have to get off the egg topic, or we'll all end up as acknowl

Re: [R] quantiles and dataframe

2007-09-14 Thread Gabor Grothendieck
Try this: sapply(RQ[-1], quantile, probs = c(0, .05, .95, 1), na.rm = TRUE) On 9/14/07, Anders Bjørgesæter <[EMAIL PROTECTED]> wrote: > Hi > > I have a dataframe, RQ, like this: > > AB1B2B3 > 1NA11212 > 2NA123 123 > 3NA32413 > 43 21535 >

Re: [R] t.test() with missing values

2007-09-14 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 14.09.2007 13:50:58: > Birgit Lemcke wrote: > > > > Am 14.09.2007 um 12:05 schrieb Peter Dalgaard: > > > >> S Ellison wrote: > >>> > >> Peter Dalgaard <[EMAIL PROTECTED]> 14/09/2007 09:26:16 >>> > >> > >>> > >> Yes, but > >> > >> I don't think lme(

[R] covariates in nlmer function

2007-09-14 Thread Kari Ruohonen
I am trying to explore nlmer by running some nlme examples from Pinheiro & Bates (2000). I do not seem to find information how to specify fixed effects covariates to nlmer models. Specifically, I tried to run the "Carbon Dioxide Uptake" example from p. 368 onwards in the PB200 book. The model witho

Re: [R] t.test() with missing values

2007-09-14 Thread Peter Dalgaard
Birgit Lemcke wrote: > > Am 14.09.2007 um 12:05 schrieb Peter Dalgaard: > >> S Ellison wrote: >>> >> Peter Dalgaard <[EMAIL PROTECTED]> 14/09/2007 09:26:16 >>> >> > So what can I do now to solve my problem? > > Do you think I should not use paired=TRUE? > You *can* only

Re: [R] write.csv / string extraction and field limits

2007-09-14 Thread kwaj
I worked it out. It wasn't actually the write.csv command - it was the fact that I wasn't putting "as.is" in the read.csv that was corrupting the process Xavier Abulker wrote: > > This example works fine: > > test<-matrix(c(1,2,'VOICIUNPETITTES',3),ncol=2,nrow=2) > write.cs

[R] quantiles and dataframe

2007-09-14 Thread Anders Bjørgesæter
Hi I have a dataframe, RQ, like this: AB1B2B3 1NA11212 2NA123 123 3NA32413 43 21535 54 1233 67 1 335 74 NA3535 84 NANA 9NANANA 105NANA 124NANA 152N

Re: [R] How to remove index from list after split?

2007-09-14 Thread Wayne.W.Jones
Not sure what you mean by "group index" but try: lapply(df.s,function(l){l$x}) or something like: do.call("rbind",df.s) to convert the result into a data.frame. Regards Wayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Rick DeShon Sent: 14 Sept

Re: [R] segfault in download.file

2007-09-14 Thread Vladimir Eremeev
I tried the same operations, and got trying URL 'http://chart.yahoo.com/table.csv?s=^spx&a=0&b=02&c=1991&d=8&e=13&f=2007&g=d&q=q&y=0&z=^spx&x=.csv' Error in download.file(url, destfile, method = method, quiet = quiet) : cannot open URL 'http://chart.yahoo.com/table.csv?s=^spx&a=0&b=02&c=

Re: [R] t.test() with missing values

2007-09-14 Thread Birgit Lemcke
Am 14.09.2007 um 12:05 schrieb Peter Dalgaard: > S Ellison wrote: >> > Peter Dalgaard <[EMAIL PROTECTED]> 14/09/2007 09:26:16 >>> > So what can I do now to solve my problem? Do you think I should not use paired=TRUE? >>> You *can* only use it when you have pairs, and y

Re: [R] How to remove index from list after split?

2007-09-14 Thread Vladimir Eremeev
Did not completely understand what is a 'group index', but to remove any element from a list or a matrix, or a vector or a data frame you could use the negative index. For example, > df.s[-c(1:3)] $`3` gx 1 3 3.916503 12 3 1.435718 24 3 2.252151 > df.s[-c(1:3)][[1]][-1]

[R] segfault in download.file

2007-09-14 Thread max . e . brown
Hello, I was trying to use get.hist.quote in tseries, and got a segfault: -8<--- > library(tseries) Loading required package: quadprog Loading required package: zoo 'tseries' version: 0.10-6 'tseries' is a package for time series analysis and computation

[R] How to remove index from list after split?

2007-09-14 Thread Rick DeShon
In the following example, how can I drop the group index from the list after I perform a split? n <- 3 nn <- 10 g <- factor(round(n * runif(n * nn))) x <- rnorm(n * nn) + sqrt(as.numeric(g)) df<- data.frame(g,x) df.s <- split(df,g) Thanks! Rick DeShon [[alternative HTML

Re: [R] Sweave: tables vs matrices

2007-09-14 Thread Gavin Simpson
On Fri, 2007-09-14 at 11:24 +0100, Robin Hankin wrote: > Hi Gavin > > thanks for that. . . it does 99% of what I wanted. > I'd forgotten about the na.print argument. > > It's considerably nicer than my other solution > which converted to character, then jj[is.na(jj)] <- "-" > then noquote(jj). >

Re: [R] Sweave: tables vs matrices

2007-09-14 Thread Robin Hankin
Hi Gavin thanks for that. . . it does 99% of what I wanted. I'd forgotten about the na.print argument. It's considerably nicer than my other solution which converted to character, then jj[is.na(jj)] <- "-" then noquote(jj). But sometimes I just need nice LaTeX tables and I can't think of a way

Re: [R] t.test() with missing values

2007-09-14 Thread Peter Dalgaard
S Ellison wrote: > Peter Dalgaard <[EMAIL PROTECTED]> 14/09/2007 09:26:16 >>> >>> So what can I do now to solve my problem? >>> >>> Do you think I should not use paired=TRUE? >>> >> You *can* only use it when you have pairs, and you must do it then, to >> correct for in

Re: [R] Logistic regression

2007-09-14 Thread Wayne.W.Jones
Google search "Logistic Regression using R" There are loads of good links here. Basically you use a generalized linear model. Look up ?glm Regards Wayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of martin pareja Sent: 13 September 2007 16:33 To: r-he

Re: [R] Multiple R sessions, Mac version

2007-09-14 Thread James Reilly
On 14/9/07 3:00 AM, David Afshartous wrote: > I've just switched to running R 2.5.1 on a Mac 0S X 10.4.1 platform. I > can't seem to find how to run simultaneous R sessions. Didn't see anything > in the archives on this or under the R file menu. I've switched to Mac OS X recently too (10.4.10)

Re: [R] t.test() with missing values

2007-09-14 Thread S Ellison
>>> Peter Dalgaard <[EMAIL PROTECTED]> 14/09/2007 09:26:16 >>> >> So what can I do now to solve my problem? >> >> Do you think I should not use paired=TRUE? >You *can* only use it when you have pairs, and you must do it then, to >correct for intra-pair correlation. The drawback is that it looks o

Re: [R] replace NA value with 0

2007-09-14 Thread Gabor Csardi
On Fri, Sep 14, 2007 at 10:22:36AM +0100, S Ellison wrote: [...] > knee-jerk. Apologies if I'm teaching egg-sucking to an expert. No apologies please. As i said I _like_ it. Thanks :) G > S > > *** > This email and any attachment

Re: [R] replace NA value with 0

2007-09-14 Thread S Ellison
>>On Fri, Sep 14, 2007 at 09:46:57AM +0100, S Ellison wrote: >> >>... only you probably shouldn't be doing that at all. Words like 'bias' >>spring to mind... >> >> Woudn't it be better to accept the NA's and find methods that handle them as >> genuinely missing. >> R is usually quite good at

Re: [R] t.test() with missing values

2007-09-14 Thread Birgit Lemcke
Am 14.09.2007 um 10:26 schrieb Peter Dalgaard: > Birgit Lemcke wrote: >> Thanks for your answer. >> >> First I will show you both vectors: >> [...] >> >> I tried this (complete.cases(Fem66, Mal66)) and you are right, it >> gives me back: >> >> (complete.cases(Fem66, Mal66)) >> [1] FALSE FALSE

Re: [R] replace NA value with 0

2007-09-14 Thread Gabor Csardi
On Fri, Sep 14, 2007 at 09:46:57AM +0100, S Ellison wrote: > > > >>> Gabor Csardi <[EMAIL PROTECTED]> 14/09/2007 09:27:03 >>> > >x[ is.na(x) ] <- 0 > > > >should work in most cases i think. > > ... only you probably shouldn't be doing that at all. Words like 'bias' > spring to mind... > > Woud

Re: [R] Sweave: tables vs matrices

2007-09-14 Thread Gavin Simpson
On Fri, 2007-09-14 at 09:34 +0100, Robin Hankin wrote: > Hello everyone > > > I am preparing a document using Sweave in which I want my matrices > to appear as tables. I am running into problems because as my > Rnw files stand, I have to change table entries twice, once for > the matrix and onc

Re: [R] replace NA value with 0

2007-09-14 Thread S Ellison
>>> Gabor Csardi <[EMAIL PROTECTED]> 14/09/2007 09:27:03 >>> >x[ is.na(x) ] <- 0 > >should work in most cases i think. ... only you probably shouldn't be doing that at all. Words like 'bias' spring to mind... Woudn't it be better to accept the NA's and find methods that handle them as genuine

Re: [R] statistics - hypothesis testing question

2007-09-14 Thread Pfaff, Bernhard Dr.
Hello Mark, in addition and complementing the already provided answers to your question. You want to consider the J-test, too. For an outline and the pitfalls of this test, see: http://citeseer.ist.psu.edu/cache/papers/cs/24954/http:zSzzSzwww.econ.qu eensu.cazSzfacultyzSzdavidsonzSzbj4-noam.pdf/b

[R] Sweave: tables vs matrices

2007-09-14 Thread Robin Hankin
Hello everyone I am preparing a document using Sweave in which I want my matrices to appear as tables. I am running into problems because as my Rnw files stand, I have to change table entries twice, once for the matrix and once for the typeset table. I have lots of material like the following.

Re: [R] replace NA value with 0

2007-09-14 Thread Gabor Csardi
x[ is.na(x) ] <- 0 should work in most cases i think. Gabor On Fri, Sep 14, 2007 at 10:08:19AM +0200, Alfredo Alessandrini wrote: > Hi, > > how can I replace NA value with 0: > > 1991 217 119 103 109 137 202 283 240 146 NA > 1992 270 174 149 144 166 239 278 237 275 NA > 1993 146 111 104

Re: [R] t.test() with missing values

2007-09-14 Thread Peter Dalgaard
Birgit Lemcke wrote: > Thanks for your answer. > > First I will show you both vectors: > [...] > > I tried this (complete.cases(Fem66, Mal66)) and you are right, it > gives me back: > > (complete.cases(Fem66, Mal66)) > [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE > FALSE FALS

[R] replace NA value with 0

2007-09-14 Thread Alfredo Alessandrini
Hi, how can I replace NA value with 0: 1991 217 119 103 109 137 202 283 240 146 NA 1992 270 174 149 144 166 239 278 237 275 NA 1993 146 111 104 89 98 131 153 148 175 NA 1994 177 123 146 124 121 200 266 191 240 106 1995 145 98 95 89 95 130 183 161 164 129 1996 145 98 89 90 93 13

Re: [R] t.test() with missing values

2007-09-14 Thread Birgit Lemcke
Thanks for your answer. First I will show you both vectors: Mal66 [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [28] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA