Re: [R] Problem of running R console from Java on linux box

2008-11-02 Thread ZhaoWei
Great, --vanilla works! Can you please tell me what this parameter means? And, it works with the execuatble(/usr/lib/R/bin/exec/R). I'm wondering is it possible to do the same with the shell script(/usr/bin/R), anyway when you type R in command line, it means the shell script. Thanks again! Hi

[R] How to plot with different colours

2008-11-02 Thread Carlos Morales
Hello everyone, I'm trying to plot 3600 points and my idea is if this value is higher than 0.35 then this point must appear in green colour, if it's smaller than -0.35 then values must appear in red and if values are between -0.35 and 0.35 they must be in yellow. I'm thinking and I'm trying

Re: [R] odd behaviour of identical

2008-11-02 Thread Wacek Kusnierczyk
Berwin A Turlach wrote: On Sat, 01 Nov 2008 22:57:38 +0100 Wacek Kusnierczyk [EMAIL PROTECTED] wrote: is.integer(1) # FALSE is.integer(1:1) # TRUE is not particularly appealing as a design, though it can be defended along the line that : uses 1 as the increase step, thus if it starts

[R] R newbie: how to replace string/regular expression

2008-11-02 Thread Krishna Dagli/Krushna Dagli
Hello; I am a R newbie and would like to know correct and efficient method for doing string replacement. I have a large data set, where I want to replace character M, b, and K (currency in Million, Billion and K) to millions. That is 209.7B with (209.7 * 10e6) and 100.00K with (100.00 *1/100)

[R] what is the result of this code

2008-11-02 Thread Ehs
can any one help me to now , what is the result of this code ? #start edw-function(mm,n){ v2-v3-0 d-dim(mm) dd-d[1]*d[2] p1-2*n/(dd*(dd-n)) p2-(n*(n-1)*(dd-n)+2*n*(dd-d[1]-d[2]-n+2))/(dd-d[1]-d[2]+1)*(dd-n) v1-((dd-n-1)/(n+1))*sum(mm^2)

Re: [R] How to plot with different colours

2008-11-02 Thread Bernardo Rangel Tura
On Sun, 2008-11-02 at 07:58 +, Carlos Morales wrote: Hello everyone, I'm trying to plot 3600 points and my idea is if this value is higher than 0.35 then this point must appear in green colour, if it's smaller than -0.35 then values must appear in red and if values are between -0.35

Re: [R] How to plot with different colours

2008-11-02 Thread Jim Lemon
Carlos Morales wrote: Hello everyone, I'm trying to plot 3600 points and my idea is if this value is higher than 0.35 then this point must appear in green colour, if it's smaller than -0.35 then values must appear in red and if values are between -0.35 and 0.35 they must be in yellow. I'm

Re: [R] R newbie: how to replace string/regular expression

2008-11-02 Thread Gabor Grothendieck
Your gsub example is almost exactly what gsubfn in the gsubfn package does. gsubfn like gsub except the replacement string is a function: library(gsubfn) gsubfn((.*)B$, ~ as.numeric(x) * 10e6, d, ignore.case = TRUE) [1] 120.0M11.01m2.097e+09 100.00k 50 Also there are examples very

[R] error in lapply

