RE: [R] PHP MySQL and R

2004-12-17 Thread BEER Michael
--- Problem #1: ... --- Consider using the library RMySQL (available at http://stat.bell-labs.com/RS-DBI/download/) for directly accessing your MySQL database from R. --- bla.R --- library(RMySQL) con - dbConnect(dbDriver(MySQL), group = your group name as defined

[R] combined list boxes / tcltk

2004-12-17 Thread Cornelia Froemke
Dear list members, I would like to combine two list boxes with tcltk. The source code runs fine - but when I choose in the upper box an item, the selected item in the lower box disappears and vice versa. Could anybody help me? This is the source code: ## require(tcltk)

[R] VAR-Estimation

2004-12-17 Thread Marc Gronwald
Hi, I want to estimate a VAR-model and calculate the impulse response function and a variance decomposition. I am familiar with standard R-functions, like e.g. arima. But I have not found equivalent functions to estimate a VAR-modell. Are there any functions available or which R-package can I

[R] How to interpret and modify plot.svm?

2004-12-17 Thread Frank Duan
Dear R people, I am trying to plot the results from running svm in library(e1071). I use plot.svm. After searching through the help archives and FAQ, I still have several questions: 1. In default, crosses indicate support vectors. But why are there two colors of crosses? What do they represent?

Re: [R] drawing a rectangle through multiple plots

2004-12-17 Thread Martin Maechler
Hi Greg, to attach files in e-mails for R-help, you must use the text/plain MIME type; if you can't do this with your e-mail software, (besides considering to change your e-mail software :-) - either put the file up for FTP or HTTP and only publish the URL on R-help - or ``cut paste'' into

RE: [R] How to interpret and modify plot.svm?

2004-12-17 Thread Liaw, Andy
David can give the definitive answers, but I'll give my take on this... From: Frank Duan Dear R people, I am trying to plot the results from running svm in library(e1071). I use plot.svm. After searching through the help archives and FAQ, I still have several questions: 1. In

Re: [R] VAR-Estimation

2004-12-17 Thread Kjetil Brinchmann Halvorsen
Marc Gronwald wrote: Hi, I want to estimate a VAR-model and calculate the impulse response function and a variance decomposition. I am familiar with standard R-functions, like e.g. arima. But I have not found equivalent functions to estimate a VAR-modell. Are there any functions available or

[R] take precisely one named argument

2004-12-17 Thread Robin Hankin
Hi I want a function that takes precisely one named argument and no unnamed arguments. The named argument must be one of a or b. If a is supplied, return a. If b is supplied, return 2*b. That is, the desired behaviour is: R f(a=4) #return 4 R f(b=33) #return 66 R f(5) #error R f(a=3,b=5)

[R] Problem with SVM and scaling

2004-12-17 Thread David Meyer
Ton: Does preprocessing (scaling, removing constant variables, etc.) by hand of the whole data set *before* splitting resolve things? You will need the same variable structure in the training and the test set anyway; scaling is just the first code part that fails on your data... g, -d -

RE: [R] take precisely one named argument

2004-12-17 Thread Liaw, Andy
From: Liaw, Andy Here's my attempt: f - function(...) { + argList - list(...) + if (length(argList) != 1) stop(Wrong number of arguments!) + if (length(names(argList)) != 1 || ! names(argList) %in% c(a, b)) + stop(Wrong name for argument!) + x - argList[[1]] *

[R] (no subject)

2004-12-17 Thread NICOLAS DEIG
hello, i am encoutering problems with a function of R concerning the classification trees. In the library {tree}, when I use the function tree to grow a classification tree it should give me an object of class tree. Then I should be allowed to use this tree object in the function cv.tree that

RE: [R] (no subject)

2004-12-17 Thread Liaw, Andy
-Original Message- From: NICOLAS DEIG hello, i am encoutering problems with a function of R concerning the classification trees. In the library {tree}, when I use the function tree to grow a ^^^ That should be package... classification tree it should give me

RE: [R] combined list boxes / tcltk

2004-12-17 Thread John Fox
Dear Cornelia, Add the argument exportselection=FALSE to tklistbox(). I hope this hleps, John John Fox Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4 905-525-9140x23604 http://socserv.mcmaster.ca/jfox

Re: [R] Doubts about chi-square distribution

