[R] r: functions

2005-02-24 Thread Clark Allan
hi all i have a function that uses two inputs, say xdata and ydata. An example is the following, simple1-function(xdata,ydata) { ofit-lm(ydata~xdata) list(ofit) } say i use arbitray number for xdata and ydata such that D = x1 x2 y 1 1 10 2 6

Re: [R] Problems with html help system: help.start()

2005-02-24 Thread Martyn Plummer
There was a packaging error. A new RPM version is on its way to CRAN. Thanks. Martyn On Wed, 2005-02-23 at 21:35 -0500, John Sorkin wrote: I am having problems installing R under Fedora Core 3. I installed R using YUM yum -install R. The basic installation appears to have worked, I can

[R] zeichnung eines wahrscheinlichkeitsnetztes

2005-02-24 Thread ernst hoffer
ich hätte ein problem: im rahmen meiner projektarbeit stehe ich vor der aufgabe, einen beliebigen datensatzt einzulesen, die empirische verteilungsfunktion des datensatztes zu zeichnen, aber das ganze so, dass die y-achse nach der quantilsfunktion der exponetialverteilung mit parameter=1

Re: [R] r: functions

2005-02-24 Thread TEMPL Matthias
Hello, I have no errors with simple1: d - matrix(c(1,2,3,1,6,10,10,6,7),ncol=3) colnames(d) - c(one, two, three) x- d[,c(1,2)] y-d[,3] y [1] 10 6 7 simple1(x,y) [[1]] Call: lm(formula = ydata ~ xdata) Coefficients: (Intercept) xdataone xdatatwo -6 21

Re: [R] r: functions

2005-02-24 Thread Dimitris Rizopoulos
There was a similar question about one week ago regarding the use of table(x,y). One approach could be to use the following: simple1 - function(xdata, ydata){ ofit - substitute(lm(ydata~xdata)) list(eval.parent(ofit)) } # simple1(xdata=x, ydata=y) lm(y~x) I hope it helps. Best,

Re: [R] to print dataframe

2005-02-24 Thread Petr Pikal
Hi Perhaps write.table(, row.names=FALSE) Cheers Petr On 23 Feb 2005 at 15:39, [EMAIL PROTECTED] wrote: Dear all, Is it possible to print a dataframe without the row numbers? For example if I have a dataframe like that: df -

Re: [R] zeichnung eines wahrscheinlichkeitsnetztes

2005-02-24 Thread Sander Oom
Hi Ernst, Pretty soon some one is going to: 1) tell you that the mailing list is in English, 2) that you should provide more details of your data and 2) that your message should show signs that you have read the posting guide and have searched the help documentation in a first attempt to find

[R] Forward Stepwise regression based on partial F test

2005-02-24 Thread Smit, Robin
I am hoping to get some advise on the following: I am looking for an automatic variable selection procedure to reduce the number of potential predictor variables (~ 50) in a multiple regression model. I would be interested to use the forward stepwise regression using the partial F test. I

Re: [R] zeichnung eines wahrscheinlichkeitsnetztes

2005-02-24 Thread Uwe Ligges
Sander Oom wrote: Hi Ernst, Pretty soon some one is going to: 1) tell you that the mailing list is in English, 2) that you should provide more details of your data and 2) that your message should show signs that you have read the posting guide and have searched the help documentation in a first

Re: [R] basic question about changing limits on generated plots

2005-02-24 Thread Jan T. Kim
On Wed, Feb 23, 2005 at 09:14:50PM -0500, rif wrote: This does not do what the matlab code I posted does (the matlab code also works in the free program octave, if you want to try). The matlab code moves already plotted data within the window (replots it). When I first type plot(1:10,1:10),

Re: [R] Slightly off topic but concerning R#DSC-2005

2005-02-24 Thread Duncan Murdoch
On Wed, 23 Feb 2005 11:52:26 +0100, Ritter, Christian C GSMCIL-GSTMS/2 [EMAIL PROTECTED] wrote : Has anyone seen an official announcement to DSC-2005. It's just been posted to R-devel; you can see it online at http://tolstoy.newcastle.edu.au/R/devel/05/02/2326.html Duncan Murdoch