2008-11-02 Thread Chibisi Chima-Okereke
Dear all, I am getting a error while using lapply to generate plots. The variable .name is used to identify each plot in the main variable. The method worked once but afterwards seems to throw up an error when used in a different case. The input ... dataOut - lapply(names(dataIn), FUN =

Re: [R] Fitting weibull and exponential distributions to left censoring data

2008-11-02 Thread Göran Broström
On Sun, Nov 2, 2008 at 11:22 AM, Christian Ritz [EMAIL PROTECTED] wrote: Hi Göran, the R package NADA is specifically designed for left-censored data: http://www.statistik.uni-dortmund.de/useR-2008/slides/Helsel+Lee.pdf The function cenreg() in NADA is a front end to survreg(). Nice; but

[R] error in lapply (sorry error in last e-mail)

2008-11-02 Thread Chibisi Chima-Okereke
Dear all, I am getting a error while using lapply to generate plots. The variable .name is used to identify each plot in the main variable. The method worked once but afterwards seems to throw up an error when used in a different case. The input ... dataOut - lapply(names(dataIn), FUN =

Re: [R] Problem of running R console from Java on linux box

2008-11-02 Thread Prof Brian Ripley
On Sun, 2 Nov 2008, ZhaoWei wrote: Great, --vanilla works! Can you please tell me what this parameter means? And, it works with the execuatble(/usr/lib/R/bin/exec/R). I'm wondering is it possible to do the same with the shell script(/usr/bin/R), anyway when you type R in command line, it means

[R] ESS Toolbar missing after Ubuntu Update

2008-11-02 Thread Andreas Wittmann
Dear R useRs, yesterday i updated my system from ubuntu 8.04 to 8.10. I use emacs- snapshot, this is emacs 23.0.60.1 and ess 5.3.8. Before the update i had when starting emacs with an R file an ess-toolbar with little icons to start R or to evaluate a line or a region of my R file, but no this

Re: [R] calculation for standard normal cumulative distribution

2008-11-02 Thread John Sorkin
I suggest you issue the following command: ?pnorm which will get you to a manual page that will give you information about the following commands: dnorm(x, mean=0, sd=1, log = FALSE) pnorm(q, mean=0, sd=1, lower.tail = TRUE, log.p = FALSE) qnorm(p, mean=0, sd=1, lower.tail = TRUE, log.p =

[R] Does R has the function for garch-t, gjr-garch, qgarch and egarch

2008-11-02 Thread Massarenti Marco
Hi, i found ur request on a R forum. Did you find anything about it? I need some help with qgarch and egarch models. Any help is appreciated. Best, Marco __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] Fitting weibull and exponential distributions to left censoring data

2008-11-02 Thread Christian Ritz
Hi Göran, the R package NADA is specifically designed for left-censored data: http://www.statistik.uni-dortmund.de/useR-2008/slides/Helsel+Lee.pdf The function cenreg() in NADA is a front end to survreg(). Christian Göran Broström wrote: On Fri, Oct 31, 2008 at 2:27 PM, Terry Therneau

Re: [R] How to plot with different colours

2008-11-02 Thread hadley wickham
Hi Carlos, I'd strongly urge to reconsider your colour choices - 7-10% of males are red-green colour blind and it will be difficult for them to tell the difference between the high and low values. Hadley On Sat, Nov 1, 2008 at 11:58 PM, Carlos Morales [EMAIL PROTECTED] wrote: Hello everyone,

Re: [R] Fitting weibull and exponential distributions to leftcensoring data

2008-11-02 Thread R Heberto Ghezzo, Dr
Hi, I tried the suggestion of Terry, as he stated it, it works perfectly but if I have x - rweibull(500, shape = 2, scale = 1) d - rep(c(TRUE,FALSE),each=250) # 50% left censoring, at different times left(x, d) the scale comes as 0.7 and shape 1.5 Any one knows a solution? Thanks

Re: [R] R newbie: how to replace string/regular expression

2008-11-02 Thread Gabor Grothendieck
There was an error in your regexp which I did not correct. Here it is again corrected to better illustrate the solution: gsubfn((.*)B, ~ as.numeric(x) * 10e6, d, ignore.case = TRUE) [1] 120.0M11.01m2.097e+09 100.00k 50 On Sun, Nov 2, 2008 at 7:55 AM, Gabor Grothendieck [EMAIL

Re: [R] Fitting weibull and exponential distributions to left censoring data

2008-11-02 Thread Therneau, Terry M., Ph.D.
Brostram wrote The survreg function cannot fit left-censored data (correct me if I am wrong). in response to my suggestion to use that routine. You are wrong. Try reading the help file for survreg, or the references given there. The survreg function does not fit left-truncated data, however.

Re: [R] what is the result of this code

2008-11-02 Thread Dieter Menne
Ehs ehsazh at gmail.com writes: can any one help me to now , what is the result of this code ? #start edw-function(mm,n){ v2-v3-0 d-dim(mm) several lines removed } #end Following generic world-wide-wisdom, it is 42. Dieter

Re: [R] How to plot with different colours

2008-11-02 Thread Carl Witthoft
Carlos Morales wrote: Hello everyone, I'm trying to plot 3600 points and my idea is if this value is higher than 0.35 then this point must appear in green colour, if it's smaller than -0.35 then values must appear in red and if values are between -0.35 and 0.35 they must be in yellow. I'm

[R] R Textbook for SAS and SPSS Users

2008-11-02 Thread Ajay ohri
Dear Lists, I got the chance to review Bob Muenchen's book - R for SAS and SPSS users. While my detailed review is online at www.decisionstats.com, the book is a welcome addition in R Textbooks for beginners and an especially nice one for people who have experience in SAS and /or SPSS languages.

[R] Merging nested files

2008-11-02 Thread David Kaplan
Greetings all, I have three files that I would like to merge. The first is a student level file that contains the student ID, their school ID, and their country ID. The second is the school file that contains the school ID and country ID. The third is the country file with a country ID. I

Re: [R] Merging nested files

2008-11-02 Thread Erik Iverson
Hello - David Kaplan wrote: Greetings all, I have three files that I would like to merge. The first is a student level file that contains the student ID, their school ID, and their country ID. The second is the school file that contains the school ID and country ID. The third is the

Re: [R] Fitting weibull and exponential distributions to left censoring data

2008-11-02 Thread Göran Broström
On Sun, Nov 2, 2008 at 3:57 PM, Therneau, Terry M., Ph.D. [EMAIL PROTECTED] wrote: Brostram wrote The survreg function cannot fit left-censored data (correct me if I am wrong). in response to my suggestion to use that routine. You are wrong. Try reading the help file for survreg, or the

Re: [R] Merging nested files

2008-11-02 Thread Gabor Grothendieck
Read them into data frames and then use the R sqldf package: http://sqldf.googlecode.com On Sun, Nov 2, 2008 at 12:04 PM, David Kaplan [EMAIL PROTECTED] wrote: Greetings all, I have three files that I would like to merge. The first is a student level file that contains the student ID, their

Re: [R] what is the result of this code

2008-11-02 Thread J Dougherty
On Tuesday 28 October 2008 02:25:55 am Ehs wrote: can any one help me to now , what is the result of this code ? v-(v1+v2+v3)/dd^2 } #end Apparently v, whatever that might be. However, without a little more information, your question is rather pointless. edw( ) is

Re: [R] Merging nested files

2008-11-02 Thread David Kaplan
I think this will work. Thanks. But, is there a command to merge on a string variable. All I have is the country 3 letter designation. Thanks again, David === David Kaplan, Ph.D. Professor Department of Educational

Re: [R] Hidden line algorithms and a different kind of waterfall

2008-11-02 Thread stephen sefick
this is a short time fourier transform? Why not use wavelet transforms that are compactly supported? The wavelet transform (morlet for instance) has a well know relationship between time and scale, and doesn't rely on stationarity of the signal where as the fourier transform does. My signal

Re: [R] R newbie: how to replace string/regular expression

2008-11-02 Thread Charles C. Berry
Gabor, Why not just this: expos - list( B=e9, M=e6, m=e6, k=e3 ) as.numeric( gsubfn([[:alpha:]], expos, d ) ) HTH, Chuck p.s. I am not sure why B goes with e6 or K with e-02 (below), but Krishna can adjust the values accordingly. On Sun, 2 Nov 2008, Gabor Grothendieck

Re: [R] R newbie: how to replace string/regular expression

2008-11-02 Thread Gabor Grothendieck
I did provide a link to that solution already but also wanted to show how to do it in the same way that the code in the question was written. On Sun, Nov 2, 2008 at 4:56 PM, Charles C. Berry [EMAIL PROTECTED] wrote: Gabor, Why not just this: expos - list( B=e9, M=e6, m=e6, k=e3 )

[R] panel data maximum likelihood function

2008-11-02 Thread Migle Purzelyte
Hi, I found some problems dealing with panel data. However, it seems the problem is maximum likelihood function. I cannot find a function to compute maximum likelihood estimator for panel data as well as to test data with likelihood ratio test. May anyone knows something about that? Thanks,

[R] Simple R (in Sweave) Question

2008-11-02 Thread dogle
I am writing a report using Sweave with specific R output incorporated into the text using the Sexpr{} command. I have run into two specific issues: 1) If the result inside the Sexpr{} command is an integer less than 10 I would like to print the “word” for that number – e.g., “seven” for 7. 2)

