Re: [R] Source code for nlm()

2009-02-19 Thread Duncan Murdoch
On 19/02/2009 1:00 PM, Ravi Varadhan wrote: Hi, Where can I find the source code for nlm()? I dowloaded the R2.8.1.tar.gz file and looked at all the .c and .f files, but couldn't find either nlm.c or nlm.f There is an nlm.r file, but that is not useful. I don't see why you say it's not

Re: [R] Using R in Java?

2009-02-19 Thread Christian Ruckert
nicro schrieb: Hi 2 questions- 1. Is there a package that will allow me to run R scripts (entirely) from Java? 2. If so, is there a way to capture the output of those scripts, (including images) and embed them in my SWT java app? My challenge is I have a java app that does some statistical

Re: [R] Doing pairwise comparisons using either Duncan, Tukey or LSD

2009-02-19 Thread Kingsford Jones
try: example(TukeyHSD) hth, Kingsford Jones On Thu, Feb 19, 2009 at 9:51 AM, Saeed Ahmadi ahmadi_sa...@yahoo.com wrote: Hi, I have a basic and simple question on how to code pairwise (multiple) mean compariosn between levels of a factor using one of the Duncan, Tukey or LSD. Thanks in

Re: [R] Using R in Java?

2009-02-19 Thread Roy Mendelssohn
See also Biocep: http://biocep-distrib.r-forge.r-project.org/ -Roy M. On Feb 19, 2009, at 10:42 AM, Christian Ruckert wrote: nicro schrieb: Hi 2 questions- 1. Is there a package that will allow me to run R scripts (entirely) from Java? 2. If so, is there a way to capture the output of

Re: [R] Source code for nlm()

