[R] Separate colour for comments in scripts

2007-09-24 Thread Sumit.Gupta
Hi, Is it possible to assign a separate colour for comments written with #, eg:- #this is a comment . I am looking to colour them differently from the program text in R-Editor (not console). Is it possible to do so? Eg. In Visual basic, the colour for remarks gets green automatically Regards

Re: [R] really dumb question | loop counters in

2007-09-24 Thread Petr PIKAL
Hi Paul Hiemstra wrote: Hi, This works: for(i in seq(1,100,5)) { print(i) } Very similar to the way python does this kind of loop. Indeed it is - thanks for the tip. I'm still puzzled why I can't find a single piece of the standard [R] language documentation that shows

[R] assign one 'id' one colour for xyplot

2007-09-24 Thread ctlai
is there a way to assign one 'id' (subject) to one colour for xyplot to keep the co-ordination for different xyplots? also how to increase the number of colour for a xyplot that has more than 7 'id' (subjuects) I found one previous message but did not understand what he did. I attached a

Re: [R] nls fits by groups

2007-09-24 Thread Aleksi Lehtonen
Dear Katharine, that for loop solved all my problems, I just added subset=group==i to the nls statement. thank you, Aleksi Katharine Mullen wrote: It is not clear from your post what changes per-group. If only the starting values change (but the data and the model structure are the same),

Re: [R] What is RDA file and how to open it in R program?