[R] array in version 2.8.0

2008-11-02 Thread David Stoffer
What happened? TIA. In version 2.7.x: (x - array(1:4, c(2,2))) [,1] [,2] [1,]13 [2,]24 as.array(x) [,1] [,2] [1,]13 [2,]24 In version 2.8.0: (x - array(1:4, c(2,2))) [,1] [,2] [1,]13 [2,]24 as.array(x) Error: evaluation

Re: [R] array in version 2.8.0

2008-11-02 Thread Rolf Turner
On 3/11/2008, at 2:11 PM, David Stoffer wrote: What happened? TIA. In version 2.7.x: (x - array(1:4, c(2,2))) [,1] [,2] [1,]13 [2,]24 as.array(x) [,1] [,2] [1,]13 [2,]24 In version 2.8.0: (x - array(1:4, c(2,2))) [,1] [,2] [1,]1

[R] Cómo convertir un objeto data frame en una t abla csv

2008-11-02 Thread Ricardo Bandin
Agradeceré me ayuden con la consulta: Cómo convertir un objeto data frame en una tabla csv que pueda a su vez ser convertida en un objeto geodata De antemano, gracias por la atención, -- Ricardo Bandin Llanos [EMAIL PROTECTED] Estudiante - Magíster Cs. m. Pesquerías Universidad de Concepción,

