Re: [R] reading a ".mdf" file in R

2011-05-08 Thread Jeff Newmiller
You need to go study SQLServer database administration for awhile... and this is not the place for that. (A book is advisable.) You will also need to set up an ODBC Data Source Name for open connectivity to that database. You should also start learning how to use RODBC to send SQL statem

Re: [R] reading a ".mdf" file in R

2011-05-08 Thread Prof Brian Ripley
And we have little idea what the format of a ".mdf" file is. (It has multiple meanings, see e.g. http://www.delphifaq.com/faq/f777.shtml.) Since you mention 'with SQL', maybe you meant 'Microsoft SQL Server', some (older?) versions of which have '.mdf' files. The short answer in that case is

Re: [R] new to loops

2011-05-08 Thread sunny
Maybe this is what you're looking for: # x is your set of explanatory variables (10 of them): x <- array(rnorm(1), dim=c(1000,10)) # y is your dependent variable: y <- rbinom(1000, 1, 0.3) # run the regression on each column of x: reg <- apply(x, 2, function(z) glm(y ~ z, family=binomial(lin

Re: [R] Hosmer-Lemeshow 'goodness of fit'

2011-05-08 Thread viostorm
Again, thanks so much for your help. Is there a "for dummies" version for interpreting the le Cessie and Houwelingen test. I read the 1991 biometrics paper but honestly got lost in the math. Is it interpreted the same way the Hosmer-Lemeshow test is? ie, a non-significant result means model fit

Re: [R] Another quantmod question

2011-05-08 Thread Russ Abbott
Jeff, Clearly you (and others) have put a lot of work into xts -- and I'm the beneficiary. So I'll stop complaining. Thanks for the class (both code and explanation). *-- Russ * On Sun, May 8, 2011 at 8:23 PM, Jeff Ryan wrote: > Hi Russ, > > We're of course getting into some incredibly fine

Re: [R] Weighted box or violin plots in Lattice?

2011-05-08 Thread Deepayan Sarkar
On Mon, May 9, 2011 at 2:20 AM, Thomas Lumley wrote: > On Mon, May 9, 2011 at 6:35 AM, Deepayan Sarkar > wrote: >> On Sat, May 7, 2011 at 1:55 AM, Raphael Mazor wrote: >>> Is it possible to create weighted boxplots or violin plots in lattice? >>> >>> It seems that you can specify weights for pan

Re: [R] maximum likelihood convergence reproducing Anderson Blundell 1982 Econometrica R vs Stata

2011-05-08 Thread Alex Olssen
Thank you all for your input. Unfortunately my problem is not yet resolved. Before I respond to individual comments I make a clarification: In Stata, using the same likelihood function as above, I can reproduce EXACTLY (to 3 decimal places or more, which is exactly considering I am using differe

Re: [R] Another quantmod question

2011-05-08 Thread Jeff Ryan
Hi Russ, We're of course getting into some incredibly fine-level detail on how all of this works. I'll try and explain issues as I recall them over the development of xts and cbind.xts xts started as an extension of zoo. zoo is an extension of 'ts' (greatly simplified comparison of course, but

Re: [R] Another quantmod question

2011-05-08 Thread Joshua Wiley
On Sun, May 8, 2011 at 1:17 PM, Russ Abbott wrote: > I understand Josh's example: > > mat <- matrix(1:10, dimnames = list(NULL, "A")) > cbind(X = 11:20, Y = mat + 1) > cbind(X = 11:20, Y = mat[, "A"] + 1) > > In the line, cbind(X = 11:20, Y = mat + 1), it would be nice if an error or > warning mes

[R] reading a ".mdf" file in R

2011-05-08 Thread Mauricio Romero
Hi, I have a very large ".mdf" database (36 GB) that I want to import to R. I'm using a computer with 64 GB of RAM, running on windows server 2008 R2 with SQL. Could anyone guide me through the process. I have absolutely no idea what to do. Thanks, Mauricio Romero

Re: [R] Another quantmod question

2011-05-08 Thread Joshua Ulrich
Russ, On May 8, 2011 6:29 PM, "Russ Abbott" wrote: > > Hi Jeff, > > The xts class has some very nice features, and you have done a valuable > service in developing it. > > My primary frustration is how difficult it seems to be to find out what went > wrong when my code doesn't work.  I've been wr

Re: [R] discriminant analysis

2011-05-08 Thread David Cross
There is a good tutorial here: http://www.statsoft.com/textbook/discriminant-function-analysis/ I doubt your question is appropriate for this list ... good luck! David Cross d.cr...@tcu.edu www.davidcross.us On May 8, 2011, at 7:28 PM, Sylvia Rocha wrote: > I am a student of ecology from B

[R] discriminant analysis

2011-05-08 Thread Sylvia Rocha
I am a student of ecology from Brazil and I need a tutorial on discriminant analysis, can someone help me? sylvia [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] recommendation on B for validate.lrm () ?

2011-05-08 Thread Frank Harrell
Yes that's how it works, but a single run does not provide sufficient precision unless your sample size is enormous. When you partition into tenths again the partitions will be different so yes there is some randomness. Averaging over 100 times averages out the randomness. Or just use the bootst

Re: [R] Hosmer-Lemeshow 'goodness of fit'

2011-05-08 Thread Frank Harrell
Please read the documentation carefully, and replace the Design package with the newer rms package. The older Hosmer-Lemeshow test requires binning and has lower power. It also does not penalize for overfitting. The newer goodness of fit test in rms/Design should not agree with Hosmer-Lemeshow.

Re: [R] new to loops

2011-05-08 Thread SevannaD
So in my first try before I got your message, this is what I did: orconf<-list() ccoef<-list() or<-list() coef<-list() out<-list() for (i in 1:49){ out[[i]]<-glm(y~var[[i]],family=binomial(link="logit")) coef[[i]]<-out[[i]]$coef[2] or[[i]]<-exp(out[[i]]$coef[2]) bond<-matrix(out[[i]]$coef[2

Re: [R] nls problem with R

2011-05-08 Thread sterlesser
I am sorry,Andrew,I don't get you. Please forgive my poor English. -- View this message in context: http://r.789695.n4.nabble.com/nls-problem-with-R-tp3494454p3508131.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

Re: [R] nls problem with R

2011-05-08 Thread sterlesser
Thanks Mike. Your suggestion is really helpful.I did with the your instruction , it really works out. What's more,can you use this package http://cran.r-project.org/web/packages/minpack.lm/index.html it use Levenberg-Marquardt algorithm. Can this package do with four parameters? Thanks again -- Vi

[R] Hosmer-Lemeshow 'goodness of fit'

2011-05-08 Thread viostorm
I'm trying to do a Hosmer-Lemeshow 'goodness of fit' test on my logistic regression model. I found some code here: http://sas-and-r.blogspot.com/2010/09/example-87-hosmer-and-lemeshow-goodness.html The R code is above is a little complicated for me but I'm having trouble with my answer: Hosmer-

Re: [R] recommendation on B for validate.lrm () ?

2011-05-08 Thread viostorm
Thanks so much for the reply it was exceptionally helpful! A couple of questions: 1. I was under the impression that k-fold with B=10 would train on 9/10, validate on 1/10, and repeat 10 times for each different 1/10th. Is this how the procedure works in R? 2. Is the reason you recommend repea

Re: [R] Pretty printing numbers

2011-05-08 Thread Henrique Dallazuanna
formatC(round(2189.745, 2), big.mark=",",format="f", drop0trailing = TRUE) On Sun, May 8, 2011 at 9:02 PM, Worik R wrote: >> formatC(round(2189.745, 2), big.mark=",",format="f") > [1] "2,189.7400" > > Unfortunately this does not work > > Worik > > On Mon, May 9, 2011 at 11:45 AM, Peter Langfelder

Re: [R] Pretty printing numbers

2011-05-08 Thread Worik R
On Mon, May 9, 2011 at 12:06 PM, David Winsemius wrote: > > On May 8, 2011, at 8:02 PM, Worik R wrote: > > formatC(round(2189.745, 2), big.mark=",",format="f") >>> >> [1] "2,189.7400" >> >> Unfortunately this does not work >> > > Because you did not follow his example. > That is true. I did not

Re: [R] Pretty printing numbers

2011-05-08 Thread David Winsemius
On May 8, 2011, at 8:02 PM, Worik R wrote: formatC(round(2189.745, 2), big.mark=",",format="f") [1] "2,189.7400" Unfortunately this does not work Because you did not follow his example. -- David. Worik On Mon, May 9, 2011 at 11:45 AM, Peter Langfelder < peter.langfel...@gmail.com> wrote:

Re: [R] Pretty printing numbers

2011-05-08 Thread Worik R
> formatC(round(2189.745, 2), big.mark=",",format="f") [1] "2,189.7400" Unfortunately this does not work Worik On Mon, May 9, 2011 at 11:45 AM, Peter Langfelder < peter.langfel...@gmail.com> wrote: > On Sun, May 8, 2011 at 4:41 PM, Worik R wrote: > > Friends > > > > I am trying to format a num

Re: [R] Pretty printing numbers

2011-05-08 Thread Peter Langfelder
On Sun, May 8, 2011 at 4:41 PM, Worik R wrote: > Friends > > I am trying to format a number to a string so 2189.745 goes to "2,189.35" > and 309283.929 goes to "309,283.93" > > I have tried to use formatC(X, big.mark=",",drop0trailing=FALSE, format="f") > but it does not get the number of decimals

[R] Pretty printing numbers

2011-05-08 Thread Worik R
Friends I am trying to format a number to a string so 2189.745 goes to "2,189.35" and 309283.929 goes to "309,283.93" I have tried to use formatC(X, big.mark=",",drop0trailing=FALSE, format="f") but it does not get the number of decimals correct. Specifying digits does not work as that is signif

Re: [R] new to loops

2011-05-08 Thread Scott Chamberlain
Not knowing what format your data is in or what model you are using... df # is your data frame with columns the variables you are running regressions for datout <- data.frame(coeff = NA, conf_low = NA, conf_high = NA, odd = NA) # a table to put your results in for(i in 1:length(names(df)[2:10]))

[R] Error in AnnotationDbi package - makeProbePackage

2011-05-08 Thread Helga Garcia
Dear all, We have developed our own Affymetrix chip (Custom Express Array, PM-only with two species). I want to analyse the data with the limma package, but for that I need to built my own CDF package, probe package and built the filters to analyse one specie or another. I'm using the makeProbePac

Re: [R] Another quantmod question

2011-05-08 Thread Russ Abbott
Hi Jeff, The xts class has some very nice features, and you have done a valuable service in developing it. My primary frustration is how difficult it seems to be to find out what went wrong when my code doesn't work. I've been writing quite sophisticated code for a fairly long time. It's not tha

[R] Conditional values of a vector XXXX

2011-05-08 Thread Dan Abner
Hello everyone, Below is a metadata summary of raw data in a data frame (which itself is a data frame). I want to add 2 columns to the data frame below that will contain the min and max for integer and numeric class columns and NA for factors and character vectors. Can anyone suggestion the most s

Re: [R] Error in AnnotationDbi package - makeProbePackage

2011-05-08 Thread Martin Morgan
On 05/08/2011 02:15 PM, Helga Garcia wrote: Dear all, We have developed our own Affymetrix chip (Custom Express Array, PM-only with two species). I want to analyse the data with the limma package, but for that I need to built my own CDF package, probe package and built the filters to analyse one

Re: [R] help with mysql and R: partitioning by quintile

2011-05-08 Thread Phil Spector
One way to get the ratings would be to use the ave() function: rating = ave(x$freq,x$track, FUN=function(x)cut(x,quantile(x,(0:5)/5),include.lowest=TRUE)) - Phil Spector Statistical Computing Facility

Re: [R] ARMA

2011-05-08 Thread Pete Brecknock
boki2b wrote: > > Hello,Could somebody tell me what is the difference between  theese 3 > calls of functionsarma(x,order=c(1,0)), arima(x,order=c(1,0,0)) > ar(x,order=1)?I expected same residuals of theese three models,but > unexpectably for the first two R requiredinitial value of something > (w

Re: [R] Plotting n a scale up to 6 decimal places

2011-05-08 Thread Steven Kennedy
The plot works fine for me with the example data you have given. Maybe it is something in your par settings. Try putting a ylim in your plot the same as you have done for the xlim: y1<-min(original.estimate) y2<-max(original.estimate) plot(lfdr.true, original.estimate, pch=19, col = "dark red",xli

Re: [R] help with mysql and R: partitioning by quintile

2011-05-08 Thread jim holtman
try this: > # create some data > x <- data.frame(userid = paste('u', rep(1:20, each = 20), sep = '') + , track = rep(1:20, 20) + , freq = floor(runif(400, 10, 200)) + , stringsAsFactors = FALSE + ) > # get the quantiles for each track > tq <-

Re: [R] Another quantmod question

2011-05-08 Thread Jeff Ryan
Hi Russ, Colnames don't get rewritten if they already exist. The reason is due to performance and how cbind is written at the R level. It isn't perfect per se, but the complexity and variety of dispatch that can take place for cbind in R, as it isn't a generic, is quite challenging to get to

[R] ARMA

2011-05-08 Thread Bojana Milosevic
Hello,Could somebody tell me what is the difference between  theese 3 calls of functionsarma(x,order=c(1,0)), arima(x,order=c(1,0,0)) ar(x,order=1)?I expected same residuals of theese three models,but unexpectably for the first two R requiredinitial value of something (what?)...Thanks in advance

[R] Plotting n a scale up to 6 decimal places

2011-05-08 Thread TZ Rizvi
Dear All, I am trying to plot some element of the below lists which contains 10,000 rows. For instance lfdr_true on x-axis vs hi and and I also include estimates as points on the plot. However, as you can notice the real difference comes in the later decimal places and not in the first 2 to 3 de

[R] Error in AnnotationDbi package - makeProbePackage

2011-05-08 Thread Helga Garcia
Dear all, We have developed our own Affymetrix chip (Custom Express Array, PM-only with two species). I want to analyse the data with the limma package, but for that I need to built my own CDF package, probe package and built the filters to analyse one specie or another. I'm using the makeProbePac

Re: [R] Weighted box or violin plots in Lattice?

2011-05-08 Thread Thomas Lumley
On Mon, May 9, 2011 at 6:35 AM, Deepayan Sarkar wrote: > On Sat, May 7, 2011 at 1:55 AM, Raphael Mazor wrote: >> Is it possible to create weighted boxplots or violin plots in lattice? >> >> It seems that you can specify weights for panel.histogram() and >> panel.densityplot(), but not for panel.b

Re: [R] questions about the output of "gee" and its summary

2011-05-08 Thread Thomas Lumley
On Sun, May 8, 2011 at 6:36 PM, Carrie Li wrote: > Dear R-helpers, > > I am using the package "gee" to run a marginal model. > > Here is the output. > In my simulated data, both x and z are time-varying, so I include their > interaction terms with time indicator (i.e. tind=0, if time 1, and 1 if t

Re: [R] Another quantmod question

2011-05-08 Thread Russ Abbott
I understand Josh's example: mat <- matrix(1:10, dimnames = list(NULL, "A")) cbind(X = 11:20, Y = mat + 1) cbind(X = 11:20, Y = mat[, "A"] + 1) In the line, cbind(X = 11:20, Y = mat + 1), it would be nice if an error or warning message were issued to the effect that the "Y = " part is ignored or

Re: [R] Another quantmod question

2011-05-08 Thread Joshua Wiley
Hi Russ, On Sun, May 8, 2011 at 12:07 PM, Russ Abbott wrote: > I'm having troubles with the names of columns. > > quantmod deal with stock quotes.  I've created an array of the first 5 > closing prices from Jan 2007. (Is there a problem that the name is the same > as the variable name? There shou

Re: [R] Another quantmod question

2011-05-08 Thread David Winsemius
On May 8, 2011, at 3:07 PM, Russ Abbott wrote: I'm having troubles with the names of columns. quantmod deal with stock quotes. I've created an array of the first 5 closing prices from Jan 2007. (Is there a problem that the name is the same as the variable name? There shouldn't be.) close

[R] Another quantmod question

2011-05-08 Thread Russ Abbott
I'm having troubles with the names of columns. quantmod deal with stock quotes. I've created an array of the first 5 closing prices from Jan 2007. (Is there a problem that the name is the same as the variable name? There shouldn't be.) > close close 2007-01-03 1416.60 2007-01-04

[R] help with mysql and R: partitioning by quintile

2011-05-08 Thread gj
Hi, I have a mysql table with fields userid,track,frequency e.g u1,1,10 u1,2,100 u1,3,110 u1,4,200 u1,5,120 u1,6,130 . u2,1,23 . . where "frequency" is the number of times a music track is played by a "userid" I need to turn my 'frequency' table into a rating table (it's for a recommender system)

[R] new to loops

2011-05-08 Thread SevannaD
I have never made a loop on my own to do anything in R. But I am hoping someone can help me build one for the following issue: I need to make a univariate logistic regression for each of my variables (about 62 of them), then I need to gather up each of their coefficients (not the intercepts), eac

[R] package update

2011-05-08 Thread eric
I tried to update my packages using update.packages() I got the following message: The downloaded packages are in ‘/tmp/RtmpyDYdTX/downloaded_packages’ Warning in install.packages(update[instlib == l, "Package"], l, contriburl = contriburl, : 'lib = "/usr/lib/R/library"' is not writab

Re: [R] How to alter circle size

2011-05-08 Thread Deepayan Sarkar
On Fri, May 6, 2011 at 10:21 PM, Dat Mai wrote: > Hello all, > > I'm trying  to create a heatmap using 2 matrices I have: z and v. Both > matrices represent different correlations for the same independent > variables. The problem I have is that I wish to have the values from matrix > z to be repre

Re: [R] Cumsum in Lattice Panel Function

2011-05-08 Thread Deepayan Sarkar
On Fri, May 6, 2011 at 9:24 PM, Elliot Joel Bernstein wrote: > I'm trying to create an xyplot with a "groups" argument where the y-variable > is the cumsum of the values stored in the input data frame. I almost have > it, but I can't get it to automatically adjust the y-axis scale. How do I > get

Re: [R] Weighted box or violin plots in Lattice?

2011-05-08 Thread Deepayan Sarkar
On Sat, May 7, 2011 at 1:55 AM, Raphael Mazor wrote: > Is it possible to create weighted boxplots or violin plots in lattice? > > It seems that you can specify weights for panel.histogram() and > panel.densityplot(), but not for panel.bwplot or panel.violin(). Not for panel.histogram() either. I

Re: [R] Syntax for iter.max in rms

2011-05-08 Thread Ravi Varadhan
The option `iter.max' should be an element of the Control list. If you read the help file carefully, you would have noticed this. So, try this: f <- bj(Surv(ftime, stroke) ~ rcs(age,5) + hospital, link='identity', control=list(iter.max=200), x=TRUE, y=TRUE) Identity link is challenging to fit

Re: [R] Rearranging variables in table in non-alphabetical (manually specified) order

2011-05-08 Thread Uwe Ligges
On 08.05.2011 17:10, André Júng wrote: Dear all, I'm trying to rearrange variables in a table in a custum order for using it with levelplot. So far I could only find examples showing how to sort alphabetically. Here is a short example: a<- c("Anna","Anna","Michael","Klaus","Klaus","Anna","F

Re: [R] Rearranging variables in table in non-alphabetical (manually specified) order

2011-05-08 Thread Duncan Murdoch
On 11-05-08 11:10 AM, André Júng wrote: Dear all, I'm trying to rearrange variables in a table in a custum order for using it with levelplot. So far I could only find examples showing how to sort alphabetically. Here is a short example: a<- c("Anna","Anna","Michael","Klaus","Klaus","Anna","Fr

Re: [R] Confidence intervals and polynomial fits

2011-05-08 Thread Mike Marchywka
> From: pda...@gmail.com > Date: Sun, 8 May 2011 09:33:23 +0200 > To: rh...@sticksoftware.com > CC: r-help@r-project.org > Subject: Re: [R] Confidence intervals and polynomial fits > > > On May 7, 2011, at 16:15 , Ben Haller wrote: > > > On May 6, 2011, at 4:27 PM, David Winsemius wrote: > > >

[R] Syntax for iter.max in rms

2011-05-08 Thread Mike Harwood
Hello, I would like to increase the number of iterations for running a Buckley-James regression model in the rms package, but something is apparently syntactically wrong. The following code initially is exactly as it appears in the help page (which runs successfully), then a "failure to converge"

[R] Rearranging variables in table in non-alphabetical (manually specified) order

2011-05-08 Thread André Júng
Dear all, I'm trying to rearrange variables in a table in a custum order for using it with levelplot. So far I could only find examples showing how to sort alphabetically. Here is a short example:  a <- c("Anna","Anna","Michael","Klaus","Klaus","Anna","Fritz")  b <- c("Schnitzel","Pommes","Po

Re: [R] plotting confidence bands from predict.nls

2011-05-08 Thread Laurent Rhelp
Le 07/05/2011 06:17, Penny Bilton a écrit : I am trying to find a confidence band for a fitted non-linear curve. I see that the predict.nls function has an interval argument, but a previous post indicates that this argument has not been implemented. Is this still true? I have tried various way

Re: [R] plotting confidence bands from predict.nls

2011-05-08 Thread Gabor Grothendieck
On Sat, May 7, 2011 at 12:17 AM, Penny Bilton wrote: > I am trying to find a confidence band for a fitted non-linear curve. I see > that the predict.nls function has an interval argument, but a previous post > indicates that this argument has not been implemented.  Is this still true? > I have tri

Re: [R] plotting confidence bands from predict.nls

2011-05-08 Thread Uwe Ligges
Much quicker than asking for help on the list is to read the help file (which you have been asked to do in the posting guide you hopefully read). ?predict.nls tells us: "interval A character string indicating if prediction intervals or a confidence interval on the mean responses are to be cal

Re: [R] question about val.surv in R

2011-05-08 Thread Frank Harrell
Please specify the package(s) you are using. In this case it should be rms. val.surv is mainly for an out-of-sample validation, as it does not penalize for overfitting. calibrate.cph is probably what you should be using. To use val.surv in the fashion you are trying to use it, specify y=TRUE, s

Re: [R] how to calculate the mean of a group in a table

2011-05-08 Thread John Kane
I see you already have three solutions but, just for the heck of it, here's another. I am trying to get familiar with the reshape2 package and your question was a good exercise for me. With your data set named xx: library(reshape2) yy <- melt(xx, id=c("period", "treatment", "session", "

Re: [R] write.table vs. read.table and the argument "fill"

2011-05-08 Thread Carl Witthoft
Well, it could be a list variable. foo<- 1:7 bar<-1:9 rab<-list(foo,bar) I suppose I could do something like oof<-rbind(foo,bar) write.table(oof) #ignore the warnings and then ignore or delete the redundant items in the output file. On 5/8/11 1:51 AM, Joshua Wiley wrote: Hi Carl, What wou

Re: [R] %in% operator - NOT IN

2011-05-08 Thread Duncan Mackay
At 19:06 08/05/2011, you wrote: Hello everyone, I am attempting to use the %in% operator with the ! to produce a NOT IN type of operation. Why does this not work? Suggestions? > data2[data1$char1 %in% c("string1","string2"),1]<-min(data1$x1) > data2[data1$char1 ! %in% c("string1","string2"),1]

Re: [R] write.table vs. read.table and the argument "fill"

2011-05-08 Thread David Winsemius
On May 7, 2011, at 10:38 AM, Carl Witthoft wrote: Just wondering how come read.table lets you specify fill=TRUE for ragged arrays, but so far as I can tell, no equivalent for write.table? I imagine the answer is something along the lines of read.table creates a rectangular structur

Re: [R] split character vector by multiple keywords simultaneously

2011-05-08 Thread sunny
Andrew Robinson-6 wrote: > > A hack would be to use gsub() to prepend e.g. XXX to the keywords that > you want, perform a strsplit() to break the lines into component > strings, and then substr() to extract the pieces that you want from > those strings. > > Cheers > > Andrew > Thanks, that go

Re: [R] %in% operator - NOT IN

2011-05-08 Thread Ted Harding
On 08-May-11 09:18:55, Berwin A Turlach wrote: > G'day Dan, > > On Sun, 8 May 2011 05:06:27 -0400 > Dan Abner wrote: > >> Hello everyone, >> I am attempting to use the %in% operator with the ! to produce >> a NOT IN type of operation. Why does this not work? Suggestions? >> >> > data2[data1$cha

[R] question about val.surv in R

2011-05-08 Thread zhu yao
Dear R users: I tried to use val.surv to give an internal validation of survival prediction model. I used the sample sources. # Generate failure times from an exponential distribution set.seed(123) # so can reproduce results n <- 1000 age <- 50 + 12*rnorm(n) sex <- factor(sample(c('

Re: [R] %in% operator - NOT IN

2011-05-08 Thread baptiste auguie
Hi, On 8 May 2011 21:18, Berwin A Turlach wrote: > G'day Dan, > > On Sun, 8 May 2011 05:06:27 -0400 > Dan Abner wrote: > >> Hello everyone, >> >> I am attempting to use the %in% operator with the ! to produce a NOT >> IN type of operation. Why does this not work? Suggestions? Alternatively, ex

Re: [R] %in% operator - NOT IN

2011-05-08 Thread Berwin A Turlach
G'day Dan, On Sun, 8 May 2011 05:06:27 -0400 Dan Abner wrote: > Hello everyone, > > I am attempting to use the %in% operator with the ! to produce a NOT > IN type of operation. Why does this not work? Suggestions? > > > data2[data1$char1 %in% c("string1","string2"),1]<-min(data1$x1) > > data2[

[R] %in% operator - NOT IN

2011-05-08 Thread Dan Abner
Hello everyone, I am attempting to use the %in% operator with the ! to produce a NOT IN type of operation. Why does this not work? Suggestions? > data2[data1$char1 %in% c("string1","string2"),1]<-min(data1$x1) > data2[data1$char1 ! %in% c("string1","string2"),1]<-max(data1$x1)+1000 Error: unexpe

Re: [R] venn diagramm

2011-05-08 Thread khush ........
Dear Patrick, Thanks for your reply, I know its hectic to c such graphs, as they are difficult to interpret, but I got this interesting link from R http://www.oga-lab.net/RGM2/func.php?rd_id=gplots:venn, mentioned about venn diagram for 5 subsets. ## Example using a list of item names belonging

Re: [R] Confidence intervals and polynomial fits

2011-05-08 Thread peter dalgaard
On May 7, 2011, at 16:15 , Ben Haller wrote: > On May 6, 2011, at 4:27 PM, David Winsemius wrote: > >> On May 6, 2011, at 4:16 PM, Ben Haller wrote: >>> >> >>> As for correlated coefficients: x, x^2, x^3 etc. would obviously be highly >>> correlated, for values close to zero. >> >> Not just

Re: [R] help!! warning:only the first element has been used

2011-05-08 Thread pwldk
thanks a lot to u guys ! both works well! -- View this message in context: http://r.789695.n4.nabble.com/help-warning-only-the-first-element-has-been-used-tp3505837p3506459.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-pro