[R] problem running Sweave as a web service with anti-virus software

2008-09-28 Thread Paul.Rustomji
Hello R mailing list We are trying to use R and Sweave, running as a web service on a server to prepare statistical reports but are having problems with our anti-virus software apparently prohibiting execution due to what we think is Sweave trying to run an executable in one of the system's tempo

Re: [R] example - export a data frame to an XML file

2008-09-28 Thread Duncan Temple Lang
Hi Zubin. The first thing is to send us a link to the schema that the other application expects. That would give us a "one-to-one" mapping; otherwise, data.frame to arbitrary XML is to vague. Currently, there is nothing in the XML package that would be able to take an XML schema and write a

Re: [R] FW: logistic regression

2008-09-28 Thread Robert A LaBudde
At the risk of my also spending time in the "Inferno", I would suggest your problem resembles principal components analysis or factor analysis. In this, you would look for a set of linear transforms of your variables that have a smaller dimensionality, but nearly the same spanned subspace. Be

[R] density estimate

2008-09-28 Thread Lavan
Hi, I have a vector or random variables and I'm estimating the density using "bkde" function in the KernSmooth package. The out put contains two vectors (x and y), and the R documentation calls y as the density estimates, but my y-values are not exact density etstimates (since these are numbers l

Re: [R] FW: logistic regression

2008-09-28 Thread Darin Brooks
Wow. I had no idea. I was told to be wary ... But nothing this bold. I appreciate your straight forward advice. I will be exploring the R packages: rpart, earth, and gbm. Dr Elith has generously provided me with literature and R support in the boosted regression tree arena. I will leave s

Re: [R] histogram-like plot with two variables

2008-09-28 Thread jim holtman
Try: plot(x,y,type='s') lines(x,y, type='h') On Sun, Sep 28, 2008 at 10:02 PM, Jörg Groß <[EMAIL PROTECTED]> wrote: > Hi, > > I want to plot a binomial propability distribution. > > I know how to generate the data; > > x <- seq(from=0, to=14, by=1) > y <- dbinom(x, 14, 0.7, log = FALSE) > > b

Re: [R] does there any function like sumif in excel?