2007-09-24 Thread Bjørn-Helge Mevik
Jittima Piriyapongsa wrote: I have a set of gene expression data in .RDA file. I have downloaded Bioconductor and R program for analyzing these data. Anyway, I am not sure how to open this RDA file in R program (what is the command?) in order to look at these data. load(filename.RDA) (.RDA

Re: [R] are hurdle logit-poisson model and posson model nested?

2007-09-24 Thread Achim Zeileis
On Sat, 15 Sep 2007, Wensui Liu wrote: Dear Listers, I have a general statistical question. Are hurdle logit-poisson model and posson model nested? No, I don't think so. The logit hurdle is equivalent to a geometric hurdle (i.e., logit and right-censored geometric distribution imply the same

[R] Data manipulations with numbers which are in 'comma' format

2007-09-24 Thread Shubha Vishwanath Karanth
Hi R, May be a trivial question, but struggling to find a solution... v=data.frame(a=c(1,234,2,345,5,567)) v a 11,234 22,345 35,567 I need a column 'b', which is just the addition of column 'a' with 5. How do I do it? And, entries in column 'a' are with

Re: [R] Proposal: Archive UseR conference presentations at www.r-project.org/useR-yyyy

2007-09-24 Thread Friedrich Leisch
[ Sorry to join in late, as Uwe already wrote I was offline in the Austrian Alps. ] On Tue, 18 Sep 2007 10:56:03 -0500, Douglas Bates (DB) wrote: On 9/18/07, hadley wickham [EMAIL PROTECTED] wrote: On 9/18/07, Uwe Ligges [EMAIL PROTECTED] wrote: Earl F. Glynn wrote: hadley

[R] fontsize in mosaic plot lables

2007-09-24 Thread David Meyer
Herry, mosaic() by default uses the labeling_border() workhorse, which gives you the choice of modifying either gp_labels or gp_varnames. So just replacing gp_text by gp_labels shoud do the trick. Best David -- Hi List, I am trying unsucessfully to modify the fontsize of lables in

[R] Odp: Data manipulations with numbers which are in 'comma' format

2007-09-24 Thread Petr PIKAL
Hi Hi R, May be a trivial question, but struggling to find a solution... v=data.frame(a=c(1,234,2,345,5,567)) v a 11,234 22,345 35,567 I need a column 'b', which is just the addition of column 'a' with 5. How do I do it? And, entries in

Re: [R] Data manipulations with numbers which are in 'comma' format

2007-09-24 Thread Julien Barnier
Hi, I need a column 'b', which is just the addition of column 'a' with 5. How do I do it? And, entries in column 'a' are with commas, always. Also, class(v$a)=factor. You must convert your factor with commas into a numeric variable, first replacing commas with dots. A very dirty way to do it

[R] weighting question

2007-09-24 Thread eugen pircalabelu
Hi R-users, Can anyone tell me where can i find info about they way how post stratification weights are calculated when i have an already stratified survey design, especially in Survey Package (but any theoretical material would do me just fine) ? Thank you and have a nice day!

Re: [R] Network Construction in R

2007-09-24 Thread Gabor Csardi
Johannes, with the igraph package, this would be something like library(igraph) g - graph.data.frame( data.frame(from=data$acra, to=data$acrb, weight=data$expab)) Gabor On Sun, Sep 23, 2007 at 11:39:40AM -0400, Johannes Urpelainen wrote: Hi, I am trying to construct

[R] Performance problems to fill up a dataframe

2007-09-24 Thread Florian Jansen
Dear Listmembers, I'm trying to fill up a dataframe depending on an arbitrary list of references: Here is my code, which works: dat - data.frame(c(60001,60001,60050,60050,60050),c(27,129,618,27,1579)) LR - sort(unique(dat[,1])) LC - sort(unique(dat[,2])) m - as.data.frame(matrix(data=NA,

[R] Sweave and ggplot2

2007-09-24 Thread Julien Barnier
Hi, I am trying to use ggplot2 graphics with Sweave, but I got problems with transparency support when generating pdf figures, even if I specify a «pdf.version» argument in Sweave options. More precisely, forcing the pdf version by creating the file manually works : fig=FALSE,results=HIDE=

[R] a bug when subtracting vectors?

2007-09-24 Thread Samuel Kemp
Hi, I am calling in some data into R via the read.table function. The 'tail' of this data reads tail(data) Date Open HighLow Close Volume 3728 Fri 14-Sep-07 114.19 114.46 113.93 114.08 1117992 3729 Mon 17-Sep-07 113.99 114.37 113.91 114.27 899671 3730

Re: [R] a bug when subtracting vectors?

2007-09-24 Thread Raymond Wan
Samuel Kemp wrote: When subtracting, all numbers should be to 2 decimal places. Why is R calculating it to 15 decimal places -- the output is essentially wrong 112.47-112.30=0.17 NOT 0.172. I suspect I am encoding this incorrectly? Well, two comments...one is not computer

Re: [R] Calculate difference between dates in years

2007-09-24 Thread Alberto Monteiro
Daniel Brewer wrote: I would like to be able to calculate the age of someone at a particular date. Both dates are date objects. Here is what I have come up with: floor(as.numeric(sampleInfo$Date.of.DIAGNOSIS- sampleInfo$Date.of.birth)/365.25) Is this the best approach? No - leap

[R] R Courses in Munich

2007-09-24 Thread Friedrich Leisch
Torsten Hothorn and myself will present a series of (independent) 2-day R Courses in Munich in the forthcoming semester. The courses will be held in German language (and I apologize to the rest for the noise on the mailing list). The topics are November 8- 9: Introduction to R

Re: [R] Separate colour for comments in scripts

2007-09-24 Thread Steve Powell
Dear Sumit Tinn-R is a little text editor which can do all that and more: http://www.sciviews.org/Tinn-R/ Best wishes Steve Powell proMENTE social research research | evaluation | training consulting Kranjčevićeva 35, 71000 Sarajevo mobile: +387 61 215 997 | office: +387 33 556 865 | fax:

Re: [R] Calculate difference between dates in years

2007-09-24 Thread Prof Brian Ripley
On Mon, 24 Sep 2007, Alberto Monteiro wrote: Daniel Brewer wrote: I would like to be able to calculate the age of someone at a particular date. Both dates are date objects. Here is what I have come up with: floor(as.numeric(sampleInfo$Date.of.DIAGNOSIS- sampleInfo$Date.of.birth)/365.25)

[R] Position Openings at the U.S. Food and Drug Administration

2007-09-24 Thread Soukup, Mat
The Office of Biostatistics in the Office of Translational Sciences, Center for Drug Evaluation and Research, FDA, invites applications from statisticians with a background in biomedical, biological, or pharmacological sciences and strong skills in statistical methodology and communication. The

[R] urgent for R graphics

2007-09-24 Thread a hk
Hi, everyone, I am green with R. Now I am working on a graphics projects. I have a dataset: --- abc 1 228 83 6.69 2 274 83 7.36 3 320 83 8.86 4 366 83 7.36 5 412 83 6.81 6 228 129 5.58 - I want to

Re: [R] Correlated frailty model

2007-09-24 Thread Terry Therneau
I am trying to a estimate a correlated frailty model. My dataset is made up of 4 observations. I would like to know if it is too big or I have done some mistakes in the following code. I have used larger data sets successfully. I need to know a little bit more about our problem.

[R] fPortfolio Package

2007-09-24 Thread livia
Hello, I am very interested in Portfolio Optimization functions in this package. For the cmlPortfolio, I thought it would be a set of the portfolio along the Capital Market Line, but it turns out that there is only one portfolio. I was wondering which portfolio should this be? Besides, is there

Re: [R] Separate colour for comments in scripts

2007-09-24 Thread mel
[EMAIL PROTECTED] a écrit : Is it possible to assign a separate colour for comments written with #, http://www.crimsoneditor.com/ I find it very practical. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] What is RDA file and how to open it in R program?

2007-09-24 Thread Vladimir Eremeev
attach(file.RDA) # attaching the file to R, all its variables become 'visible' # it should be on the 2nd position of the search path. # see ?search ls(2) # list everything in 2nd position of the search path You can also load() this file. In this case all data from this file will be loaded to the

[R] calculating/plotting error ellipses

2007-09-24 Thread Jan M. Wiener
hello, sorry for posting what may be a simple question: i do have a matrix of coordinates (positional judgments, see below) and now want to calculate and plot the corresponding error ellipse. can anyone help me with the exact steps/syntax? xyDat X Y 1-0.49-2.13 2

Re: [R] urgent for R graphics

2007-09-24 Thread Uwe Ligges
a hk wrote: Hi, everyone, I am green with R. Now I am working on a graphics projects. I have a dataset: --- abc 1 228 83 6.69 2 274 83 7.36 3 320 83 8.86 4 366 83 7.36 5 412 83 6.81 6 228 129 5.58

Re: [R] Proposal: Archive UseR conference presentations at www.r-project.org/useR-yyyy

2007-09-24 Thread hadley wickham
I think I like Hadley's proposal of collecting conference webpages (after the conference is over) to one of our servers better. Redirecting to pages at different locations is dangerous when people move on to new positions. That wasn't my suggestion, but I can understand your desire to do

[R] 3d plot with dates on axis

2007-09-24 Thread Li, Yan (IED)
Hi all, I'd like to make a 3D plot with dates on one of the axes. For example, date1 - as.Date(2007-01-25) + seq(10) y - seq(10) z - seq(10) I want to plot date1 on one axis, y on the other, and z as the height, with the points connected. Any help would be highly appreciated! Yan

Re: [R] making R packages and compacting an entire R set up

2007-09-24 Thread Gabor Grothendieck
See: http://www.nabble.com/Cross-Compiling-t4473403.html On 9/24/07, Edna Bell [EMAIL PROTECTED] wrote: Hi R Gurus! I have 2 questions, please: a. I'm putting together a little baby package on SUSE Linux 10.1. I want to create a zip of the package for windows. How should I create that

[R] Looking for a different approach?

2007-09-24 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] Plotting tree tips in a specific order! how?