Re: [R] Problem of running R console from Java on linux box

2008-11-02 Thread ZhaoWei
Get it done. Big thank, Brian and Martin! From: Prof Brian Ripley [EMAIL PROTECTED] Subject: Re: [R] Problem of running R console from Java on linux box Date: Sun, 2 Nov 2008 11:07:24 + (GMT) On Sun, 2 Nov 2008, ZhaoWei wrote: Great, --vanilla works! Can you please tell me what this

Re: [R] Cómo convertir un objeto data frame en una t abla csv

2008-11-02 Thread Gabor Grothendieck
Check out ?write.csv 2008/11/2 Ricardo Bandin [EMAIL PROTECTED]: Agradeceré me ayuden con la consulta: Cómo convertir un objeto data frame en una tabla csv que pueda a su vez ser convertida en un objeto geodata De antemano, gracias por la atención, -- Ricardo Bandin Llanos [EMAIL

Re: [R] Cómo convertir un objeto data frame en una tab la csv

2008-11-02 Thread markleeds
hi ricardo: you're english is fine. i'll cc the list because i haven't done that and i don't know what a geodata object is but my guess is that you can use write.table. you can see the details of that function by doing ?write.table. On Sun, Nov 2, 2008 at 9:02 PM, Ricardo Bandin wrote:

Re: [R] Problem of running R console from Java on linux box

2008-11-02 Thread ZhaoWei
My fault, I used Runtime.getRuntime.exec(/usr/bin/R --vanilla), and was prompted with /usr/bin/R --vanilla not found. This morning I tried command with String array, it works. And, you said vanilla is a non-interactive mode, so if I have several R scripts to run, I have to evaluate them one by

Re: [R] array in version 2.8.0

2008-11-02 Thread David Stoffer
Ok- it works now after flushing my objects. The package Oarray doesn't seem to work under version 2.8.0. I emailed Jonathan about it and he said he won't get to updating it until next year. In the meantime, I was trying to produce a seat-of-the-pants workaround and I probably redefined

[R] Sweave: side by side dynamic graphs

2008-11-02 Thread Felipe Carrillo
Hi all: I'm trying to create some side by side dynamic graphics on the same page but I am running into some problems. I am able to create side by side figures only if I import them into my PDF. see the example bellow: \documentclass[12pt]{article} \usepackage{color,cite,graphicx}% to put in

[R] [Fwd: Re: Cómo convertir un objeto da ta frame en una tabla csv]

2008-11-02 Thread Kenneth Roy Cabrera Torres
---BeginMessage--- Hi Ricardo: I don't understand your question, not because it is in spanish, but because I will like to know what are you pretending to do. data.frame is an R object. csv is a external ascii format for database tables. geodata is an internal geoR object (a list). The usual

[R] Help with 'annotation' in GOHyperGParamsClass

2008-11-02 Thread Jason Myers
Dear cateGOry experts, hyperGTest documentation states that YEAST cannot be used as 'annotation' when evaluating gene ontology representation status for a given set of 'geneIds'. Because I am using a custom print I believe I need to create my own data package to use as the annotation file for

Re: [R] odbcConnectExcel2007

2008-11-02 Thread Prof Brian Ripley
On Tue, 28 Oct 2008, Agnolucci, Paolo wrote: Hi sorry if this is really basic but I am just starting on R. Can anyone point me at how to write R objects into Excel 2007 files. I have seen how to set up a connection to a file through odbcConnectExcel2007(xls.file, readOnly = FALSE, ...)

Re: [R] Sweave: side by side dynamic graphs

2008-11-02 Thread Dieter Menne
Felipe Carrillo mazatlanmexico at yahoo.com writes: I'm trying to create some side by side dynamic graphics on the same page but Thanks for the example; there was a minor typo so that it did not run plot(}, and a major problem that could have caused serious problem (happens to me quite often

Re: [R] Simple R (in Sweave) Question

2008-11-02 Thread Dieter Menne
dogle DOgle at northland.edu writes: I am writing a report using Sweave with specific R output incorporated into the text using the Sexpr{} command. I have run into two specific issues: 1) If the result inside the Sexpr{} command is an integer less than 10 I would like to print the “word”

[R] How to detect NULL list element?

2008-11-02 Thread rkevinburton
I have a list that starts out like: r - list() r[[3]] - list(count=1, orderlist=data.frame(count=1, sku=A)) So r[3] yeilds: [[1]] [[1]]$count [1] 1 [[1]]$orderlist count sku 1 1 A So far so good. Now I want to detect the fact that there is no etry in 1,2, and 4. r[1] [[1]] NULL