2008-09-28 Thread jim holtman
yourData$B[yourData$A == someValue] On Sun, Sep 28, 2008 at 10:25 PM, caocheng曹成 <[EMAIL PROTECTED]> wrote: > I have a data.frame datas which have two columns A and B. > I want to filter column A by some values and to get a value list which > contain the value in B. > Best wishes! > >[[alt

Re: [R] does there any function like sumif in excel?

2008-09-28 Thread Daniel Nordlund
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of caocheng?? > Sent: Sunday, September 28, 2008 7:26 PM > To: R-help@r-project.org > Subject: [R] does there any function like sumif in excel? > > I have a data.frame datas which have two columns A and B.

[R] does there any function like sumif in excel?

2008-09-28 Thread caocheng曹成
I have a data.frame datas which have two columns A and B. I want to filter column A by some values and to get a value list which contain the value in B. Best wishes! [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

Re: [R] FW: logistic regression

2008-09-28 Thread Frank E Harrell Jr
Darin Brooks wrote: I certainly appreciate your comments, Bert. It is abundantly clear that I won't be invited to any of the cocktail parties hosted by the "polite circles". I am not a statistician. I am merely a geographer (in the field of ecology) trying to develop a predictor to assist in a

[R] example - export a data frame to an XML file

2008-09-28 Thread zubin
In need of exporting an XML file from R, I scrub some data in R and push the data into another application requiring XML. The data set is a very straightforward data frame of stock prices- see below. I know the package XML is the one to use, but need an example or some direction on where to s

[R] histogram-like plot with two variables

2008-09-28 Thread Jörg Groß
Hi, I want to plot a binomial propability distribution. I know how to generate the data; x <- seq(from=0, to=14, by=1) y <- dbinom(x, 14, 0.7, log = FALSE) but what I don't know is how to plot this within a histogram like plot. Because the histogram function only accepts one variable. Is

Re: [R] FW: logistic regression

2008-09-28 Thread Darin Brooks
I certainly appreciate your comments, Bert. It is abundantly clear that I won't be invited to any of the cocktail parties hosted by the "polite circles". I am not a statistician. I am merely a geographer (in the field of ecology) trying to develop a predictor to assist in a forestry-based decisi

Re: [R] Kernel Estimate for the Intensity Function

2008-09-28 Thread milton ruser
Dear Ying-Chao If you have only one-dimensional, I understand that you can reduce your data on a XY list. Taking it in account, how about you use "gam" package/function? require(gam) x<- seq(from=-5, to=5, by=0.2) y<-sin(x)+runif(length(x))+x/2 plot(y~x) # k is the kernel size for(k in 3:8) { sm

[R] example - export a data.frame to an XML file

2008-09-28 Thread zubin
In need of exporting an XML file from R, I scrub some data in R and push the data into another application requiring XML. The data set is a very straightforward data frame of stock prices- see below. I know the package XML is the one to use, but need an example or some direction on where to s

Re: [R] reshape package does not recognize second id variable

2008-09-28 Thread hadley wickham
On Sun, Sep 28, 2008 at 6:45 PM, Keith Schnakenberg <[EMAIL PROTECTED]> wrote: > I am trying to use the reshape package for the first time. I have two waves > of a survey, so the id variables include a subject identification number and > a variable denoting the wave of the survey. > > I used the fo

Re: [R] FW: logistic regression

2008-09-28 Thread Bert Gunter
The Inferno awaits me -- but I cannot resist a comment (but DO look at Frank's website). There is a deep and disconcerting dissonance here. Scientists are (naturally) interested in getting at mechanisms, and so want to know which of the variables "count" and which do not. But statistical analysis

[R] reshape package does not recognize second id variable

2008-09-28 Thread Keith Schnakenberg
I am trying to use the reshape package for the first time. I have two waves of a survey, so the id variables include a subject identification number and a variable denoting the wave of the survey. I used the following arguments: library(reshape) svy.melt <- melt(svy, id=c("id", "WAVE")) svy.

Re: [R] Problem with R on dual core under Linux - can not execute mpi.spawn.Rslaves()

2008-09-28 Thread Martin Morgan
"Rainer M Krug" <[EMAIL PROTECTED]> writes: > Hi > > I am trying to utilize my dual core processor (and later a > High-performance clusters (HPC) ) by using the Rmpi, snow, snowfall, > ... packages, but I am struggling at the beginning, i.e. to initialise > the "cluster" on my dual core computer.

Re: [R] Installing DSE package.

2008-09-28 Thread David Winsemius
Read for meaning: http://cran.r-project.org/web/packages/dse/index.html On Sep 27, 2008, at 5:26 PM, <[EMAIL PROTECTED]> <[EMAIL PROTECTED] > wrote: I am sorry where is the download page or index? Once I know that it is split out like this library(dse1) and library(dse2) work just fine.

Re: [R] birthday problem (factorial limit)

2008-09-28 Thread Thomas Lumley
On Sun, 28 Sep 2008, J?rg Gro? wrote: Hi, I tried to calculate the formula for the birthday problem (the probability that at least two people out of a group of n people share the same birthday) But the factorial-function allows me only to calculate factorials up to 170. You might want to

[R] Kernel Estimate for the Intensity Function

2008-09-28 Thread Ying-Chao Hung
To anyone who can help me: I found that the function "smooth.ppp" in the package "spatstat" provides the kernel estimate for the intensity function of a "two-dimensional" point process with marks. Does anyone know that which package can do this for simply a "one- dimensional" point process with m

Re: [R] birthday problem (factorial limit)

2008-09-28 Thread Daniel Nordlund
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of [EMAIL PROTECTED] > Sent: Sunday, September 28, 2008 11:35 AM > To: [EMAIL PROTECTED] > Cc: r-help@r-project.org; Uwe Ligges > Subject: Re: [R] birthday problem (factorial limit) > > Quoting "(Ted Hardi

Re: [R] using tapply on a data frame in a function

2008-09-28 Thread Dieter Menne
eric lee gmail.com> writes: > > Hello, > > I'm trying to use tapply to find group means in a function. It works > outside of a function, but I get the error message from the following code: > "Error in tapply(index, cluster, mean) : arguments must have same length." > Any suggestions? Thanks.

Re: [R] using tapply on a data frame in a function

2008-09-28 Thread Peter Dalgaard
eric lee wrote: Hello, I'm trying to use tapply to find group means in a function. It works outside of a function, but I get the error message from the following code: "Error in tapply(index, cluster, mean) : arguments must have same length." Any suggestions? Thanks. This is neither caused

Re: [R] Dream of a wiki GUI for R

2008-09-28 Thread Tobias Verbeke
Hi, I am just writing a draft to introduce confidence intervals of various "effect sizes" to my students. Surely, I'll recommend the package MBESS in R. Currently, it means I have to recommend R's interface at first. As a statistics teacher in a dept of psychology, I often have to reply why not

[R] using tapply on a data frame in a function

2008-09-28 Thread eric lee
Hello, I'm trying to use tapply to find group means in a function. It works outside of a function, but I get the error message from the following code: "Error in tapply(index, cluster, mean) : arguments must have same length." Any suggestions? Thanks. eric d <- data.frame(cbind(cluster=1:2, va

[R] Dream of a wiki GUI for R

2008-09-28 Thread freerow
Dear R fans ( and wiki fans), I am just writing a draft to introduce confidence intervals of various "effect sizes" to my students. Surely, I'll recommend the package MBESS in R. Currently, it means I have to recommend R's interface at first. As a statistics teacher in a dept of psychology, I ofte

Re: [R] birthday problem (factorial limit)

2008-09-28 Thread plummer
Quoting "(Ted Harding)" <[EMAIL PROTECTED]>: > On 28-Sep-08 17:51:55, Uwe Ligges wrote: > > Jörg Groß wrote: > >> Hi, > >> I tried to calculate the formula for the birthday problem > >> (the probability that at least two people out of a group of > >> n people share the same birthday) > >> > >> But

Re: [R] RWeka on R-2.7.2___Can't evaluate classifier on test set

2008-09-28 Thread Uwe Ligges
Confirmed. Anyway, please report bugs to the package maintainer (CCing), who would probably be happy about a suggestion to fix the bug. Best wishes, Uwe Ligges Ye, Bin wrote: Hi, Everyone, I just installed R-2.7.2 on my computer and then installed package RWeka, version 0.3-13. I noticed t

Re: [R] birthday problem (factorial limit)

2008-09-28 Thread Ted Harding
On 28-Sep-08 17:51:55, Uwe Ligges wrote: > Jörg Groß wrote: >> Hi, >> I tried to calculate the formula for the birthday problem >> (the probability that at least two people out of a group of >> n people share the same birthday) >> >> But the factorial-function allows me only to calculate >> factor

Re: [R] Using "by" to create individual variance-covariance matrices

2008-09-28 Thread Uwe Ligges
Let me repeat an important topic from the the posting guide: it would be helpful for us to see a toy example, i.e. code to generate data for x. Best wishes, Uwe Ligges Josh B wrote: Hello R list subscribers, I am trying to use the "by" command to create line-specific variance covariance mat

Re: [R] ariable Importance Measure in Package RandomForest

2008-09-28 Thread Uwe Ligges
Given you do not want to touch the randomForest implementation itself, the answer is "no, there is no particular function to do it in package randomForest. More particular: ?randomForest tells us that a value "importance" is returned that is `a matrix with nclass + 2 (for classification) or tw

Re: [R] birthday problem (factorial limit)

2008-09-28 Thread Uwe Ligges
Jörg Groß wrote: Hi, I tried to calculate the formula for the birthday problem (the probability that at least two people out of a group of n people share the same birthday) But the factorial-function allows me only to calculate factorials up to 170. So is there a way to push that limit?

[R] birthday problem (factorial limit)

2008-09-28 Thread Jörg Groß
Hi, I tried to calculate the formula for the birthday problem (the probability that at least two people out of a group of n people share the same birthday) But the factorial-function allows me only to calculate factorials up to 170. So is there a way to push that limit? to solve this fo

Re: [R] how to make subset of large data

2008-09-28 Thread Uwe Ligges
ram basnet wrote: I have very large data set. I want to make subset of data based on the matching. For example, x [1] "a" "b" "c" "f" yy "a" "-0.761988113636315" "-0.117672628171555" "-0.885641151614679" "b" "-1.13288279

Re: [R] best material for programmers?

2008-09-28 Thread Aval Sarri
On Sun, Sep 28, 2008 at 12:55 PM, June Kim <[EMAIL PROTECTED]> wrote: > Thanks for the reply, but RCurl looks like an interface to curl, which > might be useful but it's not what I'm looking for. I am looking for a > text to learn R. I also had the same problem, I am new to R but not to programmin

[R] how to make subset of large data

2008-09-28 Thread ram basnet
I have very large data set. I want to make subset of data based on the matching. For example,   > x [1] "a" "b" "c" "f" > yy     "a" "-0.761988113636315" "-0.117672628171555" "-0.885641151614679" "b" "-1.13288279283289"  "1.4947221

[R] adjusting textsize and spacing in mosaic (vcd package)

2008-09-28 Thread David Meyer
Richard, > How do I change the size of the text on the legend scale? This should work with `fontsize', but doesn't which is a bug (fixed in the next release). > Also, is there a way to change all the font sizes at once? Not yet, but this is a good suggestion. Thanks David _

[R] Running mean for spatial data

2008-09-28 Thread Isaac Tetteh
Dear All, Please can anyone help me with codes for performing running mean for my 3-D/4-D gridded (Spatial ) data sets( x,y,t, and x,y,z, t, respectively). Thank you, Isaac [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] FW: logistic regression

2008-09-28 Thread John Kane
--- On Sat, 9/27/08, Dieter Menne <[EMAIL PROTECTED]> wrote: > From: Dieter Menne <[EMAIL PROTECTED]> > Subject: Re: [R] FW: logistic regression > To: [EMAIL PROTECTED] > Received: Saturday, September 27, 2008, 5:45 PM > Frank E Harrell Jr > vanderbilt.edu> writes: > > > Estimates from this mod

Re: [R] reshape "Error in data[, timevar] : incorrect number of dimensions"

2008-09-28 Thread John Kane
Try str(svy) and see what formats the seperate variables have. It may give you a clue as to what is happening. An alternative approach is to see if the reshape package can help you. See See http://had.co.nz/reshape for more information on the package. --- On Sat, 9/27/08, Keith Schnakenber

Re: [R] How to do knn regression?

2008-09-28 Thread Hans W. Borchers
> This is a summary of discussions between Shengqiao Li and me, > entered here as a reference for future requests on knn regression > or missing value imputation based on a nearest neighbor approach. There several functions that can be used for 'nearest neighbor' classification such as knn, knn1 (

Re: [R] retrieving weights from a polr object

2008-09-28 Thread John Fox
Dear Yihui, Yes, that's right. The reason that I missed it is that I checked a model that had been fit without a weights argument, that doesn't work even for an "lm" object (but does for a "multinom" object, produced by multinom() in the nnet package, which is what threw me off). Thank you very m

Re: [R] Equivalent AIC values

2008-09-28 Thread Uwe Ligges
Kimberly Sheldon wrote: Hello R-helpers. We have a question about AIC values. We ran several different GLMs (quadratic, interactions) and our lowest AIC values were the same for several different models. We don't know how to interpret this. Any thoughts? Thanks in advance. Well, the

Re: [R] remove multiple elements from vector

2008-09-28 Thread Marianne Promberger
On Saturday, 27 September 2008, 15:30 (UTC+0200), Bastian Offermann wrote: > Hello all, > > one brief question > > I would like to remove double/triple elements from a vector, e.g. > > 0 1 1 1 1 2 2 2 4 5 6 6 > > but keep one of these multiple ones. Should look like this finally: > > 0 1 2 4 5 6

Re: [R] plotting with a table right under it

2008-09-28 Thread Jim Lemon
david8373 wrote: Hi guys, I'm new to R and this might be a basic question. I want to have a plot with a table right under it containing all the data in the plot. Is that possible in R? How do to it? Hi Yuhan, Try this: library(plotrix) par(mfrow=c(2,1)) x<-rnorm(10) y<-rnorm(10) plot(x,y)

Re: [R] reshape "Error in data[, timevar] : inc orrect number of dimensions"

2008-09-28 Thread Dieter Menne
Keith Schnakenberg gmail.com> writes: > library(foreign) > svy <- read.spss("studsur4.SAV") > > svy.wide <- reshape(svy, timevar="WAVE", idvar="id", direction="wide") > > "id" is the student identification number, and "WAVE" takes values 1 > and 2. I get the following error: > > Error in da

Re: [R] best material for programmers?

2008-09-28 Thread Tobias Verbeke
Barry Rowlingson wrote: 2008/9/28 June Kim <[EMAIL PROTECTED]>: Hello, What is the best material(book, pdfs, ...) for programmers, who have extensive experience in other programming languages, to learn R programming? I think there are many materials on how to use R for specific statistical jobs

[R] constrained logistic regression: Error in optim() with method = "L-BFGS-B"

2008-09-28 Thread ashky
Dear R Users/Experts, I am using a function called logitreg() originally described in MASS (the book 4th Ed.) by Venebles & Ripley, p445. I used the code as provided but made couple of changes to run a 'constrained' logistic regression, I set the method = "L-BFGS-B", set lower/upper values for th

Re: [R] best material for programmers?

2008-09-28 Thread Barry Rowlingson
2008/9/28 June Kim <[EMAIL PROTECTED]>: > Hello, > > What is the best material(book, pdfs, ...) for programmers, who have > extensive experience in other programming languages, to learn R > programming? I think there are many materials on how to use R for > specific statistical jobs, but I haven't

Re: [R] best material for programmers?

2008-09-28 Thread June Kim
Thanks for the reply, but RCurl looks like an interface to curl, which might be useful but it's not what I'm looking for. I am looking for a text to learn R. 2008/9/28 Ajay ohri <[EMAIL PROTECTED]>: > someone mentioned the RCurl package recently > > On Sun, Sep 28, 2008 at 9:12 AM, June Kim <[EMAI