[R] RDCOMServer
Hi there, I downloaded RDCOMServer and the related packages from Omegahat. Tried their R.Evaluator example. But failed to invoke any method from the client side. When I looked at R.Evaluator from OLE View (some Microsoft development tool for browsing all the OLEs), I got the following error message from R.Evaluator: CoGetClassObject failed Class not registered REGDB_E_CLASSNOTREG ($80040154) RDCOMServer's isRegistered method said R.Evaluator was registered. So, what's wrong? Thanks. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] parse on left hand side of R assignment
On Sat, 31 May 2003, Paul E. Johnson wrote: I keep finding myself in a situation where I want to calculate a variable name and then use it on the left hand side of an assignment. For example iteration - 1 varName - paste(run,iteration,sep=) myList$parse(text=varName) - aColumn In this particular case you can just use myList[[varName]]-aColumn. I don't think you can (easily) use assign, despite the suggestion -- it doesn't dispatch assignment methods. If you wanted to do something of this sort for which the above didn't work you could also learn about substitute() eval(substitute(myList$newColumn-aColumn), list(newColumn=as.name(varName))) as an alternative to parse(). -thomas __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Help with Temporal series
Good afternoon R-masters, I am with some doubts in the R, see the script below: m-c(69.6,67.3,75.6,74.3,64.7,60,65.7,62.5,66.5) d-c(11.6,15,17.8,18.3,11.2,11,4.6,5.8,7) year-c(1994,1995,1996,1997,1998,1999,2000,2001,2002) male-ts(m,start=c(1994)) death-ts(d,start=c(1994)) data-data.frame(year,death,male) require(ts) d100-HoltWinters(data$death,gamma=0) m100-HoltWinters(data$male,gamma=0) par(mfrow=c(3,1)) plot(d100,main=Death) plot(m100,main=Male) ccf(male,death) I have 2 doubts: 1 - How to I should interpret the third graph? 2 - Has a hypothesis test to evaluate the cross-correlation it is significant in R? Thanks in advance Bernardo Rangel Tura, MD, MSc National Institute of Cardiology Laranjeiras Rio de Janeiro Brazil __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] persp colors
Dear R experts! I use image() persp() functions for color plotting z(x,y)-type graphics. In image() colors correspond to z-values, that's what I want. OTOH, in persp() the col option means: col: the color(s) of the surface facets. Transparent colours are ignored. This is recycled to the (nx-1)(ny-1) facets. but I'd like to persp()' colors behave like in image() function! Could you help me to solve this problem? Thank you very much. -- WBR, Timur. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] persp colors
Timur Elzhov wrote: Dear R experts! I use image() persp() functions for color plotting z(x,y)-type graphics. In image() colors correspond to z-values, that's what I want. OTOH, in persp() the col option means: col: the color(s) of the surface facets. Transparent colours are ignored. This is recycled to the (nx-1)(ny-1) facets. but I'd like to persp()' colors behave like in image() function! Could you help me to solve this problem? Thank you very much. -- WBR, Timur. That's not easy, because you have to redefine x, y and z values. Simple example: x - y - 1:2 z - matrix(1:4, 2) image(x, y, z)# OK, quite nice but persp(x, y, z) has only one facet. So the only way is to calculate the 9 values for x, y, and z to get the corners for the 4 facets in it. That's easy for x and y, but can be impossible for z... Uwe Ligges __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] persp colors
On Sun, Jun 01, 2003 at 06:53:55PM +0200, Uwe Ligges wrote: but I'd like to persp()' colors behave like in image() function! That's not easy, because you have to redefine x, y and z values. Simple example: x - y - 1:2 z - matrix(1:4, 2) image(x, y, z)# OK, quite nice but persp(x, y, z) has only one facet. So the only way is to calculate the 9 values for x, y, and z to get the corners for the 4 facets in it. That's easy for x and y, but can be impossible for z... OK, thank you for answer! But, I saw that other mathematic frameworks (CERN ROOT for instance) can plot 3D surfaces with colors corresponding to z-value. Is there way to do this in R (with another functions/packages)? It's not necessary to use _one_ color per facet, yes?.. :) -- WBR, Timur. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] compositional data: percent values sum up to 1
What are you trying to do? What I would do with this depends on many factors. spencer graves Christoph Lehmann wrote: again, under another subject: sorry, maybe an all too trivial question. But we have power data from J frequency spectra and to have the same range for the data of all our subjects, we just transformed them into % values, pseudo-code: power[i,j]=power[i,j]/sum(power[i,1:J]) of course, now we have a perfect linear relationship in our x design-matrix, since all power-values for each subject sum up to 1. How shall we solve this problem: just eliminate one column of x, or introduce a restriction which says exactly that our power data sum up to 1 for each subject? Thanks a lot Christoph __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] integrate
Im tryng to understand an error i get with integrate. this is 1.7.0 on solaris 2.8. ##i am trying to approximate an integral of this function, f-function(b) exp(-(b-mu)^2/(2*tau2))/(p-exp(b))*10^6 ##with tau2 - .005;mu - 7.96;p - 2000 ##from -inf to different upper limits. using integrate(f,-Inf,log(p-exp(1))) ##i get the following error: ##Error in integrate(f, -Inf, log(p - exp(1))) : ## the integral is probably divergent ##whats confusing is that i only get this error when i use upper limit ##in the range [log(p-2),log(p-1)] ##try this: x - seq(1,10,.1) y - sapply(x,function(i){ x - try(integrate(f,-Inf,log(p-i)),silent=TRUE) if(class(x)==try-error) return(NA) else return(x$val) }) x[is.na(y)] ##if i use stop=FALSE, the curve is interpolated nicely plot(x,y) y - sapply(x,function(i) x - integrate(f,-Inf,log(p-i),stop=FALSE)$val ) lines(x,y) ##there doesnt appear to be anything strange about the function in ##the 2-3 region. x - seq(1,5,.1) xx - log(p-x) plot(x,f(xx)) abline(v=c(2,3)) ##any ideas on why this is happening? ##ps - same thing happens with: ##f - function(b) exp(-(b-mu)^2/(2*tau2) - log(p-exp(b)))*10^6 ##it doesnt with ##f-function(b) exp(-(b-mu)^2/(2*tau2))/(p-exp(b)) __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Simulating a variable following an arbitrary distribution
Hi, I'd like to know if there's anything in R that could help me do that. Let's suppose I have a density function of a random variable, for example f(x) = (x^3)/4 0 x 2 and I would like to simulate it. For the common distributions (exponencial, gamma, cauchy) there are the r-functions (rgamma, rexp, runif, rcauchy, and so on).. But when the variable I want to simulate is not one of those, how should I procede? I read some references on the subject and saw that there are some algorithms that can do that, but I just wonder if there is any implemented in R? Thank you, -- __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Simulating a variable following an arbitrary distribution
Hi, Use the Inverse transformation method. See any basic Cbook in simulation for instance Sheldon Ross's book. Regards, Edgar On Mon, 2 Jun 2003, Fernando Henrique Ferraz Pereira da Rosa wrote: Hi, I'd like to know if there's anything in R that could help me do that. Let's suppose I have a density function of a random variable, for example f(x) = (x^3)/4 0 x 2 and I would like to simulate it. For the common distributions (exponencial, gamma, cauchy) there are the r-functions (rgamma, rexp, runif, rcauchy, and so on).. But when the variable I want to simulate is not one of those, how should I procede? I read some references on the subject and saw that there are some algorithms that can do that, but I just wonder if there is any implemented in R? Thank you, -- __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Simulating a variable following an arbitrary distribution
Your specific example is a scaled beta. Therefore, 2*rbeta(1000, 4, 1) will generate 1000 random numbers according to that distribution. You can get the same distribution from 2*qbeta(runif(1000), 4, 1). We can generalize this last example to any case of interest. Example: df4 - function(x)(x^3)/4 pf4 - function(q)(q^4)/16 qf4 - function(p)(16*p)^0.25 rf4 - function(n)qf4(runif(n)) Then rf4(1000) will produce 1000 pseudo-random deviates following this distribution. hth. spencer graves Edgar Acuna wrote: Hi, Use the Inverse transformation method. See any basic Cbook in simulation for instance Sheldon Ross's book. Regards, Edgar On Mon, 2 Jun 2003, Fernando Henrique Ferraz Pereira da Rosa wrote: Hi, I'd like to know if there's anything in R that could help me do that. Let's suppose I have a density function of a random variable, for example f(x) = (x^3)/4 0 x 2 and I would like to simulate it. For the common distributions (exponencial, gamma, cauchy) there are the r-functions (rgamma, rexp, runif, rcauchy, and so on).. But when the variable I want to simulate is not one of those, how should I procede? I read some references on the subject and saw that there are some algorithms that can do that, but I just wonder if there is any implemented in R? Thank you, -- __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Re: Re: Submited (004756-3463) #DF/010989#
This is an automated response. SkillSoft Support has received your message and this issue has been assigned ticket number : DF/010989 Please ensure that #DF/010989# appears in the subject line of any further emails on this issue so that we can identify the original issue, and you are not allocated a new ticket number. Thank You. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] extending subsets over another variable..
Hi, I've been trying to learn and use R for data analysis, and so far it has be OK. It is very slow with the aov command. But, other than that things are generally OK. Anyway, todays problem is one that I have looked in quite a few places to try to solve but to know avail. I hope the list can help. I have my data organized in the appropriate way (i.e. a data point on each row and columns for each variable). I want to divide my subjects up by a median. However, I don't want the overall subject median but a subset, and then to split the entire subjects data on that subset. I don't see a way to do that at all. Any help would be appreciated. to make things clearer, here is an example of how to split subject by median ss-split(s, ave(s$x, s$subj) median(ave(s$x,s$subj))) what I need to do is split by subject when s is further split by a sub factor. TIA John Christie __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] want to write a package for R
hello,everyone! I have studied in univ. for two years.and my teacher have put out some stat. model .and i want to write it to a R package, and take it to my future paper.any advise? i learned something about SAS/stat. and i have read the tutorial of R. now i can interactive with R,and write R file.but i didn't have a contour of how to write a package. R extension said package is consisted of DESCRIPTION,INDEX,subdirectories ,bundles.should i write all the file? thank you. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] compositional data: percent values sum up to 1
I want to do a logistic regression analysis, and to compare with, a discriminant analysis. The mentioned power maps are my exogenous data, the dependent variable (not mentioned so far) is a diagnosis (ill/healthy) thanks for the interest and the help Christoph On Sun, 2003-06-01 at 21:01, Spencer Graves wrote: What are you trying to do? What I would do with this depends on many factors. spencer graves Christoph Lehmann wrote: again, under another subject: sorry, maybe an all too trivial question. But we have power data from J frequency spectra and to have the same range for the data of all our subjects, we just transformed them into % values, pseudo-code: power[i,j]=power[i,j]/sum(power[i,1:J]) of course, now we have a perfect linear relationship in our x design-matrix, since all power-values for each subject sum up to 1. How shall we solve this problem: just eliminate one column of x, or introduce a restriction which says exactly that our power data sum up to 1 for each subject? Thanks a lot Christoph __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help -- Christoph Lehmann [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] want to write a package for R
Hello, You should start creating a separate directory for your package (e.g. foo). As a minimum you need three things: 1) your R functions (as .R files in directory foo/R) 2) documentation of your functions in .Rd format (look writing R extensions and function prompt(), they must reside in foo/man directory) 3) The DESCRIPTION file (in the foo directory). Everything else is made by R. Now run R CMD build foo in the directory above (where the subdir foo is lying). It was pretty easy to do on linux, with windows you probably need necessary tools as perl. Otherwise, it should be similar. Bundles are just collections of different packages, probably not for you right now. Perhaps it helps. Ott | Date: Sun, 1 Jun 2003 16:02:13 +0800 (CST) | From: Ìì²Å [EMAIL PROTECTED] | hello,everyone! | I have studied in univ. for two years.and my teacher have put out | some stat. model .and i want to write it to a R package, and take | it to my future paper.any advise? i learned something about SAS/stat. | and i have read the tutorial of R. | now i can interactive with R,and | write R file.but i didn't have a contour of how to write a package. | R extension said package is consisted of DESCRIPTION,INDEX,subdirectories | ,bundles.should i write all the file? | thank you. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Help - Curvature measures of nonlinearity
Dear colleagues, Von Bertalanffy model is commonly adjust to data on fish length (TL) and age (AGE) TL= Linf*(1-exp(-K*(AGE-t0)). Linf, K and t0 are parameters of the model. One main goal of the growth study is the comparison of growth parameter estimates between sexes of the same species, or estimates from different populations. The realibility statistical tests normally applied are highly dependent on the nonlinearity of the model used. Are there any developed routines in R ? to: 1) calculate the maximum intrinsic curvature 2) maximum parameter affecting curvature 3) plot the two dimensional cross sections of confidence regions (for different alpha values) of the model parameters Regards, Ivone Figueiredo [[alternate HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Rounding problem R vs Excel
For numbers ending in 5 Excel always rounds up and I want to reproduce this in R rather than use the round function. I have tried: x-as.integer(x*100+0.5)/100 and x-floor(x*100+0.5)/100 However, some values of x cause problems e.g x-floor(4.145*100+0.5)/100 4.14 I have tried breaking it down into steps and force the results to 10 significant figures in the following function, which seems to work roundoff-function(x){ a-signif(x*100+0.5,digits=10) roundoff-floor(a)/100 roundoff } Is there a more sensible way of do this for all numbers? Thanks Mike [[alternate HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] want to write a package for R
wrote: Hello ??, hello,everyone! I have studied in univ. for two years.and my teacher have put out some stat. model .and i want to write it to a R package, and take it to my future paper.any advise? i learned something about SAS/stat. SAS/stat, hmmm, not very interesting given you are going to write an *R* package. and i have read the tutorial of R. now i can interactive with R,and write R file.but i didn't have a contour of how to write a package. R extension said package is consisted of DESCRIPTION,INDEX,subdirectories ,bundles.should i write all the file? Great, you already found the Writing R Extensions manual. Indeed, just do what's descibed in there. Uwe Ligges PS: Please configure you mailtool to send plain text messages. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] authorized characters and symbols
Hi R lovers Obviously I cannot use the underscore _ character to name an object in R Is there a special reason for that ? I want to use it to rename a function maybe the problem is due to the nature of the object I work on thanks for any comments on that very little and not very bothering trouble * Ce message et toutes les pieces jointes (ci-apres le message) sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. This message and any attachments (the message) are confidentia... {{dropped}} __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] authorized characters and symbols
On Mon, 2 Jun 2003 [EMAIL PROTECTED] wrote: Obviously I cannot use the underscore _ character to name an object in R Actually, you can but it is more trouble than it is worth as you will always have to quote the name, and often explicitly get it: my_pi - pi get(my_pi) [1] 3.141593 Is there a special reason for that ? Yes, it is allowed for assignment, but not for much longer. Once it is removed for assignment (1.8.0) it will be allowed as part of a name after a decent interval. I want to use it to rename a function maybe the problem is due to the nature of the object I work on thanks for any comments on that very little and not very bothering trouble -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] (no subject)
I would be gratefulf if anybody can help me with this problem. I have not a experience with R language, actually this is my first job with it : I have write some instructions for acomplish a simulation, and I have 36 conditions with 1000 iterations each one . The program runs without problems, but in the 19 nth condition gives and error message (after running some iterations of this condition) is: Error in var(x, na.rm = na.rm) : missing observations in cov/cor Somebody would give me any clue about the origin of this error? There is any probability that the origin of the problem is the scarcitie of resources? ( I don´t understand how is possible a programming error). Any help will be welcome. --- ALICIA LÓPEZ JÁUREGUI DEPARTAMENTO DE PSICOLOGIA SOCIAL Y METODOLOGIA FACULTAD DE PSICOLOGIA Avda. de Tolosa, 70 20018 DONOSTIA (SPAIN) TEL.: 943 / 018340 E-MAIL: [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Re: R-help Digest, Vol 3,Issue 29: RE: Ordinal Data - regression trees prop. odds
1. RE: Ordinal data - Regression Trees Proportional Odds (Liaw, Andy) AFAIK there's no implementation (or description) of tree algorithm that handles ordinal response. Regression trees with an ordinal response variable can be computed with SPSS Answer Tree 3.0. Andreas Christmann - Andreas Christmann University of Dortmund Department of Statistics 44221 Dortmund Germany - Phone: +231 / 755 3180 Email: [EMAIL PROTECTED] WWW: http://www.statistik.uni-dortmund.de/de/content/einrichtungen/lehrstuehle/datenanalyse.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] RE: Ordinal data - Regression Trees Proportional Odds
1. RE: Ordinal data - Regression Trees Proportional Odds (Liaw, Andy) AFAIK there's no implementation (or description) of tree algorithm that handles ordinal response. Regression trees with an ordinal response variable can be computed with SPSS Answer Tree 3.0. Andreas Christmann -- - Andreas Christmann University of Dortmund Department of Statistics 44221 Dortmund Germany - Phone: +231 / 755 3180 Email: [EMAIL PROTECTED] WWW: http://www.statistik.uni-dortmund.de/de/content/einrichtungen/lehrstuehle/datenanalyse.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Virus Warning
The message you emailed to [EMAIL PROTECTED], dated 06/02/03 08:22:59, contains the W32/Sobig-C virus in the movie.pif attachment. The action taken was: deleted the attachment. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Virus Warning
The message you emailed to [EMAIL PROTECTED], dated 06/02/03 08:25:23, contains the W32/Sobig-C virus in the movie.pif attachment. The action taken was: deleted the attachment. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Undeliverable: Re: Submited (004756-3463)
Your message To: [EMAIL PROTECTED] Subject: Re: Submited (004756-3463) Sent:Mon, 2 Jun 2003 00:48:50 -0700 did not reach the following recipient(s): [EMAIL PROTECTED] on Mon, 2 Jun 2003 00:48:02 -0700 The recipient name is not recognized MSEXCH:IMS:Intel:Americas01:FMSMSX019 0 (000C05A6) Unknown Recipient __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Mail delivery failed: returning message to sender
This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: [EMAIL PROTECTED] SMTP error from remote mailer after RCPT TO:[EMAIL PROTECTED]: host cus.cam.ac.uk [131.111.8.20]: 550 Unknown user - see http://www.cam.ac.uk/cs/email/bounce.html -- This is a copy of the message, including all the headers. -- Return-path: [EMAIL PROTECTED] Received: from [134.151.78.134] (helo=PY-EFORD) by gold.csi.cam.ac.uk with esmtp (Exim 4.20) id 19MoSQ-0001S6-F5 for [EMAIL PROTECTED]; Mon, 02 Jun 2003 13:30:34 +0100 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: 45443-343556 Date: Mon, 2 Jun 2003 13:30:38 +0100 Importance: Normal X-Mailer: Microsoft Outlook Express 6.00.2600. X-MSMail-Priority: Normal X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=CSmtpMsgPart123X456_000_006B3C26 Message-Id: [EMAIL PROTECTED] X-Cam-ScannerAdmin: [EMAIL PROTECTED] X-Cam-AntiVirus: Not scanned X-Cam-SpamDetails: scanned, SpamAssassin (score=4.8, required 10, FORGED_MUA_OUTLOOK, MISSING_MIMEOLE, NO_REAL_NAME) X-Cam-SpamScore: This is a multipart message in MIME format --CSmtpMsgPart123X456_000_006B3C26 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Please see the attached file. --CSmtpMsgPart123X456_000_006B3C26-- __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help