2009-02-19 Thread Ravi Varadhan
Thank you, Chris and Duncan. It never occurred to me to look in optimize.c since optimize() does univariate minimization. Furthermore, now I know that the underlying Fortran code (OPTIF9) is from the UNCMIN library (may be this should be mentioned in the help page, although once can get to this

Re: [R] Using R in Java?

2009-02-19 Thread Bryan Coon
Wow, very interesting! The netbeans example looks similar to what I want, which is based on Eclipse RCP. I will explore this more, as well as the JRI indirect method suggested by Christian. Thanks! -Original Message- From: Roy Mendelssohn [mailto:roy.mendelss...@noaa.gov] Sent:

[R] modifying legend in scatterplot matrix R

2009-02-19 Thread Julien Beguin
Hello R users, I have some troubles to modify the per default legend in the scatterplot.matrix using the car package. Here is my code: scatterplot.matrix(~ a + b + c, groups=treatment, by.groups=F,

Re: [R] colored maps again

2009-02-19 Thread Greg Snow
The problem is that the order and number of polygons in map does not match your data (most likely). Try: library(maps) library(plotrix) state.col-color.scale(state.x77[,'HS Grad'],0,0,c(0,1)) map(state,fill=TRUE,col=state.col) nms - map('state', plot=FALSE)$names nms - sub(':.*$','',nms) ind

[R] Getting the difference between two data frames

2009-02-19 Thread Ferry
Dear R users, I have the following data: x - data.frame( myX = c(1,2,3,4,5,6,7,8,9) ) y - data.frame( myX = c(1,2,3,4,5,6,7) ) How can I get the difference between data frame x and y? In this case, I want to get values 8 and 9 I know in SQL we can use minus operator, but I have no idea how to

Re: [R] everybody loves R...

2009-02-19 Thread Liviu Andronic
On Thu, Feb 19, 2009 at 5:29 PM, Gábor Csárdi csa...@rmki.kfki.hu wrote: I don't want to be mean, I really like wikidot, but isn't it a better solution to use the R wiki instead? http://wiki.r-project.org/rwiki/doku.php Or even to contribute to existing well-structured sites such as Quick-R

Re: [R] transform key value pair to column

2009-02-19 Thread Wacek Kusnierczyk
see ?stack, for example. vQ Tan, Richard wrote: Hi, is there a good way (instead of a time-consuming for loop) to transfer a key/value pair dataframe to a dataframe with key as column and value as row? For example, I have a dataframe with three columns: id, code, value: id,code,value

Re: [R] everybody loves R...

2009-02-19 Thread Wacek Kusnierczyk
Liviu Andronic wrote: On Thu, Feb 19, 2009 at 5:29 PM, Gábor Csárdi csa...@rmki.kfki.hu wrote: I don't want to be mean, I really like wikidot, but isn't it a better solution to use the R wiki instead? http://wiki.r-project.org/rwiki/doku.php Or even to contribute to existing

Re: [R] transform key value pair to column

2009-02-19 Thread Rowe, Brian Lee Yung (Portfolio Analytics)
Try this: dummy id code value 1 1 hi 10.3 2 1 lo 5.2 3 2 hi 19.4 4 3 hi 20.0 5 3 lo 12.0 6 4 lo 5.8 reshape(dummy, idvar='id', timevar='code', direction='wide') id value.hi value.lo 1 1 10.3 5.2 3 2 19.4 NA 4 3 20.0 12.0 6 4 NA

Re: [R] transform key value pair to column

2009-02-19 Thread Tan, Richard
Thank you, works! -Original Message- From: Rowe, Brian Lee Yung (Portfolio Analytics) [mailto:b_r...@ml.com] Sent: Thursday, February 19, 2009 5:52 PM To: Wacek Kusnierczyk; Tan, Richard Cc: r-help@r-project.org Subject: RE: [R] transform key value pair to column Try this: dummy id

Re: [R] Getting the difference between two data frames

2009-02-19 Thread Rolf Turner
On 20/02/2009, at 11:23 AM, Ferry wrote: Dear R users, I have the following data: x - data.frame( myX = c(1,2,3,4,5,6,7,8,9) ) y - data.frame( myX = c(1,2,3,4,5,6,7) ) How can I get the difference between data frame x and y? In this case, I want to get values 8 and 9 I know in SQL we can

[R] Detecting startup flags from within R.

2009-02-19 Thread Rolf Turner
Is there a way to detect from within R whether, e.g., R has been started with the --no-restore-data flag set? So as to be able to invoke code along the following lines: if( --no-restore-data flag set) { do something } else { do something else

[R] Detecting startup flags from within R (never mind, I figured it out).

2009-02-19 Thread Rolf Turner
Just after sending my inquiry I found the answer myself: Use commandArgs(). Duh! Sorry for wasting bandwidth. cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and

[R] change the label size when drawing trees with ape

2009-02-19 Thread Hua Li
Hi All, I want to be able to change the labe size on a tree when using ape package so that the graph can look nicer, but don't know how. Playing with the font doesn't seem to help. (Right now the labels barely show.) Thanks for your help! Code I'm using now #- t1 =

[R] Arima bug?

2009-02-19 Thread rkevinburton
I was looking at the 'R' code associated with arima. I see the following: upARIMA - function(mod, phi, theta) { p - length(phi) q - length(theta) mod$phi - phi mod$theta - theta r - max(p, q + 1) if (p 0) mod$T[1:p, 1] - phi

Re: [R] How to connect R and WinBUGS/OpenBUGS/LinBUGS in Linux in Feb. 2009

2009-02-19 Thread Paul Heinrich Dietrich
Hi Kees, No harm no foul. I'm glad you posted that anyway, because now anyone who's trying to do the same thing and read this will know to seek your 1.1.9 version and stay away from 1.1.15. Paul chaogai-2 wrote: I do not know about the ubuntu instructions, they would not help me on Suse.

[R] How to unload a dll loaded via library.dynam()?

2009-02-19 Thread Alex F. Bokov
Hello. To save the hassle of quitting and restarting R every time I rebuild the package I'm working on (for the purposes of this question called roots) I would like to write a script cleanly remove the package from my R session and then load it again. Of course detach(package:roots) works for

Re: [R] Arima bug?

2009-02-19 Thread Peter Dalgaard
rkevinbur...@charter.net wrote: I was looking at the 'R' code associated with arima. I see the following: upARIMA - function(mod, phi, theta) { p - length(phi) q - length(theta) mod$phi - phi mod$theta - theta r - max(p, q + 1) if (p 0)

Re: [R] How to unload a dll loaded via library.dynam()?

2009-02-19 Thread Duncan Murdoch
On 19/02/2009 6:19 PM, Alex F. Bokov wrote: Hello. To save the hassle of quitting and restarting R every time I rebuild the package I'm working on (for the purposes of this question called roots) I would like to write a script cleanly remove the package from my R session and then load it

Re: [R] How to unload a dll loaded via library.dynam()?

2009-02-19 Thread Gábor Csárdi
Hmmm, I think restarting R is not a very good solution. It is rather ugly in the first place. But perhaps even more importantly, it can be rather inconvenient if one has a large data set in the memory and needs to save/load it just to reload a package that was updated in the meanwhile. This

[R] residuals from a fractional arima model and other questions

2009-02-19 Thread Horace Tso
Dear list and Martin, I'm testing different approaches to fit an electricity demand time series and come upon the fracdiff package (v 1.3-1) for fitting fractional ARIMA models. The following questions are motivated by this package. 1. Despite having a help page, the residuals and fitted

[R] equivalent function to MatLab 'step' ?

2009-02-19 Thread Carl Witthoft
I have to admit I don't fully understand how MatLab's step() function works, but I'm learning that part. Can someone point me to equivalentrelated functions in R? thanks Carl __ R-help@r-project.org mailing list

Re: [R] RODBC crashes connecting to Teradata

2009-02-19 Thread Graham Williams
Received Fri 19 Dec 2008 7:38am +1100 from Prof Brian Ripley: On Thu, 18 Dec 2008, Francisco Javier Perez Caballero wrote: Hi, I'm trying to connect to a Teradata database via RODBC on a Linux 64 machine (Red Hat Enterprise Linux 5). [...] library(RODBC) conn = odbcConnect(thedsn,

Re: [R] Build R-2.8.1 on AIX5.3

2009-02-19 Thread 亿元五角
Thanks for Ej-ji's help. I have succesfully built R-2.8.1 on AIX,but I also found a problem in my build process-- the 783 line on patch file should be combined with 782 line. Thanks for Ei-ji again. Jin Date: Thu, 19 Feb 2009 09:39:26 + From: rip...@stats.ox.ac.uk To:

Re: [R] Build R-2.8.1 on AIX5.3

2009-02-19 Thread Ei-ji Nakama
I have succesfully built R-2.8.1 on AIX,but I also found a problem in my build process-- the 783 line on patch file should be combined with 782 line. Oops, mended. http://prs.ism.ac.jp/~nakama/AIX/AIX_R-2.8.1_fix.patch Now, I do not have AIX that can be tested.:( Thank you Jin. -- EI-JI

[R] importing data to SQLite database with sqldf

2009-02-19 Thread Stephen Tucker
Hi all, I am attempting to learn SQL through sqldf... One task I am particularly interested in is merging separate (presumably large) files into a single table without loading these files into R as an intermediate step (by loading them into SQLite and merging them there). Taking a step back,

Re: [R] problem with comparing a part of string with whole string

2009-02-19 Thread venkata kirankumar
Hi , i just attached one file to this mail which contains one modal of my data and there i have to search for the rows which contains SPECIMENTYP %in% ADIPOSE TISSUE and the rows which contains PRESERVEDin ORGCHARRES for that i tried with r-subset(rr,SPECIMENTYP %in% ADIPOSE TISSUE

[R] log-minus-log plot

2009-02-19 Thread C.H.
Dear experts, I would like to know how to plot the log-minus-log plot for survival analysis (to check the proportional assumption) in R. Using the AML example. fit - survfit(Surv(time, status) ~ x, data=aml) length(fit$surv) #20 as the length of fit$surv is shorter than aml$x and aml$time. I

[R] smoothing 2D vector field

2009-02-19 Thread _
Hi all, is there a function / package in R that provides a function like Matlab's conv2 or filter2 for smoothing a vector- / velocity- field. I unfortunately could not find anything. Thanks a lot. __ R-help@r-project.org mailing list

[R] write.table

2009-02-19 Thread lauramorg...@bluewin.ch
Hello, I tried to turn lists into vectors and then bind them together in order to create a dataframe but if, after this, I try to use the function write.table I get the following error message: Error in write.table(x, file, nrow(x), p, rnames, sep, eol, na, dec, as.integer(quote), : 'list'

<    1   2