2007-09-24 Thread jagl
hi to all I'm using ape,ade4,etc packages to draw phylogenetic trees. Situation: - i have a file with genetic sequences - i can do the clustering with hclust - i convert the clustering to trees - the resulting trees are correct Problem: - the sequences in my data files have a specific

Re: [R] Package Survey

2007-09-24 Thread Thomas Lumley
On Sun, 23 Sep 2007, Rita Cristina Pinto Sousa wrote: I?m using the package survey to obtain the statistics, fundamentally the variance estimates. Can you explain why do I obtain the same result with the replicate weights (as.svrepdesign function), for a stratified sample, and without the

Re: [R] weighting question

2007-09-24 Thread Thomas Lumley
On Mon, 24 Sep 2007, eugen pircalabelu wrote: Hi R-users, Can anyone tell me where can i find info about they way how post stratification weights are calculated when i have an already stratified survey design, especially in Survey Package (but any theoretical material would do me just

Re: [R] Network Construction in R

2007-09-24 Thread Robert Gentleman
there are several packages that can be used: the graph, RBGL and Rgraphviz packages, provide data structures, algorithms, and layout/plotting tools for graphs/networks. There are quite a few more specialized packages at Bioconductor (typically more related to biological problems). There, you

[R] truehist?

2007-09-24 Thread Carlos Guâno Grohmann
Hello, After a long time, I needed the truehist function, but my system couldn't found it. I tried to install the package MAAS, but I couldn't found it! Something happened? Carlos -- +---+ Carlos Henrique Grohmann - Guano

Re: [R] Adding a table to a plot area

2007-09-24 Thread Adrian Dusa
Frank E Harrell Jr f.harrell at vanderbilt.edu writes: Judith Flores wrote: Is there a command to insert a table into the plot area other that using text? Thank you. To me the only completely satisfying approach is to use LaTeX and psfrag in you want great alignment and other

Re: [R] truehist?

2007-09-24 Thread Hannu Kahra
Carlos, try the MASS package. It is there. Hannu On 9/24/07, Carlos Guâno Grohmann [EMAIL PROTECTED] wrote: Hello, After a long time, I needed the truehist function, but my system couldn't found it. I tried to install the package MAAS, but I couldn't found it! Something happened? Carlos

Re: [R] calculating/plotting error ellipses

2007-09-24 Thread bbolker
Jan M. Wiener wrote: hello, sorry for posting what may be a simple question: i do have a matrix of coordinates (positional judgments, see below) and now want to calculate and plot the corresponding error ellipse. can anyone help me with the exact steps/syntax? Something along the

[R] error rate for cluster analysis

2007-09-24 Thread Tom Boonen
Hi all, I am looking for an R function or a metric that I could self code that compare the results of a clustering exercise with a given solution key. An example. Let's say four elements are clustered, the number of clustered is unknown a priori. For my guess and the solution, I have two

Re: [R] making R packages and compacting an entire R set up

2007-09-24 Thread michael watson (IAH-C)
For 1, start off with package.skeleton Then http://www.biostat.wisc.edu/~kbroman/Rintro/Rwinpack.html From: [EMAIL PROTECTED] on behalf of Edna Bell Sent: Mon 24/09/2007 3:40 PM To: [EMAIL PROTECTED] Subject: [R] making R packages and compacting an entire R set

Re: [R] Root finding problem

2007-09-24 Thread bbolker
tuki - function(u, x, a, lambda){ u - u+0i f - Re(x-(a*(u)^lambda-(1-(u))^lambda)/lambda) f } ## What I want to do is to find the root, but without specifying the ## interval within which to search for it. I can do it easily in MATLAB ## with fsolve() or fzero() functions. ## BB: how do

Re: [R] Data manipulations with numbers which are in 'comma' format

2007-09-24 Thread Jean lobry
Dear Shubha, May be a trivial question, but struggling to find a solution... v=data.frame(a=c(1,234,2,345,5,567)) v a 11,234 22,345 35,567 I need a column 'b', which is just the addition of column 'a' with 5. How do I do it? And, entries in column 'a' are

[R] how to export.RDA file to a text file?

2007-09-24 Thread Jittima Piriyapongsa
Hi, Does anyone know how to export .RDA file (in R program) to a normal text file (readable by any text editor)? Also, how to export an object in R program into a text file (not .RDA file)? Thank you. Jittima __ R-help@r-project.org mailing list

[R] hypothesis testing

2007-09-24 Thread Leeds, Mark (IED)
This was sent to me by someone on the R-list ( I don't know her ) but I don't have time to look at this right now so I told her I would send it to the R-list because she said it keeps getting bounced when she sends it. #===

Re: [R] Sweave and ggplot2

2007-09-24 Thread Jean lobry
Dear Julien, Hi, I am trying to use ggplot2 graphics with Sweave, but I got problems with transparency support when generating pdf figures, even if I specify a ?pdf.version? argument in Sweave options. [...snip...] I wanted to help because I'm interested by the exploitation of the

Re: [R] 3d plot with dates on axis

2007-09-24 Thread Duncan Murdoch
On 9/24/2007 10:48 AM, Li, Yan (IED) wrote: Hi all, I'd like to make a 3D plot with dates on one of the axes. For example, date1 - as.Date(2007-01-25) + seq(10) y - seq(10) z - seq(10) I want to plot date1 on one axis, y on the other, and z as the height, with the points connected.

Re: [R] Sweave and ggplot2

2007-09-24 Thread Julien Barnier
Hi, First, thanks for your help and sorry for not following the posting guide by not giving more detailed informations and an easily reproducible example... i) Despite its annoncment in fortune(mind_read), the mind_read() function is apparently not to be released in R 2.6.0, so that if you

[R] fuzzy logic

2007-09-24 Thread Edna Bell
Hi R Gurus! Is there a fuzzy logic package please? Thanks, Edna Bell __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented,

[R] PicTeX output: how to suppress escaping of $ signs and braces?

2007-09-24 Thread Dan Hatton
Dear All, I'm trying to draw a TeX histogram with the following pair of commands, pictex(file = realhisto.tex) hist(Peaklist$V3,xlab=Height $z/\\ut{mm}$,ylab=Probability density $\\phi{}(z-z_0)/(1/\\ut{mm})$) However, in the resulting file realhisto.tex, I get, for example \put {Height

[R] parse in text function of plots, confusing behaviour

2007-09-24 Thread Folkes, Michael
HI all, I'm failing to understand why the following is happening. In this plot I rely on two text functions both using parse. The second one works properly by writing a gamma symbol 5 times, the first one only works properly four times. The only difference is that I add a string to the paste

[R] partial plots for logistic regression using glm

2007-09-24 Thread ucjtkst
Dear R users, I am modelling the probability of error in a behavioural task using the glm() function (with the numbers of successes and failures listed for each line in the data frame). How can I plot the partial effects of the predictors? Many thanks in advance, Stav

[R] Error: cannot allocate vector of size...

2007-09-24 Thread Jittima Piriyapongsa
Hi, I want to change .RDA file to a text file. So I did as follows. load(my.rda) ls() --- then it showed [1] exprs write.table(exprs,C:\\my.txt,sep=\t) I was successful with the first .RDA file. Then I used the same commands with another .RDA file (172 MB)which is 4 times bigger than the first

Re: [R] partial plots for logistic regression using glm

2007-09-24 Thread John Fox
Dear Stav, Take a look at the effects package on CRAN and the associated paper at http://www.jstatsoft.org/v08/i15. I hope this helps, John On 24 Sep 2007 23:02:10 +0100 [EMAIL PROTECTED] wrote: Dear R users, I am modelling the probability of error in a behavioural task using the glm()

Re: [R] parse in text function of plots, confusing behaviour

2007-09-24 Thread Duncan Murdoch
On 24/09/2007 5:55 PM, Folkes, Michael wrote: HI all, I'm failing to understand why the following is happening. In this plot I rely on two text functions both using parse. The second one works properly by writing a gamma symbol 5 times, the first one only works properly four times. The

Re: [R] Error: cannot allocate vector of size...

2007-09-24 Thread Martin Morgan
Jittima Piriyapongsa [EMAIL PROTECTED] writes: Hi, I want to change .RDA file to a text file. So I did as follows. load(my.rda) ls() --- then it showed [1] exprs write.table(exprs,C:\\my.txt,sep=\t) I was successful with the first .RDA file. Then I used the same commands with another .RDA

Re: [R] parse in text function of plots, confusing behaviour

2007-09-24 Thread Folkes, Michael
Thanks Duncan for the speedy response. I should have realized that the negative value was adversely affecting the expression. I'll do some further reading on plotmath. Michael From: Duncan Murdoch [mailto:[EMAIL PROTECTED] Sent: Mon 24/09/2007 3:32 PM To:

[R] GWR modeling with dummy variables

2007-09-24 Thread Steve Friedman
Hi everyone, I'm working with a modest sized spatial database consisting of 1513 records and 50 variables. Fourteen of these are dummy variables delineating regional planning councils. I'm trying to understand how to integrate the dummy variables in the geographically weight regression model.

Re: [R] certain number of equations in function depending on parameter

2007-09-24 Thread Moshe Olshansky
Hi Andreas, One possible way would be to create a file containing all your equations (which are written in a loop), then source that file and then use uniroot. Regards, Moshe. --- Andreas Wittmann [EMAIL PROTECTED] wrote: Hello everybody, i have the following problem to write a function

[R] Package Building help

2007-09-24 Thread Patrick Richardson
List, I've used package.skeleton to build my package and am trying to check it using R CMD check . But can't seem to get anything to work. When I try to enter the R CMD command into R I get this message. R CMD check estpkg Error: syntax error, unexpected SYMBOL, expecting '\n' or ';' in

[R] Score test in logistic regression in R

2007-09-24 Thread Paek, Insu
Hello, I am wondering if R has any ways to conduct the score test in logistic regression? Could you let me know please? Thanks, Insu -- This e-mail and any files transmitted with it may contain privileged or confidential information.

Re: [R] Package Building help

2007-09-24 Thread Duncan Murdoch
On 24/09/2007 9:28 PM, Patrick Richardson wrote: List, I've used package.skeleton to build my package and am trying to check it using R CMD check . But can't seem to get anything to work. When I try to enter the R CMD command into R I get this message. R CMD check estpkg

Re: [R] how to export.RDA file to a text file?

2007-09-24 Thread Charles C. Berry
On Mon, 24 Sep 2007, Stephen Weigand wrote: On 9/24/07, Jittima Piriyapongsa [EMAIL PROTECTED] wrote: Hi, Does anyone know how to export .RDA file (in R program) to a normal text file (readable by any text editor)? Is this what you mean? load( old.RDA ) save( list=ls(),

Re: [R] truehist?

2007-09-24 Thread Peter Dalgaard
Carlos Guâno Grohmann wrote: Hello, After a long time, I needed the truehist function, but my system couldn't found it. I tried to install the package MAAS, but I couldn't found it! Something happened? Carlos It's in MASS (sic). help.search(truehist) would have told you. -- O__

Re: [R] Cumulative Frequency table

2007-09-24 Thread jim holtman
?cumsum x - table(cut(AGE, b=c(0,39,49,59,69,79,89))) x (0,39] (39,49] (49,59] (59,69] (69,79] (79,89] 24 38 41 37 26 34 cumsum(x) (0,39] (39,49] (49,59] (59,69] (69,79] (79,89] 24 62 103 140 166 200 On 9/25/07, Chung-hong Chan

Re: [R] Proposal: Archive UseR conference presentations at www.r-project.org/useR-yyyy

2007-09-24 Thread Friedrich Leisch
On Mon, 24 Sep 2007 09:25:27 -0500, hadley wickham (hw) wrote: I think I like Hadley's proposal of collecting conference webpages (after the conference is over) to one of our servers better. Redirecting to pages at different locations is dangerous when people move on to new