[R] How to code a bootstrap version of the Wilcoxon-Mann-Whitney test?

2005-02-24 Thread Scalone, Luciana
Dear Stefan I need to apply a Mann Whitney test to my data, by applying a bootstrap, in R. Loonkig for an answer in internet I found your question to the R mailing list but I have not found the answer to your question. Please, could you help me? thank you very much in advance. Best regards

[R] problem (bug?) with prelim.norm (package norm)

2005-02-24 Thread Andreas Wolf
dear list members, there seems to be a problem with the prelim.norm function (package norm) as number of items in the dataset increases. the output of prelim.norm() is a list with different summary statistics, one of them is the missingness indicator matrix r. it lists all patterns of missing

Re: [R] a question about function eval()

2005-02-24 Thread Uwe Ligges
Feng Chen wrote: Hi, I have a question about the usage of eval(). Wonder if any experienced user can help me out of it. I use eval() in the following function: semireg.pwl - function(coef.s=rnorm(1),coef.a=rnorm(1),knots.pos=knots.x,knots.ini.val=knots.val){ knotn - length(knots.pos)

Re: [R] Forward Stepwise regression based on partial F test

2005-02-24 Thread Frank E Harrell Jr
Smit, Robin wrote: I am hoping to get some advise on the following: I am looking for an automatic variable selection procedure to reduce the number of potential predictor variables (~ 50) in a multiple regression model. I would be interested to use the forward stepwise regression using the

Re: [R] Graphics

2005-02-24 Thread Adrian Dusa
Prof Brian Ripley ripley at stats.ox.ac.uk writes: On Tue, 22 Feb 2005 Cedric.Ginestet at tvu.ac.uk wrote: The R platform that I installed on my Windows XP crashes everytime that I try to run some sophisticated graphics (e.g. Demo Graphics). Is that to do with the configuration? Shall

Re: [R] r: functions

2005-02-24 Thread Clark Allan
hi i still get the same error. i must be doing something wrong. i have typed in all of the steps i used. D x1 x2 y 1 1 1 10 2 2 6 6 3 3 10 7 x-D[,1:2] y-D[,3] x x1 x2 1 1 1 2 2 6 3 3 10 y [1] 10 6 7 simple1 - function(xdata, ydata){ + ofit -

Re: [R] r: functions

2005-02-24 Thread Dimitris Rizopoulos
probably D (it would be better not to use D since this is reserved for an R function) is a data.frame and thus also x - D[,1:2] is a data.frame! try this: D - data.frame(x1=1:3, x2=c(1,6,10), y=c(10,6,7)) # your data.frame D. - data.matrix(D) x - D.[,1:2] y - D.[,3] simple1 - function(xdata,

[R] Re: r: functions

2005-02-24 Thread Clark Allan
hi all i worked it out. the following code seems to work. thanx for those who replied to previous questions. simple1-function(xdata,ydata) { DATA-data.frame(ydata,xdata) ofit-summary(lm(ydata~.,data=DATA)) list(ofit) } simple1(x,y) simple1(x,y) [[1]] Call: lm(formula

Re: [R] Forward Stepwise regression based on partial F test

2005-02-24 Thread Alex
Robin, You may see leaps() (package leaps). It deals with all subsets regression considering several chosen criteria. beste Regards, Alex models -- Início da mensagem original --- De: [EMAIL PROTECTED] Para: Smit, Robin [EMAIL PROTECTED] Cc: r-help@stat.math.ethz.ch Data:

Re: [R] Graphics

2005-02-24 Thread Prof Brian Ripley
On Thu, 24 Feb 2005, Adrian Dusa wrote: Prof Brian Ripley ripley at stats.ox.ac.uk writes: On Tue, 22 Feb 2005 Cedric.Ginestet at tvu.ac.uk wrote: The R platform that I installed on my Windows XP crashes everytime that I try to run some sophisticated graphics (e.g. Demo Graphics). Is that to do

[R] other than default labels in lattice plot

2005-02-24 Thread Petr Pikal
Dear all I solved a problem of customised labels on strips and boxes in bwplot by this construction. bbb - bwplot(zavoj ~ typmleti | pu) bbb$condlevels$pu - c(Povrchov prava, Bez PU) bbb$x.limits - c(Mleto, Mleto a stovno, Nemleto) bbb but I wonder if some other easy option exist. Let say

Re: [R] a question about function eval()

2005-02-24 Thread Feng Chen
- Original Message - From: Feng Chen [EMAIL PROTECTED] To: Uwe Ligges [EMAIL PROTECTED] Sent: Thursday, February 24, 2005 9:52 PM Subject: Re: [R] a question about function eval() Dear Uwe, Thanks for your advice. As you may have noticed, I am a newbie to R and not fully aware of the

[R] Why R GUI application so slow

2005-02-24 Thread Zhesi He
Hi, All, I use RGtk and Rtcltk to build some graphical interface for bioinformatics data analysis applications. I'm just wondering why the graphic display is so slow. For example, I tried to build a 2000 rows 5 levels tree with both Rgtk and Rtcltk. RGtk cost about 15 seconds and Rtcltk about

Re: [R] survreg with gamma distribution: re-post

2005-02-24 Thread Thomas Lumley
On Thu, 24 Feb 2005, Roger Dungan wrote: Dear r-help subscribers, A couple of weeks ago I sent the following message to the r-help mail list. It hasn't generated any response, and I could really use some help on this. Anyone able to help? You can't easily fit a gamma distribution with survreg()

[R] model matrix for random effects (lme)

2005-02-24 Thread Doran, Harold
Greetings. Is it possible to extract the model matrix (Z) for the random effects from an lme object? For example, assume the model has two levels of random effects as in: Y = XB + Zu + e model.matrix() gives the matrix X only. For example: tt-model.matrix(distance~age, Orthodont,

Re: [R] Place more than one key with xyplot

2005-02-24 Thread Deepayan Sarkar
On Thursday 24 February 2005 06:12, Gesmann, Markus wrote: Dear R-users I have some trouble to generate more than one key with xyplot using the legend argument. I would like one key with rectangles: library(lattice) library(grid) key1 - list(rectangles = list(col=

[R] Bayesian stepwise (was: Forward Stepwise regression based on partial F test)

2005-02-24 Thread Spencer Graves
Does anyone know of research fully Bayesian stepwise procedures assuming that models not considered by the stepwise would essentially have zero posterior probability? I need to analyze the results of ad hoc experiments run in manufacturing with crazy confounding and possible

Re: [R] circ.summary question

2005-02-24 Thread Christian J. Caruso
When using circ.summary is it is necessary to convert radian data? I have run circ.summary and it reports an n of 1 when I have 2620 points. Thanks, Chris __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] circ.summary question

2005-02-24 Thread Duncan Murdoch
On Thu, 24 Feb 2005 10:36:21 -0700, Christian J. Caruso [EMAIL PROTECTED] wrote : When using circ.summary is it is necessary to convert radian data? I have run circ.summary and it reports an n of 1 when I have 2620 points. You need to give more details. What package is circ.summary in? What

Re: [R] other than default labels in lattice plot

2005-02-24 Thread Deepayan Sarkar
On Thursday 24 February 2005 08:03, Petr Pikal wrote: Dear all I solved a problem of customised labels on strips and boxes in bwplot by this construction. bbb - bwplot(zavoj ~ typmleti | pu) bbb$condlevels$pu - c(Povrchov prava, Bez PU) bbb$x.limits - c(Mleto, Mleto a stovno, Nemleto)

RE: [R] power.anova.test for interaction effects

2005-02-24 Thread Andrew Kniss
Using the data set posted at http://uwstudentweb.uwyo.edu/A/AKNISS/sbxherb.txt I obtained this output from R: data(sbxherb) attach(sbxherb) sbxherb$rep-factor(c(I,II,III)) sbxherb$var-factor(sbxherb$var) sbxherb$trt-factor(sbxherb$trt, labels=c(Check,Early,Late,Micro)) detach(sbxherb)

[R] Do environments make copies?

2005-02-24 Thread Nawaaz Ahmed
I am using environments to avoid making copies (by keeping references). But it seems like there is a hidden copy going on somewhere - for example in the code fragment below, I am creating a reference to y (of size 500MB) and storing the reference in object data. But when I save data and then

[R] 3 boxplots in one

2005-02-24 Thread Dean Sonneborn
I currently have 3 separate boxplots but would like to put them all in the graphic so they would have the same scale. Below are the three statements and as you can see the Y axis is weight: bwplot(AWGT~ male2 bwplot(AWGT ~ bin_pcb2 . bwplot(AWGT ~ bin_pcb2 | male2 . Does anyone

RE: [R] 3 boxplots in one

2005-02-24 Thread Liaw, Andy
Do you want the boxplots to be in the same panel, or different panels, but the same page/window? If the former, it's probably easiest to construct a data frame that will let you use bwplot to put them in the same panel. If the latter, see the help page for print.trellis on how you can place

[R] string concatenation operator

2005-02-24 Thread Harris A. Jaffee
Why doesn't R have one, like . in Perl or juxtaposition in awk? It does not seem impossible to introduce one, if that would be reasonable. It would seem to involve adding a table entry to main/names.c for the binary operator and a corresponding internal function, say do_dot(). This cannot be

Re: [R] Logic regression equation in character form?

2005-02-24 Thread Earl F. Glynn
Perhaps I can ask a more focused question: Earl F. Glynn [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I want to get some simple logic regression examples to work before exploring a hard problem. .. logicfit - logreg(resp=Y, bin=X, type = REGRESSION.TYPE-2,

Re: [R] string concatenation operator

2005-02-24 Thread Gabor Grothendieck
Harris A. Jaffee hjaffee at jhmi.edu writes: : Why doesn't R have one, like . in Perl or juxtaposition in awk? You could define one like this: R %+% - function(x,y) paste(x,y,sep=) R abc %+% def [1] abcdef __ R-help@stat.math.ethz.ch mailing list

Re: [R] Logic regression equation in character form?

2005-02-24 Thread Thomas Lumley
On Thu, 24 Feb 2005, Earl F. Glynn wrote: Why does this NOT work? typeof(logicfit) [1] list class(logicfit) [1] logreg x - paste(print(logicfit)) score 0.968 +2.14 * (((not X4) or ((not X13) and X19)) and (not X3)) -1.25 * not X1) or (not X3)) and ((not X2) or X20)) and (((not X17) and X16) or

[R] Density of the Multivariate T Distribution

2005-02-24 Thread Jan Bulla
Hi, I am looking for an efficient way to compute the values of the density function of a multivariate T distribution - something like dmvnorm, but for T distr. Does this exist somewhere? Many thanks, Jan Bulla Goettingen University __

Re: [R] and [ESS] Starting ESS

2005-02-24 Thread Vincent Goulet
To answer your question: I don't think it matters. If you're willing to use FSG Emacs instead of XEmacs, I repackaged Emacs 21.3 for Windows together with recent versions of ESS and AuCTeX for my students (I personally run Linux). The package and installation instructions are at:

RE: [R] Logic regression equation in character form?

2005-02-24 Thread Glynn, Earl
-Original Message- From: Thomas Lumley [mailto:[EMAIL PROTECTED] You want capture.output(). Thank you! This is exactly what I needed. efg __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] string concatenation operator

2005-02-24 Thread Spencer Graves
Can we do something to make the following work: +.character - function(x,y) paste(x,y,sep=) abc+def Error in abc + def : non-numeric argument to binary operator Thanks, spencer graves Gabor Grothendieck wrote: Harris A. Jaffee hjaffee at jhmi.edu writes: : Why doesn't R have

Re: [R] problem (bug?) with prelim.norm (package norm)

2005-02-24 Thread Uwe Ligges
Please report bugs in contributed R packages to the packages' maintainers, in this case Alvaro A. Novo (in CC). Uwe Ligges Andreas Wolf wrote: dear list members, there seems to be a problem with the prelim.norm function (package norm) as number of items in the dataset increases. the output of

RE: [R] string concatenation operator

2005-02-24 Thread McGehee, Robert
Not without extending character to another class. If you try to define this + method using S4, you get a proper error indicating that addition over characters is not allowed. setMethod(+, signature(character, character), function(e1,e2) paste(e1,e2, sep = )) Error in

RE: [R] string concatenation operator

2005-02-24 Thread Liaw, Andy
I believe not, because: get(+) .Primitive(+) i.e., it's not an S3 generic. Andy From: Spencer Graves Can we do something to make the following work: +.character - function(x,y) paste(x,y,sep=) abc+def Error in abc + def : non-numeric argument to binary operator

RE: [R] Do environments make copies?

2005-02-24 Thread Berton Gunter
I was hoping that one of the R gurus would reply to this, but as they have't (thus far) I'll try. Caveat emptor! First of all, R passes function arguments by values, so as soon as you call foo(val) you are already making (at least) one other copy of val for the call. Second,you seem to

Re: [R] string concatenation operator

2005-02-24 Thread Spencer Graves
Thanks to both Robert McGehee and Andy Liaw for their informative (and quick) replies. Best Wishes, spencer graves McGehee, Robert wrote: Not without extending character to another class. If you try to define this + method using S4, you get a proper error indicating that addition

Re: [R] Density of the Multivariate T Distribution

2005-02-24 Thread Rolf Turner
Jan Bulla wrote: I am looking for an efficient way to compute the values of the density function of a multivariate T distribution - something like dmvnorm, but for T distr. Does this exist somewhere? Searching CRAN I found the ``sn'' package which includes the function dmst() which

RE: [R] Do environments make copies?

2005-02-24 Thread Luke Tierney
On Thu, 24 Feb 2005, Berton Gunter wrote: I was hoping that one of the R gurus would reply to this, but as they have't (thus far) I'll try. Caveat emptor! First of all, R passes function arguments by values, so as soon as you call foo(val) you are already making (at least) one other copy of val

[R] [R-pkgs] New package for microeconomics: micEcon

2005-02-24 Thread Arne Henningsen
Dear all, I have uploaded a new package called micEcon (version 0.1-3) to CRAN (an early version of this package has been already presented at useR! 2004). It contains tools for microeconomic analysis and microeconomic modeling. These are for instance: - tools for demand analysis with the

[R] accurate log(1+x) {was (arbitrary) precision}

2005-02-24 Thread Martin Maechler
Gabor == Gabor Grothendieck [EMAIL PROTECTED] on Fri, 18 Feb 2005 02:55:15 + (UTC) writes: Gabor Michael Grottke Michael.Grottke at duke.edu Gabor writes: : I am currently using R for fitting a model Gabor to various data sets : (minimizing the negative Gabor

RE: [R] help: how to get coefficients from the result

2005-02-24 Thread McGehee, Robert
?coef should do the trick. -Original Message- From: mingan [mailto:[EMAIL PROTECTED] Sent: Thursday, February 24, 2005 5:12 PM To: r-help@stat.math.ethz.ch Subject: [R] help: how to get coefficients from the result I am using timereg and Survreg packages below is the output, but

[R] main effect interaction in 2-way ANOVA

2005-02-24 Thread array chip
Hi, I am just a little confused of mian effect in the analysis of variance (ANOVA) when you include or do not include an interaction term. Let's assume a simple case of 2-way ANOVA with 2 factors A and B, each with 2 levels. If it shows that main effect for A is significant when the interaction

RE: [R] string concatenation operator

2005-02-24 Thread Henrik Bengtsson
.Primitive() does not necessarily apply non-S3 generic function, cf. as.character(). An options is to do + - function(...) UseMethod(+) +.default - .Primitive(+) +.character - function(...) paste(...,sep=) abc + def + ghi # [1] abcdefghi The question is if you want to do this. The + is

[R] Simulation Progress

2005-02-24 Thread Carsten Steinhoff
Hi, I've made a function that executes a monte-carlo simulation. It always needs a lot of time until e.g. 1Mio simulation steps are done. So I would like to know, how many percent of the work is already done. In an Excel/VBA Solution I could easily implement a status bar or status window. How

Re: [R] main effect interaction in 2-way ANOVA

2005-02-24 Thread Peter Dalgaard
array chip [EMAIL PROTECTED] writes: Hi, I am just a little confused of mian effect in the analysis of variance (ANOVA) when you include or do not include an interaction term. Let's assume a simple case of 2-way ANOVA with 2 factors A and B, each with 2 levels. If it shows that main

Re: [R] Graphics

2005-02-24 Thread John Dougherty
On Thursday 24 February 2005 04:13, Adrian Dusa wrote: ... You need to check your font installation. Be sure the X-11 fonts are installed. XFree86-fonts-75dpi-4.3.99.902-30 XFree86-fonts-100dpi-4.3.99.902-30 Should both be on your system. If they aren't bring up the YaST control center

Re: [R] main effect interaction in 2-way ANOVA

2005-02-24 Thread Gabor Grothendieck
array chip arrayprofile at yahoo.com writes: : : Hi, : : I am just a little confused of mian effect in the : analysis of variance (ANOVA) when you include or do : not include an interaction term. Let's assume a simple : case of 2-way ANOVA with 2 factors A and B, each with : 2 levels. If it

Re: [R] Bayesian stepwise

2005-02-24 Thread Kjetil Brinchmann Halvorsen
Spencer Graves wrote: Does anyone know of research fully Bayesian stepwise procedures assuming that models not considered by the stepwise would essentially have zero posterior probability? I need to analyze the results of ad hoc experiments run in manufacturing with crazy confounding

[R] How to set up number of prin comp.

2005-02-24 Thread WeiQiang . Li
Hello, I am trying to use PrinComp to do principle component analysis. I would like to know how to set the number of principle components. Thanks in advance. Best Regards, WeiQiang Li IT-FIS Development Tel: 6485-2439 [[alternative HTML version deleted]]

[R] calculatingmean value for duplicates in affy array

2005-02-24 Thread Dren Scott
Hi , I was trying read in an affy array/matrix and then to calculate the mean value for all the duplicates. Is there a function in the R package that would do this? I tried the help function and searched for 'duplicate'. Although it provides a list of functions that would eliminate the

RE: [R] Bayesian stepwise (was: Forward Stepwise regression based onpartial F test)

2005-02-24 Thread dr mike
oops, Forgot to cc to the list. Regards, Mike -Original Message- From: dr mike [mailto:[EMAIL PROTECTED] Sent: 24 February 2005 19:21 To: 'Spencer Graves' Subject: RE: [R] Bayesian stepwise (was: Forward Stepwise regression based onpartial F test) Spencer, Obviously the problem is

Re: [R] Simulation Progress

2005-02-24 Thread Philippe Grosjean
Carsten Steinhoff wrote: Hi, I've made a function that executes a monte-carlo simulation. It always needs a lot of time until e.g. 1Mio simulation steps are done. So I would like to know, how many percent of the work is already done. In an Excel/VBA Solution I could easily implement a

RE: [R] string concatenation operator

2005-02-24 Thread Prof Brian Ripley
On Fri, 25 Feb 2005, Henrik Bengtsson wrote: .Primitive() does not necessarily apply non-S3 generic function, cf. as.character(). You mean `imply'? In fact + *is* S3 generic and has methods defined: methods(+) [1] +.Date +.POSIXt It is also group-generic, part of the Ops group with many more