Re: [R] Setting qplot default options

2007-10-10 Thread Dieter Menne
hadley wickham gmail.com> writes: > > On 10/10/07, Christoph Krammer altaica.de> wrote: > > is there a possibility to set default options to qplot? > > Sure. It's a bit of hack, but: > > GeomPoint$default_aes <- function(x) aes(shape=19, colour="red", size=5) > > will do what you want. > >

Re: [R] Problem with RCMD CHECK (or BUILD)

2007-10-10 Thread Ollivier TARAMASCO
Dear all, Thank you for your answers. I didn't notice there were new versions of Rtools and gcc, and I had also problems with the order in my PATH. Now it works! Ollivier TARAMASCO -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Duncan Murdoch Envoyé 

Re: [R] weird (?) resid(.) from 2-level lme()

2007-10-10 Thread Dieter Menne
Irene Mantzouni difres.dk> writes: > I am trying to fit a 2-level hierarchical lme(). > I can extract ranef() and coef() without problems for levels=1:2. > However, when it comes to resid() at level=2, the resulting list has some unnamed entries (label="NA"). I > checked with my data (NAs have

Re: [R] Rearranging dataset

2007-10-10 Thread Dieter Menne
Megh Dal yahoo.com> writes: > > Hi all, I have a datasei like this : > > ID Date Price > aa 01/01/07 12 > aa01/02/07 13 > bb 01/01/0723 > bb01/02/0712 > > > Now I want to write them in following format : > > ID

Re: [R] Rearranging dataset

2007-10-10 Thread Megh Dal
I want to create a data-frame. any idea? Moshe Olshansky <[EMAIL PROTECTED]> wrote: What do you mean by write - write to file, create a data.frame? --- Megh Dal wrote: > Hi all, I have a datasei like this : > > ID Date Price > aa 01/01/07 12 > aa 01/02/07 13 > bb 01/01/07 23 > bb 01/02/07 12

[R] Rearranging dataset

2007-10-10 Thread Megh Dal
Hi all, I have a datasei like this : ID Date Price aa 01/01/07 12 aa01/02/07 13 bb 01/01/0723 bb01/02/0712 Now I want to write them in following format : ID Date Price ID Date

Re: [R] Searching for attributes

2007-10-10 Thread Rolf Turner
On 11/10/2007, at 2:58 PM, Eric Turkheimer wrote: > Is it possible to search the objects in the search list for certain > attributes, eg, matrices with a given number of rows? Of course. With R anything is possible, but often --- as in this case --- you have to code it up yourse

[R] Searching for attributes

2007-10-10 Thread Eric Turkheimer
Is it possible to search the objects in the search list for certain attributes, eg, matrices with a given number of rows? Thanks, Eric -- Eric Turkheimer, PhD Department of Psychology University of Virginia PO Box 400400 Charlottesville, VA 22904-4400 434-982-4732 434-982-4766 (FAX) [

Re: [R] simple function with if -> lapply to dataframe

2007-10-10 Thread Julian Burgos
Hi Georg, The answer is in the warning message In if (x < 0) a <- -1 else a <- 1 : the condition has length > 1 and only the first element will be used Basically you are passing a vector of length>1 to a control flow expression (if() in this case) that requires only a vector of length one. See

Re: [R] average waveform over many cycles

2007-10-10 Thread Moshe Olshansky
Hi Bill, You get cyclelemgth = 110. If this is true, i.e if every 110 points of data represent an entire cycle then everything is all right, but are you sure this is true? Think what happens if the true cycle length was 110.5 data points. Regards, Moshe. --- Bill Simpson <[EMAIL PROTECTED]> wro

[R] The Financial Daily. News Headlines for Thursday, October 11, 2007

2007-10-10 Thread dailynews
The Financial Daily website Click here to visit our website. News for Thursday, October 11, 2007 Front Page News Heavy shelling on Al Qaeda dens 12-

Re: [R] read sas data into R

2007-10-10 Thread Wensui Liu
Mary, My feeling is to tell other language read SAS data is like the pain on the A**. Instead, a solution I'd like to use is to use some lightweight DB to do the data transfer. For instance, SAS shouldn't have no problem to libname to a sqlite DB using ODBC and then R is able to easily read sqlite

Re: [R] Rooting trees using ape

2007-10-10 Thread Simon Blomberg
Please supply enough information to allow us to reproduce the error. Also, nirK.tree is a different object to nirk.tree, which might be confusing things. Simon. On Wed, 2007-10-10 at 15:07 +0200, Chris Jones wrote: > Hi all, > > I seem to be having a difficult time using the 'ape' package in R

Re: [R] 2 Sample Confidence Interval - Formatting Data?

2007-10-10 Thread Moshe Olshansky
Hello Wayne, Welch Test (as suggested by M.S.) can be a good choice, but since your sample is very small you must ask yourself what can you assume about the two samples (i.e. do they come from more or less normal distributions, etc.). Regards, Moshe. --- Wayne Aldo Gavioli <[EMAIL PROTECTED]> w

Re: [R] psi using .C with R

2007-10-10 Thread Katharine Mullen
in case you are not aware: the function psi is available without a port; see help(digamma). On Wed, 10 Oct 2007, Bernardo Lagos Alvarez wrote: > > Hi All, > > Anybody know as run the function psi on > > > http://www.alglib.net/translator/dl/specialfunctions.psi.csharp.zip > > or > > http://www.

[R] weird (?) resid(.) from 2-level lme()

2007-10-10 Thread Irene Mantzouni
Hi all! I am trying to fit a 2-level hierarchical lme(). I can extract ranef() and coef() without problems for levels=1:2. However, when it comes to resid() at level=2, the resulting list has some unnamed entries (label="NA"). I checked with my data (NAs have been omitted) and I found out tha

Re: [R] Deleting the White Space in an R graph

2007-10-10 Thread Greg Snow
The squishplot function in the TeachingDemos package will move the axes and other annotation closer to the plot so there is less whitespace within the plot region (there will still be whitespace in the margin areas beyond the axes and labels). Is this what you want? To completely eliminate all th

Re: [R] Deleting the White Space in an R graph

2007-10-10 Thread Bert Gunter
As usual, explicit code would help (see the posting guide)-- what kinds of graphs (R has at least three separate systems)? What "graphs/maps" in particular?. But presumably a careful reading of ?par with particular attention to the mar parameter (possibly also xlim/ylim) might solve your problem .

[R] psi using .C with R

2007-10-10 Thread Bernardo Lagos Alvarez
Hi All, Anybody know as run the function psi on http://www.alglib.net/translator/dl/specialfunctions.psi.csharp.zip or http://www.alglib.net/translator/dl/specialfunctions.psi.cpp.zip using .C or .Fortran ? Thank for your attention. Bernardo.

[R] Deleting the White Space in an R graph

2007-10-10 Thread nalluri pratap
Hi All, Is there a way we can delete the empty white space around when we generate any graph/map using R? The final output should be onaly a picture with no white spaces all around. Cheers, Pratap - 5, 50, 500, 5000 - Store N number of mails

Re: [R] Deleting for() loop in function

2007-10-10 Thread Duncan Murdoch
On 10/10/2007 2:03 PM, Alberto Monteiro wrote: > Jim Holtman wrote: >> >> One of the things that you should do is to use Rprof >> to see where time is being spent. >> > Rprof is great! I didn't know such functionality existed. > > But I am a very destructive user; I think I found a way > to break

Re: [R] simple function with if -> lapply to dataframe

2007-10-10 Thread Leeds, Mark (IED)
temp <- data.frame(x=rnorm(20), y=rnorm(20) signdf<-lapply(temp, function(.col) ifelse( .col < 0, -1, 1)) But I'm not sure how to take those two lists and make a data frame back out of them. Any help is still appreciated because this is only a partial solution. -Original Message- From:

Re: [R] simple function with if -> lapply to dataframe

2007-10-10 Thread Marc Schwartz
On Wed, 2007-10-10 at 15:43 -0400, Georg Ehret wrote: > Dear R, >I am writing a simple function to extract the sign of values and apply it > to a data frame (see below). Whatever I do I get error-messages... What is > wrong? > > Thanking you in advance, > Cheers, Georg. > *

Re: [R] simple function with if -> lapply to dataframe

2007-10-10 Thread James W. MacDonald
Hi Georg, Georg Ehret wrote: > Dear R, >I am writing a simple function to extract the sign of values and apply it > to a data frame (see below). Whatever I do I get error-messages... What is > wrong? The main problem here is you are ignoring existing functions that will do the job much bette

Re: [R] disperse variable

2007-10-10 Thread Julian Burgos
Hi Stefo, You can use strsplit(), something like this: strsplit(x,split="_") You'll get a list with the three vectors. Julian Stefo Ratino wrote: > Hello all, > > I read the following variable > > x > x > 1 1_A1_ML1_a.DLL > 2 11_B1_ML2_a.DLL > 3 4_A1_ML3_a.DLL > 4 5

[R] simple function with if -> lapply to dataframe

2007-10-10 Thread Georg Ehret
Dear R, I am writing a simple function to extract the sign of values and apply it to a data frame (see below). Whatever I do I get error-messages... What is wrong? Thanking you in advance, Cheers, Georg. *** Georg Ehret Institute of Genetic Medicine Johns Hopkins University

Re: [R] Clustering techniques using R

2007-10-10 Thread ngottlieb
Maura: I looked at the scatter plots you sent. A few thoughts: 1- Patient 3 data has a lot of missing data. This will make doing a good grouping against your cases an issue. Missing data is so common and much work has been done in this area. One can do the trivial approach, forward fill a

Re: [R] (no subject)

2007-10-10 Thread Jim Porzak
Joao, I can't reproduce your results. Try: str(A) When I read in the data frame A, I see > str(A) 'data.frame':10 obs. of 4 variables: $ date: int 2006070100 2006070101 2006070102 2006070103 2006070104 2006070105 2006070106 2006070107 2006070108 2006070109 $ my1 : int 1244 1221 1214 119

Re: [R] Visualize cox proportional hazards

2007-10-10 Thread Sandrine-et-Francois
Here you go http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=114 Also have a look @ http://www.bmj.com/cgi/reprint/322/7300/1479.pdf HTH Francois - Original Message - From: "Armin Goralczyk" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: Sent: Wednesday, October 10, 2007

Re: [R] Deleting for() loop in function

2007-10-10 Thread jim holtman
There are a couple of outputs from Rprof. One shows time spent in the function (and everything that it calls) and the other in the function itself. What I do is to post process the output from Rprof into a format that is easier to understand. In this case, the Rprof run took 12.2 seconds of whic

[R] date format conversion problem

2007-10-10 Thread Ben Bolker
Joao Santos-7 wrote: > > Hello, > > I problem is in the format of the date, my time series is like this: > > [snip] > > When I attempt to format the time like this: > > A <- read.table("file", sep="\t", col.names=c("date", "my1", "my2", > "my3")) > temp <- as.Date(A$date, format="%Y%m%d%H")

Re: [R] Deleting for() loop in function

2007-10-10 Thread Alberto Monteiro
Jim Holtman wrote: > > One of the things that you should do is to use Rprof > to see where time is being spent. > Rprof is great! I didn't know such functionality existed. But I am a very destructive user; I think I found a way to break Rprof: if I do f <- my.slow.function then call f(...)

[R] about regression tree label

2007-10-10 Thread Aimin Yan
Hello, I have a question about splitting label in regression tree. for example, by using the following command plot(m.regression.tree.pr,uniform=T,margin=0.05,branch=0.7,compress=F) text(m.regression.tree.pr,pretty=0) I get a tree with one label in some splitting node like this bcu<0.004969 Now

Re: [R] caTools package

2007-10-10 Thread Prof Brian Ripley
You haven't told us your OS or R version (as we did ask). But until last night there was not a version of caTools that worked correctly in the current R (>= 2.6.0), so you may need to be patient. On Wed, 10 Oct 2007, Judith Flores wrote: > Hi, > > I tried to install the caTools package manual

Re: [R] How to create something between a script and a package

2007-10-10 Thread Douglas Bates
On 10/8/07, Sergio Correia <[EMAIL PROTECTED]> wrote: > (Before starting: I'm a total R noob so please bear with me in case of > any error or faux pas). > > Hi, > > For a small project, I'm writing a few simple R functions and calling > them from python (using RPy). I'm sharing the code with a coup

Re: [R] Deleting for() loop in function

2007-10-10 Thread jim holtman
One of the things that you should do is to use Rprof to see where time is being spent. I would guess that is the not the 'for' loop, but instead what is being done inside it. My guess it that most of the time is being spent in the number of times that 'lp' is being called. So the real problem mig

Re: [R] Rooting trees using ape

2007-10-10 Thread Ben Bolker
Chris Jones-35 wrote: > > Hi all, > > I seem to be having a difficult time using the 'ape' package in R > when it comes to rooting trees. Here's a short screenshot: > > [snip] > > Can you post your dataset, or a subset of it that replicates the problem, somewhere? (On the list if sho

[R] caTools package

2007-10-10 Thread Judith Flores
Hi, I tried to install the caTools package manually from the main R Project website and I get the following error message when typing library('caTools') Error in library("caTools") : 'caTools' is not a valid package -- installed < 2.0.0? What am I doing wrong? Also, why is this package

Re: [R] transparent colors

2007-10-10 Thread Greg Snow
It can be as simple as: > plot( rnorm(1000), rnorm(1000), col="#ff22", pch=16,cex=3) Where the color is "#RRGGBBAA" and the AA portion is the opacity/trasparency. Of course this only works if you are using a graphics device that supports transparency. The windows device under R 2.6.0 does (

Re: [R] Help with gamm errors

2007-10-10 Thread Simon Wood
Rob, Thanks for sending the example... > > m1=gamm(present~s(week,bs="cc")+s(week,bs="cc",by=y1),random=list(garden=~1 >) , > correlation=corAR1(form=~1|garden),family=binomial,data=count.data2) > > (ie removing the week term). This model proceeds - to a point... > > Maximum number of PQL itera

Re: [R] transparent colors

2007-10-10 Thread Prof Brian Ripley
See ?rgb and the article by Paul Murrell in R-news 2004-2. (The details of where it is supported have changed in the last three years, though.) On Wed, 10 Oct 2007, Markus Loecher wrote: > Dear R graphics experts, > Do you know of any way of plotting semi-transparent points in R ? > I face this

Re: [R] as.dist with diagonal unequal zero

2007-10-10 Thread Sarah Goslee
You may be better off using a complete distance matrix and a model matrix describing plant sex, as explained in Legendre and Fortin 1989 and elsewhere. Otherwise you will have to write your own Mantel code - all the examples I know of (vegan and ecodist, primarily) assume that diagonals are zero w

Re: [R] transparent colors

2007-10-10 Thread Uwe Ligges
See ?rgb and its alpha argument, for example. Uwe Ligges Markus Loecher wrote: > Dear R graphics experts, > Do you know of any way of plotting semi-transparent points in R ? > I face this problem any time I want to e.g. plot thousands of points > that belong to two or three classes which I co

[R] (no subject)

2007-10-10 Thread Joao Santos
Hello, I problem is in the format of the date, my time series is like this: 2006070100 1244 6162 2006070101 1221 6060 2006070102 1214 6060 2006070103 1194 5959 2006070104 1182 5858 2006070105 1178

[R] transparent colors

2007-10-10 Thread Markus Loecher
Dear R graphics experts, Do you know of any way of plotting semi-transparent points in R ? I face this problem any time I want to e.g. plot thousands of points that belong to two or three classes which I color code. With the default opaque colors, the plotting order matters and basically the po

Re: [R] gee, error=104

2007-10-10 Thread Prof Brian Ripley
On Wed, 10 Oct 2007, Michel Chavance wrote: > I am using gee to fit a log-linear marginal model to grouped data. I > get sensible results unfortunately followed by this warning > > Warning message: > Note: Cgee had an error (code= 104 ). Results suspect. in: > gee(formula = event ~ exgr + agegr +

[R] gee, error=104

2007-10-10 Thread Michel Chavance
I am using gee to fit a log-linear marginal model to grouped data. I get sensible results unfortunately followed by this warning Warning message: Note: Cgee had an error (code= 104 ). Results suspect. in: gee(formula = event ~ exgr + agegr + indiv + offset(loginterval), Does anyone knows what

[R] Thank you, and your suggestion works

2007-10-10 Thread HU,ZHENGJUN
Hi Jim, What you told me works well. I have tried using 'eval(parse(text="1:20 = x"))' as well as 'try(parse(text="1:20 = x"))' before but not using eval anfd try functions together. I just added try function following your suggestion, e.g. 'try(eval(parse(text="1:20 = x")))'and then it w

Re: [R] simulated data using empirical distribution

2007-10-10 Thread Dieter Menne
Tom Sgouros as220.org> writes: > What I have is twelve bins of data, and the population > in each bin. The top bin is open-ended, and the whole distribution is > more or less poisson-ish. > > I can think of a couple of ways to fake this ok, but is there a real R > way to do it? > hist(rpois(

Re: [R] as.dist with diagonal unequal zero

2007-10-10 Thread Birgit Lemcke
This are distances but between male and female plants of the same species. species A B C D E --> male A B C D | female I would like to do a Manteltest. Birgit Am 10.10.2007 um 16:59 schrieb Gustaf Rydevik:

Re: [R] download.file not working

2007-10-10 Thread Henrik Bengtsson
On 10/10/07, Gustaf Rydevik <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm trying to download a file from the net, and the download.file > command leaves it corrupted, i.e excel cannot open it. It seems as if > it's going ok, however. > Does anyone have an idea of what's going on? > > regards, > > Gu

Re: [R] download.file used incorrectly (was not working)

2007-10-10 Thread Prof Brian Ripley
On Wed, 10 Oct 2007, Gustaf Rydevik wrote: > Hi all, > > I'm trying to download a file from the net, and the download.file > command leaves it corrupted, i.e excel cannot open it. It seems as if > it's going ok, however. > Does anyone have an idea of what's going on? That is a binary file. You n

Re: [R] as.dist with diagonal unequal zero

2007-10-10 Thread Gustaf Rydevik
On 10/10/07, Birgit Lemcke <[EMAIL PROTECTED]> wrote: > Hello and sorry that I still haven´t found a solution for my problem. > > I need to extract the lower and upper triangle from a square matrix > including the diagonal. This diagonal is not zero in that special case. > I tried with as.dist > >

Re: [R] How do I obtain the design matrix of an lm()?

2007-10-10 Thread Bert Gunter
If all you're doing is fitting different responses to the same X data, then you don't need model.matrix. See ?update, ?update.formula. Bert Gunter Genentech Nonclinical Statistic -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ajay Shah Sent: Tuesday, O

Re: [R] subsetting a data.frame

2007-10-10 Thread Peter Dalgaard
jim holtman wrote: > Is this what you want? > > >> x <- read.table(textConnection("Score Name >> > + 88 19_0070 > + 88 19_0070 > + 87 19_0070 > + 79 002127_0658 > + 79 002127_0658 > + 77 002127_0658"), header=TRUE)

Re: [R] as.dist with diagonal unequal zero

2007-10-10 Thread Gavin Simpson
On Wed, 2007-10-10 at 16:42 +0200, Birgit Lemcke wrote: > Hello and sorry that I still haven´t found a solution for my problem. > > I need to extract the lower and upper triangle from a square matrix > including the diagonal. This diagonal is not zero in that special case. How can a site have a

[R] Deleting for() loop in function

2007-10-10 Thread Dong-hyun Oh
Dear UseRs, I wrote following function in order to solve Data Envelopment Analysis. Reason for posting is that the function is slow when nrow(dat) is large. I wonder if other functions could substitute the for() loop in the code, such as mapply(). Can anybody help to rewrite the dea() function

[R] Great candidates - great value!

2007-10-10 Thread London4Jobs
This is a text part of the message. It is shown for the users of old-style e-mail clients __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email

[R] download.file not working

2007-10-10 Thread Gustaf Rydevik
Hi all, I'm trying to download a file from the net, and the download.file command leaves it corrupted, i.e excel cannot open it. It seems as if it's going ok, however. Does anyone have an idea of what's going on? regards, Gustaf Rydevik >download.file(url="http://www.who.int/entity/whosis/

Re: [R] simulated data using empirical distribution

2007-10-10 Thread Daniel Lakeland
On Wed, 2007-10-10 at 10:13 -0400, Tom Sgouros wrote: > Hello all: > > I'm sure this is a trivial request, but I'm still a beginner at this, > and haven't been able to find it. I need to create simulated data based > on some empirical distributions of a single variable. I've found R > functions

[R] as.dist with diagonal unequal zero

2007-10-10 Thread Birgit Lemcke
Hello and sorry that I still haven´t found a solution for my problem. I need to extract the lower and upper triangle from a square matrix including the diagonal. This diagonal is not zero in that special case. I tried with as.dist w<-as.dist(w, diag = TRUE) > w 1 2 3 4 5 1 0 2 2 0 3

Re: [R] R dynamic memory management

2007-10-10 Thread Maura E Monville
I forgot to attach my script. I work under pressure and make a lot of these mistakes. Sorry. I have attached it right now. I'm lso pasting the messages appearing on R GUI in the following. I see the average becomes NA which makes me think that for some reason R interpreter is reading out of the loa

[R] disperse variable

2007-10-10 Thread Stefo Ratino
Hello all, I read the following variable > x x 1 1_A1_ML1_a.DLL 2 11_B1_ML2_a.DLL 3 4_A1_ML3_a.DLL 4 55_C1_ML4_a.DLL 5 14_C1_ML5_a.DLL I would like to disperse it in three variable such as > x1 [1] 1 11 4 55 14 > x2 [1] "A1" "B1" "A1" "C1" "C1" > x3 [1] "ML1" "ML

[R] simulated data using empirical distribution

2007-10-10 Thread Tom Sgouros
Hello all: I'm sure this is a trivial request, but I'm still a beginner at this, and haven't been able to find it. I need to create simulated data based on some empirical distributions of a single variable. I've found R functions to help me simulate data based on analytical distributions, or to

[R] detrending a time series

2007-10-10 Thread Christoph Scherber
Dear R users, I am trying to ´detect´ the trend in an artificial time series created by the simple function x=seq(pi,10*pi,0.1) my.ts=0.1*x+sin(x) my.ts=ts(my.ts,start=1800) plot(my.ts) I have tried stl(my.ts), but because I don´t have ´replications´ at every time point, this somehow doesn´t

Re: [R] How to catch a R error in R code

2007-10-10 Thread Kuhn, Max
Howard, > though it received the statement. I tried to use some R built-in > functions of try, tryCatch, eval, expression, as.expression, > parse, deparse, etc. None of them worked. How did they not work? What did you attempt? Did you use silent = TRUE in try? Please be more specific about t

[R] how to generate and evaluate a design using Algdesign

2007-10-10 Thread sun
Hi, I have some problems when using AlgDesign->optFederov() generating designs. I have 6 variables, all factors. 3^2 and 4^4, I want to have a design that can take care of main effects and two interactions within 2 pair of variables v3-v4 and v5-v6, the following is the code ##

Re: [R] How to catch a R error in R code

2007-10-10 Thread jim holtman
You need to follow the posting guide and provide commented, minimal, self-contained, reproducible code. I can only guess at what your code looks like, but the following catches the error: > z <- try(eval(parse(text="1:20 <- x"))) Error in eval(expr, envir, enclos) : object "x" not found > str(z)

Re: [R] Setting qplot default options

2007-10-10 Thread hadley wickham
On 10/10/07, Christoph Krammer <[EMAIL PROTECTED]> wrote: > Hello, > > is there a possibility to set default options to qplot? > > I need to draw a lot of graphs and would like to have all of them as point > plot but with a greater size and a fixed color for all dots. Sure. It's a bit of hack, bu

Re: [R] Visualize cox proportional hazards

2007-10-10 Thread Christos Hatzis
Armin, RSiteSearch("forest plot meta analysis") will point you to the metaplot function in the rmeta package. There is also a forestplot function in the same package that offers more flexibility. These plots are useful in meta analysis in general (e.g. showing odds ratios from different studies).

[R] How to catch a R error in R code

2007-10-10 Thread HU,ZHENGJUN
Hi All, I entered a R statement, e.g. 1:20 = x or log("a") on an HTML form and passed it to a R-CGI script. Obviously, neither of both is a correct R statement or expression. However, my R-CGI script could not return and report the error message to the Web site even though it received the st

Re: [R] Using expression for Italics and object evaluation in plot title

2007-10-10 Thread Gabor Grothendieck
The expression in plotmath must be valid R syntax. plot(1) p.val <- .1 title(sub=bquote(Log ~ rank ~ test ~ (italic(p)-value == .(p.val On 10/10/07, Daniel Brewer <[EMAIL PROTECTED]> wrote: > Thanks. That works great if I do this: > title(sub=bquote(italic(p)-value == .(p.val))) > > But if

[R] Setting qplot default options

2007-10-10 Thread Christoph Krammer
Hello, is there a possibility to set default options to qplot? I need to draw a lot of graphs and would like to have all of them as point plot but with a greater size and a fixed color for all dots. Thanks for help. Christoph __ R-help@r-project.org

Re: [R] Odp: Data manipulation question

2007-10-10 Thread Petr PIKAL
Petr PIKAL/CTCAP napsal dne 10.10.2007 15:03:28: > [EMAIL PROTECTED] napsal dne 10.10.2007 13:55:32: > > > Hi Petr, > > > > > d$z<-NA > > > d$z[d$x %in% d$id] <- d$y[d$id %in% d$x] > > > > > > works in this particular case but it means you do not have multiple same > > > ids and X > > > > Tha

Re: [R] Using expression for Italics and object evaluation in plot title

2007-10-10 Thread Daniel Brewer
Thanks. That works great if I do this: title(sub=bquote(italic(p)-value == .(p.val))) But if I add text to the beginning e.g. title(sub=bquote(Log rank test italic(p)-value == .(p.val))) I get an error message saying, Error: syntax error, unexpected SYMBOL, expecting ',' in "title(sub=bquote(Log

[R] Rooting trees using ape

2007-10-10 Thread Chris Jones
Hi all, I seem to be having a difficult time using the 'ape' package in R when it comes to rooting trees. Here's a short screenshot: > nirK.tree Phylogenetic tree with 23 tips and 21 internal nodes. Tip labels: Burkholder, Burkholde3, Burkholde1, Burkholde4, Burkholde5, Ralstonia2

Re: [R] window (x,y) co-ordinates of datapoints

2007-10-10 Thread Alberto Monteiro
Hadley Wickham wrote: > >>> Is there any hope that, instead of fin, din, pin, etc someday >>> we will have fmm, dmm, pmm? >> >> Why worry about that, Alberto, when you can use my ammazing function: >> >> mm2in(x) return(x/25.4) >> >> thus: >> >> par(pin=mm2in(126)) > > But be sure to use it consis

Re: [R] Odp: Data manipulation question

2007-10-10 Thread Petr PIKAL
[EMAIL PROTECTED] napsal dne 10.10.2007 13:55:32: > Hi Petr, > > > d$z<-NA > > d$z[d$x %in% d$id] <- d$y[d$id %in% d$x] > > > > works in this particular case but it means you do not have multiple same > > ids and X > > Thanks for the idea. But the problem is that I can have multiple > ids... >

Re: [R] Using expression for Italics and object evaluation in plot title

2007-10-10 Thread Gabor Grothendieck
Try bquote as in: http://tolstoy.newcastle.edu.au/R/e2/help/07/09/26353.html On 10/10/07, Daniel Brewer <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying to get a title on a plot that contains both some formatting > and prints the value of an object. What I have been using to get the > italics is

Re: [R] window (x,y) co-ordinates of datapoints

2007-10-10 Thread hadley wickham
On 10/10/07, Jim Lemon <[EMAIL PROTECTED]> wrote: > Alberto Monteiro wrote: > > Prof Brian Ripley wrote: > > > >>Read ?par and the descriptiuon in 'An Introduction to R'. "din", > >> "fin", "mai", "omi", "pin" and "usr" are relevant. > >> > > > > Is there any hope that, instead of fin, din, pin, e

Re: [R] subsetting a data.frame

2007-10-10 Thread jim holtman
Is this what you want? > x <- read.table(textConnection("Score Name + 88 19_0070 + 88 19_0070 + 87 19_0070 + 79 002127_0658 + 79 002127_0658 + 77 002127_0658"), header=TRUE) > # return best scores > best <- by(x, x$Name, f

[R] Warning message when using "reldist" package

2007-10-10 Thread Jing Shen
Dear R users, I'm using the "reldist" add-on package to calculate relative distribution in R as part of my research project. The subject is a general mental health score ranging from 0 to 12 (integer values only) with 0 indicating no mental health problem and positive values meaning some or sev

Re: [R] average waveform over many cycles

2007-10-10 Thread jim holtman
try: y <- matrix(x, ncol=400, byrow=TRUE) On 10/10/07, Bill Simpson <[EMAIL PROTECTED]> wrote: > Thanks Jim for the help. > > I forgot to say that one of my main snags is figuring how how to chop up > the one long (44100 samples) vector into pieces (400 of them). > > This is my C-inspired way of

Re: [R] save lm output into vectors

2007-10-10 Thread Chuck Cleland
Henrique Dallazuanna wrote: > Hi, > > mods <- lapply(lapply(df[,which(sapply(df, is.factor))], > function(reg)lm(df$value~reg)), summary) > res <- lapply(mods, "[", c(4,10)) > > And for each model adjusted: > 1-pf(res[[2]][[2]][1], res[[2]][[2]][2], res[[2]][[2]][3]) > 1-pf(res[[1]][[2]][1], res[

Re: [R] save lm output into vectors

2007-10-10 Thread jim holtman
It really depends on what you want to do with the values. If you are computing these in a loop, then I would suggest that you store the output of 'summary' in a list and you can then extract the values later. Can you provide an idea of what you want to do with them and how you are computing them.

Re: [R] average waveform over many cycles

2007-10-10 Thread Bill Simpson
Thanks Jim for the help. I forgot to say that one of my main snags is figuring how how to chop up the one long (44100 samples) vector into pieces (400 of them). This is my C-inspired way of thinking but there must be a better way in R. cyclelength=44100/400 for i= 1 to 400 for j= 1 to cycleleng

Re: [R] Data manipulation question

2007-10-10 Thread Gabor Grothendieck
Try this: transform(d, z = y[match(x, id)]) On 10/10/07, Julien Barnier <[EMAIL PROTECTED]> wrote: > Hi all, > > Suppose I have the following data.frame, with an id column and two > variables columns : > > idX Y > 0001 NA 21 > 0002 NA 13 > 0003 000145 >

Re: [R] chi2

2007-10-10 Thread Ted Harding
On 10-Oct-07 10:59:43, elyakhlifi mustapha wrote: > Hello, > I want to use the quantile function so I read the doc but I don't > understand with this > >> qchisq(seq(0.05,0.95,by=0.05),df=(length(don)-1)) > [1] 62667.11 62795.62 62882.42 62951.47 63010.74 63064.00 63113.39 > 63160.27 63205.65 632

Re: [R] save lm output into vectors

2007-10-10 Thread Henrique Dallazuanna
Hi, mods <- lapply(lapply(df[,which(sapply(df, is.factor))], function(reg)lm(df$value~reg)), summary) res <- lapply(mods, "[", c(4,10)) And for each model adjusted: 1-pf(res[[2]][[2]][1], res[[2]][[2]][2], res[[2]][[2]][3]) 1-pf(res[[1]][[2]][1], res[[1]][[2]][2], res[[1]][[2]][3]) On 09/10/2

Re: [R] Odp: Data manipulation question

2007-10-10 Thread Julien Barnier
Hi Petr, > d$z<-NA > d$z[d$x %in% d$id] <- d$y[d$id %in% d$x] > > works in this particular case but it means you do not have multiple same > ids and X Thanks for the idea. But the problem is that I can have multiple ids... In fact in the meantime I found a solution by using row names : R> d

Re: [R] chi2

2007-10-10 Thread Alberto Monteiro
Oops... Check... http://en.wikipedia.org/wiki/Chi-square_distribution The Chi-square distribution for _any_ df has mean = df and variance = 2df, so for large df, it's approximately a normal distribution with mean = df and sd = sqrt(2 df) [and not sqrt(df) as I wrote in a previous message that, pr

Re: [R] chi2

2007-10-10 Thread Alberto Monteiro
Elyakhlifi Mustapha wrote: > > I want to use the quantile function so I read the doc but I don't > understand with this > > > qchisq(seq(0.05,0.95,by=0.05),df=(length(don)-1)) > [1] 62667.11 62795.62 62882.42 62951.47 63010.74 63064.00 63113.39 > 63160.27 63205.65 63250.33 63295.04 63340.48 63

Re: [R] average waveform over many cycles

2007-10-10 Thread Jim Lemon
Bill Simpson wrote: > I have 400 cycles of a noisy waveform. I would like to find the average > (over the 400 cycles) of one cycle. Please tell me to do it in R. Any > suggestions welcome! > Hi Bill, I recently had to do something like this for an "approach to target" curve. The steps were: 1) C

Re: [R] Problem with RCMD CHECK (or BUILD)

2007-10-10 Thread Duncan Murdoch
On 10/10/2007 6:41 AM, Prof Brian Ripley wrote: > We do recommend > > Rcmd build mpkg > > to build a source package, followed by > > Rcmd INSTALL --build mypkg_ver.tar.gz > > to install it and zip up a version for distribution. > > It is 'check' and 'build', and I believe R should refuse to us

Re: [R] chi2

2007-10-10 Thread Peter Dalgaard
elyakhlifi mustapha wrote: > Hello, > I want to use the quantile function so I read the doc but I don't understand > with this > > >> qchisq(seq(0.05,0.95,by=0.05),df=(length(don)-1)) >> > [1] 62667.11 62795.62 62882.42 62951.47 63010.74 63064.00 63113.39 63160.27 > 63205.65 63250.33 632

Re: [R] chi2

2007-10-10 Thread Ben Bolker
elyakhlifi mustapha wrote: > > Hello, > I want to use the quantile function so I read the doc but I don't > understand with this > >> qchisq(seq(0.05,0.95,by=0.05),df=(length(don)-1)) > [1] 62667.11 62795.62 62882.42 62951.47 63010.74 63064.00 63113.39 > 63160.27 63205.65 63250.33 63295.04 63

[R] Plotting two distance matrices

2007-10-10 Thread Jari Oksanen
> > I'm trying to plot two distance matrices against each other > (74x74,phylogenetic distance and phenotypic distances). However R > gives an error message:"Error in plot.new() : figure margins too > large". > > Is it because I have too many points to plot? No. It *sounds* like you don't have

Re: [R] Visualize cox proportional hazards

2007-10-10 Thread Armin Goralczyk
On 10/9/07, Christos Hatzis <[EMAIL PROTECTED]> wrote: > There are at least a couple of versions of such plots. > Search for forest plots: > > help.search("forest plot") > Hi Christos Could you be more specific? On my system I found nothing: > help.search("forest plot") No help files found match

[R] chi2

2007-10-10 Thread elyakhlifi mustapha
Hello, I want to use the quantile function so I read the doc but I don't understand with this > qchisq(seq(0.05,0.95,by=0.05),df=(length(don)-1)) [1] 62667.11 62795.62 62882.42 62951.47 63010.74 63064.00 63113.39 63160.27 63205.65 63250.33 63295.04 63340.48 63387.48 63437.03 63490.53 63550.14 6

[R] Odp: Data manipulation question

2007-10-10 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 10.10.2007 12:10:29: > Hi all, > > Suppose I have the following data.frame, with an id column and two > variables columns : > > idX Y > 0001 NA 21 > 0002 NA 13 > 0003 000145 > 0004 NA 71 > 0005 000320

  1   2   >