2004-12-17 Thread Peter Dalgaard
José Cláudio Faria [EMAIL PROTECTED] writes: Dear list, For educational purposes I have been working with the script below. I have a observation: line 31 #CScal[i] = (amo^2) # IT IS WRONG, I KNOW, BUT IT MAKE R TO CRASHES! I'm thinking this is a possible bug in the R!

RE: [R] take precisely one named argument

2004-12-17 Thread Ted Harding
On 17-Dec-04 Ted Harding wrote: I don't know the *best* way (expert R anatomists will know ... ) but the following dirty handed modification seems to do what you want: f - function(z=NULL, a=NULL, b=NULL){ if(!is.null(z)){ stop(usage: f(a=...) or f(b=...)) }

Re: [R] take precisely one named argument

2004-12-17 Thread Peter Dalgaard
BXC (Bendix Carstensen) [EMAIL PROTECTED] writes: specify: f - function(...,a=NULL,b=NULL) {...etc Or (variant of same) f - function(..., a, b) { if (nargs() != 1 || length(list(...))) stop(precisely one of a=x or b=y must be given) else if (missing(a)) 2*b else

RE: [R] Matrix and rownames problem

2004-12-17 Thread John Fox
Dear Patrick, By default, when indexing returns an array dimension of 1, the corresponding coordinate is dropped. Try j - i[1, 1:2, drop=FALSE], and see ?[. I hope this helps, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pat Meyer Sent:

RE: [R] How can I take anti log of log base 2 values in R

2004-12-17 Thread BXC (Bendix Carstensen)
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Saurin Jani Sent: Friday, December 17, 2004 3:59 PM To: [EMAIL PROTECTED] Subject: [R] How can I take anti log of log base 2 values in R Hi, I am using R for microarray data anlaysis. When I

RE: [R] Doubts about chi-square distribution

2004-12-17 Thread Liaw, Andy
From: Peter Dalgaard José Cláudio Faria [EMAIL PROTECTED] writes: Dear list, For educational purposes I have been working with the script below. I have a observation: line 31 #CScal[i] = (amo^2) # IT IS WRONG, I KNOW, BUT IT MAKE R TO CRASHES! I'm

Re: [R] Is the page number in a document created with pdf() accessible?

2004-12-17 Thread Marc Schwartz
On Fri, 2004-12-17 at 06:45 -0800, Dennis Fisher wrote: When I create pdf documents in R using pdf(), each page has text in the outer margin indicating the page number. I track page numbers in a cumbersome manner. Is the page number in a multi-page document tracked internally by par() or

[R] If it's not a data.frame, matrix or vector, what is it?

2004-12-17 Thread michael watson \(IAH-C\)
Hi Forgive my ignorance. I am selecting a column of a data.frame using the column name, and I want to know what the resulting column is. My data frame is called submin and the column name is held in a variable called display.gname Eg: is.data.frame(submin) [1] TRUE

RE: [R] If it's not a data.frame, matrix or vector, what is it?

2004-12-17 Thread Liaw, Andy
What does str(submin$display.gname) say? Andy From: michael watson (IAH-C) Hi Forgive my ignorance. I am selecting a column of a data.frame using the column name, and I want to know what the resulting column is. My data frame is called submin and the column name is held in a

RE: [R] If it's not a data.frame, matrix or vector, what is it?

2004-12-17 Thread Liaw, Andy
It may be educational to read the help pages of functions that you're using, namely ?I (or even ?AsIs) and ?as.vector. ?I says it simply prepend AsIs to the class attribute of the object. ?as.vector says it returns FALSE if the object has any attributes except names (which it does in this case:

Re: [R] take precisely one named argument

2004-12-17 Thread Gabor Grothendieck
Ted.Harding at nessie.mcc.ac.uk writes: : : On 17-Dec-04 Ted Harding wrote: : I don't know the *best* way (expert R anatomists will know ... ) : but the following dirty handed modification seems to do what : you want: : :f - function(z=NULL, a=NULL, b=NULL){ : if(!is.null(z)){ :

[R] reading the seed from a simulation

2004-12-17 Thread Suzette Blanchard
Greetings, I have a simulation of a nonlinear model that is failing. But it does not fail til way into the simulation. I would like to look at the run that is failing and maybe I could if I could capture the seed for the failing run. The help file on set.seed says you can do it but

[R] Factor analysis with dichotomous variables

2004-12-17 Thread Tom Denson
Hello, I would like to conduct an exploratory factor analysis with dichotomous data. Do any R routines exist for this purpose? I recall reading something about methods with tetrachoric correlations. Any help would be appreciated. Best, Tom Denson Department of Psychology University of Southern

Re: [R] reading the seed from a simulation

2004-12-17 Thread Tony Plate
With most modern random number generators you can't capture the current state in a single 32-bit integer. (I suspect the .Random.seed you are seeing is the state contained in 625 integers). The easiest way to run reproducible simulations is to explicitly set the seed, using an integer, before

[R] How to interpret and modify plot.svm?

2004-12-17 Thread David Meyer
Frank: Dear R people, I am trying to plot the results from running svm in library(e1071). I use plot.svm. After searching through the help archives and FAQ, I still have several questions: 1. In default, crosses indicate support vectors. But why are there two colors of crosses? What do

[R] Union of list elements

2004-12-17 Thread Pat Meyer
__ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] Union of list elements

2004-12-17 Thread Pat Meyer
Hi, First of all, let me thank you all for replying so rapidly to my first question on this list. It was very very helpfull... and I'm learning R faster and faster. I just encountered a second problem, which may also have a simple solution. Here it is: In my program, a vector is a set of

RE: [R] Factor analysis with dichotomous variables

2004-12-17 Thread Doran, Harold
You can use factanal to do the analysis. The polychor() package will give you polychorics. You can then the do the factor analysis on this correlation matrix. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Denson Sent: Friday, December 17, 2004

RE: [R] Union of list elements

2004-12-17 Thread Liaw, Andy
From: Gabor Grothendieck Pat Meyer paterijk at hotmail.com writes: : : Hi, : : First of all, let me thank you all for replying so rapidly to my first : question on this list. It was very very helpfull... and I'm learning R : faster and faster. : : I just encountered a second

[R] package.skeleton()

2004-12-17 Thread XIAO LIU
Hi, R people: I generated a package using package.skeleton(). But I can not load it using library(). package.skeleton(RDIPcor, list = c(ROCAUC.i, cor.i), path = /home/xiao) Creating directories ... Creating DESCRIPTION ... Creating READMEs ... Saving functions and data ... Making help files

[R] Union of list elements

2004-12-17 Thread Patrick Meyer
Thank you Gabor. But I have a problem with the beginning of my algorithm, where the list you call L is empty... then the code breaks down... It says: Error in any(...,na.rm = na.rm) : incorrect argument type How can I handle this? Thank you very much for your help Patrick

Re: [R] Union of list elements

2004-12-17 Thread Patrick Burns
Andy, I don't think that you should be so quick to put yourself down. Your solution just needs a 'sort' put in it so that order doesn't matter. With Andy's solution the object can now be a character vector rather than a list and 'match' can be used for testing new items: newitems -

RE: [R] Union of list elements

2004-12-17 Thread Liaw, Andy
Initialize the list with the first vector, instead of an emtry list, if you can. Andy From: Patrick Meyer Thank you Gabor. But I have a problem with the beginning of my algorithm, where the list you call L is empty... then the code breaks down... It says: Error in any(...,na.rm =

[R] behaviour of BIC and AICc code

2004-12-17 Thread Joe Nocera
Dear R-helpers I have generated a suite of GLMs. To select the best model for each set, I am using the meta-analysis approach of de Luna and Skouras (Scand J Statist 30:113-128). Simply put, I am calculating AIC, AICc, BIC, etc., and then using whichever criterion minimizes APE (Accumulated

Re: [R] package.skeleton()

2004-12-17 Thread Thomas Lumley
On Fri, 17 Dec 2004, XIAO LIU wrote: Hi, R people: I generated a package using package.skeleton(). But I can not load it using library(). It looks as though you didn't do anything except run package.skeleton(). As the output of package.skeleton() and the help page suggest, you need further

Re: [R] Union of list elements

2004-12-17 Thread Gabor Grothendieck
Patrick Meyer patrick.meyer at internet.lu writes: : : Thank you Gabor. : : But I have a problem with the beginning of my algorithm, where the list : you call L is empty... then the code breaks down... It says: : : Error in any(...,na.rm = na.rm) : incorrect argument type : : How can I

[R] font size (library stats)

2004-12-17 Thread zhang qingyou
Hello! With library stats I use command plot and get a cluster dendrogram. But I have more than 250 labels and the labels were superposed on cluster dendrogram. So what option should I use to zoom out the characters of the labels. Your sincerely, Qingyou [[alternative HTML version

Re: [R] reshape and split

2004-12-17 Thread Gabor Grothendieck
Patrick Hausmann c18g at zfn.uni-bremen.de writes: : : Dear R-users, : : I am trying to reshape the DF dat2 in the long format, : but can't figure out how to use the split-option: : : dat2 :a.1995.z b.1995.z a.1996.zvar : 1 100.0 100.0 100.0 Neue Anlagen

[R] Confidence Intervals from Bootstrap Replications

2004-12-17 Thread Mohammad A. Chaudhary
Hi All: I have to compute bootstrap confidence intervals, the statistic (incremental cost effectiveness ratio) is computed from two samples (intervention and control) of different sizes. All the bootstrap functions that I have seen use one dataset as argument. I may go ahead and get the desired

RE: [R] Confidence Intervals from Bootstrap Replications

2004-12-17 Thread Berton Gunter
See , e.g. section 8.3 The two-sample problem of Efron and Tibshirani's AN INTRODUCTION TO THE BOOTSTRAP. It makes it clear there why one just bootstrap samples independently from the two separate samples. The strata argument of boot() in the boot package allows one to do such independent

Re: [R] SAS or R software

2004-12-17 Thread Frank E Harrell Jr
Alexander C Cambon wrote: I apologize for adding this so late to the SAS or R software thread. This is a question, not a reply, but it seems to me to fit in well with the subject of this thread. I would like to know anyone's experiences in the following two areas below. I should add I have no

RE: [R] Massive clustering job?

2004-12-17 Thread Dan Bolser
On Wed, 15 Dec 2004, Wiener, Matthew wrote: It sounds like clara in package cluster might help. Cheers, this looks just the ticket. How should I choose k though? Dan. Regards, Matt Wiener -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Bolser

Re: [R] SAS or R software

2004-12-17 Thread Douglas Bates
Alexander C Cambon wrote: I apologize for adding this so late to the SAS or R software thread. This is a question, not a reply, but it seems to me to fit in well with the subject of this thread. I would like to know anyone's experiences in the following two areas below. I should add I have no

Re: [R] Union of list elements

2004-12-17 Thread Gabor Grothendieck
Patrick Meyer patrick.meyer at internet.lu writes: : : It does not exactly do what it is meant to... Instead of breaking down, : my code is looping forever now... I think I will have a deeper look at : it tomorrow... : : In fact, I have two lists: let's say L and N. : : An elements (or set)

RE: [R] SAS or R software

2004-12-17 Thread Austin, Matt
One point that is missing in this discussion is ease of review by the statistician at the FDA. As a statistician in clinical trials, you want to make it as easy as possible for your colleague at the FDA to do their job, so you put the programs in a format that they are more likely to find useful.

[R] For help

2004-12-17 Thread ys03165003
Hi During using the R(vision 2.0.1), I meet a problem. I would like to do the Multiple Correspondence Analysis, but when I use the mca(lf, nf = 2, abbrev = FALSE), the sentence Error: couldn't find function 'mca' will appear. So, please tell me how can I use the mca(), thanks!

Re: [R] Factor analysis with dichotomous variables

2004-12-17 Thread Chris Lawrence
On Fri, 17 Dec 2004 13:07:08 -0500, Doran, Harold [EMAIL PROTECTED] wrote: You can use factanal to do the analysis. The polychor() package will give you polychorics. You can then the do the factor analysis on this correlation matrix. -Original Message- From: [EMAIL PROTECTED]

Re: [R] For help

2004-12-17 Thread Jin Shusong
On Sat, Dec 18, 2004 at 11:14:16AM +0800, [EMAIL PROTECTED] wrote: Hi During using the R(vision 2.0.1), I meet a problem. I would like to do the Multiple Correspondence Analysis, but when I use the mca(lf, nf = 2, abbrev = FALSE), the sentence Error: couldn't find function 'mca'

Re: [R] For help

2004-12-17 Thread Spencer Graves
By requesting 'help.search(mca)', I learned that mca was in library(MASS). Did you try library(MASS) before your mca command? hope this helps. spencer graves p.s. Using 'help.search' was suggested by the posting guide, www.R-project.org/posting-guide.html. [EMAIL PROTECTED]

[R] Union of list elements

2004-12-17 Thread Patrick Meyer
Thanx to all of you who helped me with my sets problem. ;-) Patrick __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html