Re: [R] row-wise conditional update in dataframe

2008-01-22 Thread jiho
On 2008-January-22 , at 03:10 , Jon Erik Ween wrote: > That got me there. I suppose R prefers absolute field references in > scripts rather than macrosubstitutions of field names like you would > do in pearl or shell scripts? no, actually, the problem is that apply works on arrays/matrices[1],

Re: [R] Reading Genepop files

2008-01-22 Thread H. Skaug
Thanks, but I think this function (in the the ARES package) reads a dataset in genepop input format, not the result file from genepop.exe. hans On 1/21/08, Henrique Dallazuanna <[EMAIL PROTECTED]> wrote: > > Perhaps: > > http://finzi.psych.upenn.edu/R/library/ARES/html/read.genepop.html > > On 2

[R] geometric transformation

2008-01-22 Thread jgarcia
Hi everyone, I've got a set of thousands points (2D) located on a pixel image, and I know that four points in this pixels image correspond to four points in a real space on which I need to locate the mapping of all the thousand source points from the pixel set. For this I've got four reference poi

Re: [R] Adding an Sweave Vignette to a package

2008-01-22 Thread Uwe Ligges
In R, type Sys.getenv("PATH") and you will probably find that the PATH does not include the path of the pdflatex executable of the mikTeX distribution. Uwe Doran, Harold wrote: > Jim > > First thanks for your patience. I use MikTex as well. I do have both > (texti2dvi and pdflatex) on my lo

[R] ODE's in R

2008-01-22 Thread Markku Karhunen
Dear all, Has anybody tried numerical solving of ODE's and/or transport equations in R? (Don't ask how we ended up in using R for this job, in the first place!) More precisely, does anybody know any technical issue that could make the work insecure in the sense of propagation of errors? Is the

Re: [R] Stationarity of a Time Series

2008-01-22 Thread Pfaff, Bernhard Dr.
Hello Stephen, stationarity tests as well as unit root tests have been implemented in a couple of packages. For instance, as already mentioned: tseries, but also uroot, fUnitRoots and urca. See the annotated task view "Econemtrics" and "Finance" for further information. Best, Bernhard > >kpss.t

Re: [R] Bugs through R in Mac

2008-01-22 Thread Uwe Ligges
Bill Northcott wrote: > On 21/01/2008, at 10:00 PM, Uwe Ligges wrote: >> Fredrik Lundgren wrote: >>> Hello, >>> >>> I recently changed from Win XP to Mac OS X (10.5.1). >>> Is there a way to run Bugs (in any version) in R (R version 2.6.0 >>> (2007-10-03)) on this platform? >>> >> >> Which way t

[R] select repositories under linux

2008-01-22 Thread Eleni Christodoulou
Hi all, I am trying to install the package "GEOquery" in unix. I have downloaded the standard version of R and this package is not contained in the default. I know that I can select repositories under windows but I don't know how to do it in unix. Does anyone have any idea on this? Thank you in a

[R] R: determinants and inverses

2008-01-22 Thread Allan Clark
hello all sorry for the following "none" R related question. does anyone know of a reference to calculate the following identity: |I + ABC| where I is an identity matrix and A, B,C may not have to be square matrices? you help will be greatly appreciated. H. V. Henderson; S. R.

Re: [R] Problems saving the workspace image

2008-01-22 Thread Ana Azevedo
Thanks for your help! I change the starting directory to one I own. I start up R from the same directory. Now it`s working. Best regards, Ana -Mensagem original- De: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Enviada: segunda-feira, 21 de Janeiro de 2008 16:09 Para: Erin Hodgess Cc: Ana

Re: [R] select repositories under linux

2008-01-22 Thread Gabor Csardi
Eleni, download the package (I assume you know where it is), on Linux you will need the source package. Then from R type install.packages("", repos=NULL) Gabor On Tue, Jan 22, 2008 at 11:26:12AM +0200, Eleni Christodoulou wrote: > Hi all, > > I am trying to install the package "GEOquery" in un

Re: [R] geometric transformation

2008-01-22 Thread ONKELINX, Thierry
Javier, You can use two lm-models for that. One for each coordinate. Then use predict() to calculate the coordinates of the other points. And by the way: four points is not very much data to calculate a transformation. I mlight work if the image is not very much distorted and you have precise meas

Re: [R] select repositories under linux

2008-01-22 Thread Gavin Simpson
hits=-2.6 tests=BAYES_00 X-USF-Spam-Flag: NO On Tue, 2008-01-22 at 11:26 +0200, Eleni Christodoulou wrote: > Hi all, > > I am trying to install the package "GEOquery" in unix. I have downloaded the > standard version of R and this package is not contained in the default. I > know that I can selec

[R] R object as a function

2008-01-22 Thread Thomas Steiner
I want to use a function as an argument to ingtegrate it twice. See the following (senseless) example of a double integration: test<-function(sf,lo,up,rest) { innerFkn<-function(sf,lo) { inte=integrate(f=sf,lower=lo,upper=4) return( inte$value ) } integral=integrate(f=innerFkn,lower=

Re: [R] ODE's in R

2008-01-22 Thread Martin Maechler
> "MK" == Markku Karhunen <[EMAIL PROTECTED]> > on Tue, 22 Jan 2008 10:57:25 +0200 writes: MK> Dear all, MK> Has anybody tried numerical solving of ODE's and/or transport equations MK> in R? (Don't ask how we ended up in using R for this job, in the first MK> place!)

Re: [R] select repositories under linux

2008-01-22 Thread Henrique Dallazuanna
See setRepositories() On 22/01/2008, Eleni Christodoulou <[EMAIL PROTECTED]> wrote: > Hi all, > > I am trying to install the package "GEOquery" in unix. I have downloaded the > standard version of R and this package is not contained in the default. I > know that I can select repositories under win

[R] Help - linear regression

2008-01-22 Thread Thanjavur Bragadeesh
Hi, I am trying a linear regression model where the dependent variable is the size of the heart corrected for the patient's height and weight. This is labelled as LAVI. The independent variables are race (european or non-eurpoean), age, sex (male or female) of the patient and whether they hav

Re: [R] Reading Genepop files

2008-01-22 Thread Henrique Dallazuanna
Which is the output format of file? On 22/01/2008, H. Skaug <[EMAIL PROTECTED]> wrote: > Thanks, but I think this function (in the the ARES package) reads > a dataset in genepop input format, not the result file > from genepop.exe. > > hans > > > > On 1/21/08, Henrique Dallazuanna <[EMAIL PROTECTE

Re: [R] image/area plot

2008-01-22 Thread Henrique Dallazuanna
Perhaps you can do this: On 21/01/2008, Marta Rufino <[EMAIL PROTECTED]> wrote: > > Thank you very much for the help. > > > > kk=data.frame(fact=letters[1:10], > freq=c(5,1,10,2,10,7,5,10,30,20)) > res <- rep(kk[[1]], kk[[2]]) > resmat <- matrix(c(res), 10) > image(1:10, 1:10, resmat, col=rainb

Re: [R] select repositories under linux

2008-01-22 Thread Prof Brian Ripley
On Tue, 22 Jan 2008, Eleni Christodoulou wrote: > Hi all, > > I am trying to install the package "GEOquery" in unix. I have downloaded the > standard version of R and this package is not contained in the default. I > know that I can select repositories under windows but I don't know how to do > it

[R] Multivariable barplot

2008-01-22 Thread Pilar Loren
Hi, is it possible to do a multivariable barplot with ggplot2? I have something like that: > df LENGTH LAT 091639 10.002 42.26282 091640 30.808 42.26834 091641 21.591 42.31689 091642 22.030 41.53246 091643 22.744 42.01954 091644 12.702 42.67751 091645 39.728 4

Re: [R] Stationarity of a Time Series

2008-01-22 Thread Prof Brian Ripley
On Tue, 22 Jan 2008, Pfaff, Bernhard Dr. wrote: > Hello Stephen, > > stationarity tests as well as unit root tests have been implemented in a > couple of packages. For instance, as already mentioned: tseries, but > also uroot, fUnitRoots and urca. See the annotated task view > "Econemtrics" and "F

[R] Communicating with R through a named pipe: display refresh problem

2008-01-22 Thread Parker Jones
Hello, On a linux system I'm trying to send commands to R through a named pipe and am *nearly* successful. I can send R commands and can plot graphs. The only problem I have is getting the x11 display to refresh - it appears to hang because of the pipe. The R server: $ mkfifo R_pipe $ R --n

Re: [R] ODE's in R

2008-01-22 Thread Peter Dalgaard
Markku Karhunen wrote: > Thanks, Dr. Maechler. > >> No, there's no such track. >> [ Matlab users coming to R may produce wrong R code >> by using 0:n-1 instead of 0:(n-1) ; but I don't assume this >> would be the case ] >> >> >> > Been there, done that! > >> MK> We use just a

Re: [R] ODE's in R

2008-01-22 Thread Markku Karhunen
Thanks, Dr. Maechler. > No, there's no such track. > [ Matlab users coming to R may produce wrong R code > by using 0:n-1 instead of 0:(n-1) ; but I don't assume this > would be the case ] > > Been there, done that! > MK> We use just a simple discretisation written in a for loop >

[R] error bar position setting

2008-01-22 Thread Yogesh Tiwari
Hi, I am using R on Windows XP. I am using 'arrows' funtion to plot the variance as error bar, BUT error bar goes only one side of the data point, I need to plot the error bar on both side of the data point (plot is attached), I am using following commands to plot, plot(file3$lat,file3$STotwoKm,

Re: [R] R object as a function

2008-01-22 Thread Duncan Murdoch
On 22/01/2008 5:30 AM, Thomas Steiner wrote: > I want to use a function as an argument to ingtegrate it twice. > See the following (senseless) example of a double integration: > > test<-function(sf,lo,up,rest) { > innerFkn<-function(sf,lo) { > inte=integrate(f=sf,lower=lo,upper=4) > retu

Re: [R] R object as a function

2008-01-22 Thread Duncan Murdoch
On 22/01/2008 6:51 AM, Thomas Steiner wrote: > Okay, let me try to better say what I meant: > > myfun1<-function(x=5,pa) { > return(pa[1]*x^2+pa[2]*x+pa[3]) > } > myfun2<-function(x=5,param,myfunk1) { > return(param[1]*myfunk1(x)+param[2]*myfunk1(x)) > } > test<-function(pars1,pars2,lo,up){ >

Re: [R] R object as a function

2008-01-22 Thread Thomas Steiner
Okay, let me try to better say what I meant: myfun1<-function(x=5,pa) { return(pa[1]*x^2+pa[2]*x+pa[3]) } myfun2<-function(x=5,param,myfunk1) { return(param[1]*myfunk1(x)+param[2]*myfunk1(x)) } test<-function(pars1,pars2,lo,up){ mf=myfun1(x=2,pa=8*pars1) integ=integrate(f=myfun2,lower=lo,u

Re: [R] Multivariable barplot

2008-01-22 Thread Domenico Vistocco
Pilar Loren wrote: > Hi, is it possible to do a multivariable barplot with ggplot2? > > I have something like that: > > >> df >> >LENGTH LAT > 091639 10.002 42.26282 > 091640 30.808 42.26834 > 091641 21.591 42.31689 > 091642 22.030 41.53246 > 091643 22.744 42

Re: [R] R: determinants and inverses

2008-01-22 Thread Allan Clark
hello Charilaos thank you for your reply. i know how to use R to calculate the results. i want to simplify the results mathematically. i found a reference that helps. see mardia, kent, bibby, "multivariate analysis", (2003) pg 457,458 for the correct simplifiations. (for those inter

Re: [R] Multivariable barplot

2008-01-22 Thread Domenico Vistocco
Domenico Vistocco wrote: > Pilar Loren wrote: > >> Hi, is it possible to do a multivariable barplot with ggplot2? >> >> I have something like that: >> >> >> >>> df >>> >>> >>LENGTH LAT >> 091639 10.002 42.26282 >> 091640 30.808 42.26834 >> 091641 21.5

[R] contingency table on data frame

2008-01-22 Thread Karin Lagesen
I am sorry if this is a faq or tutorial somewhere, but I am unable to solve this one. What I am looking for is a count of how many different categories(numbers in this case) that appears for a given factor. Example: > l <- c("Yes", "No", "Perhaps") > x <- factor( sample(l, 10, replace=T), level

Re: [R] error bar position setting

2008-01-22 Thread Richard . Cotton
> I am using 'arrows' funtion to plot the variance as error bar, BUT error > bar goes only one side of the data point, I need to plot the error bar on > both side of the data point (plot is attached), I am using following > commands to plot, > > plot(file3$lat,file3$STotwoKm,pch=21,cex=2.5,ylim=c

Re: [R] R object as a function

2008-01-22 Thread Thomas Steiner
Thank you very much Duncan for your quick answers. > You're not passing a function as myfunk1, you're passing mf, which is > the result of evaluating myfun1, so it's a numeric vector. Yes, this is exacty my problem. If I leave it away, the problem will not be resolved (it needs pa or not) myfun1

Re: [R] contingency table on data frame

2008-01-22 Thread Domenico Vistocco
Karin Lagesen wrote: > I am sorry if this is a faq or tutorial somewhere, but I am unable to > solve this one. > > What I am looking for is a count of how many different > categories(numbers in this case) that appears for a given factor. > > Example: > > >> l <- c("Yes", "No", "Perhaps") >> x <-

Re: [R] Need suggestions about GUI

2008-01-22 Thread ronggui
Thanks, John, Here is some code to show what I want to do. BTW, it seems there is a bug in svalue in gWidgetstcltk for gtext when using the drop=T argument. getsel <- function(obj, toolkit, ...) { ### get the selected text from gtext getWidget <- gWidgetstcltk:::getWidget if(tclvalue(tktag.ranges

[R] CRAN down?

2008-01-22 Thread Stefan Grosse
I am having problems to access the r-project.org homepage, someone else as well? (I know there are CRAN mirrors but they link back on the main page if I search something) Stefan __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listi

Re: [R] CRAN down?

2008-01-22 Thread Duncan Murdoch
On 1/22/2008 8:04 AM, Stefan Grosse wrote: > I am having problems to access the r-project.org homepage, someone else as > well? > > (I know there are CRAN mirrors but they link back on the main page if I > search > something) They look fine from here. (By the way, the r-project.org homepage

Re: [R] Adding an Sweave Vignette to a package

2008-01-22 Thread Doran, Harold
Thanks, Uwe. Before I modify this path, I want to make sure of one thing. My path is set according to the specifications in the document prescribed by Duncan Murdoch (at link below). Indeed, my path includes the proper location of my MikTex and pdflatex.exe files. Here is my path from the command y

Re: [R] R object as a function

2008-01-22 Thread Duncan Murdoch
On 1/22/2008 7:52 AM, Thomas Steiner wrote: > Thank you very much Duncan for your quick answers. > >> You're not passing a function as myfunk1, you're passing mf, which is >> the result of evaluating myfun1, so it's a numeric vector. > > Yes, this is exacty my problem. > If I leave it away, the p

[R] Can I StepAIC a ggwr object??

2008-01-22 Thread Luca Moiana
Hello everyone, I'm working on some ggwr model and I obtained a .ggwr object, now I'm ascking: Can I StepAIC the object to evaluate the best model and decide what variables, should get in??? Thanks Luca Moiana PhD Candidate - Environmental Science University of Milan - Bicocca _

Re: [R] CRAN down?

2008-01-22 Thread Peter Dalgaard
Stefan Grosse wrote: > I am having problems to access the r-project.org homepage, someone else as > well? > > (I know there are CRAN mirrors but they link back on the main page if I > search > something) > > Stefan > > It's up for me now, but I had rather slow access earlier in the day. --

Re: [R] Adding an Sweave Vignette to a package

2008-01-22 Thread Doran, Harold
Actually, I'm running 2.6.1. The old version is in the path, but I am working with the most recent version. I am working in DOS and am at the prompt c:\program files\r\r-2.6.1\bin. From here I do all of the work in building the package (build, check, install). > -Original Message- > From:

Re: [R] dendrogram - got it , just need to label :)

2008-01-22 Thread phlow
Hi! To label your dendrogram edges with the path to each of them, execute the following script (assuming that your dendrogram is 'dend', see last 2 lines). dendrapplyGlobal <- function(dend,attrName,FUN,...,attrNameTo=NULL) { if (is.null(attrNameTo)) { attrNameTo <- attr

Re: [R] contingency table on data frame

2008-01-22 Thread John Kane
It is not a good idea to use "sample' when building an example like this! Running the code does not give the example dataframe. This is crude but it will do what you want. x <- " Z Y X 1 4 Yes 2 1 No 3 2 Perhaps 4 3 Yes 5 4 No 6 5 No 7 1 Ye

Re: [R] Presenting results from multiple models in LaTeX table

2008-01-22 Thread Gabor Grothendieck
Create a data frame from the coefficients of your summary.lm objects and use xtable.data.frame to latex that. At the R console this will display the relevant source code to see how to do it: xtable:::xtable.lm xtable:::xtable.summary.lm On Jan 22, 2008 9:02 AM, 宋时歌 <[EMAIL PROTECTED]> wrote: > D

[R] Risk Management (Solvency or Basileia)

2008-01-22 Thread Ana Patricia Silva Cunha Martins (DGR)
Dear Users, Anyone knows a good package to works with risk management? In particularly, if exist works in R about Solvency or Basileia projects? Best Regards Ana Patrícia Martins [[alternative HTML version deleted]] __ R-help@r-

Re: [R] Adding an Sweave Vignette to a package

2008-01-22 Thread Uwe Ligges
Doran, Harold wrote: > Thanks, Uwe. Before I modify this path, I want to make sure of one > thing. My path is set according to the specifications in the document > prescribed by Duncan Murdoch (at link below). Indeed, my path includes > the proper location of my MikTex and pdflatex.exe files. Her

[R] Presenting results from multiple models in LaTeX table

2008-01-22 Thread 宋时歌
Dear All, Is there a way to present results from multiple models in one LaTeX table? I did some google search and found out that xtable cannot automate this process (https://stat.ethz.ch/pipermail/r-help/2006-August/74.html), are there other alternatives? What about Design and Hmisc? Thanks.

Re: [R] list.files sorted by date

2008-01-22 Thread John Kane
xx<- file.info(dir()); xx xx[order(xx$mtime),] ? --- Alberto Monteiro <[EMAIL PROTECTED]> wrote: > Is there any (list.files)-like function that sorts > the files by > (modification) date? > > Alberto Monteiro > > __ > R-help@r-project.org mailing lis

Re: [R] accessing the "address" of items in a recursive list

2008-01-22 Thread phlow
j daniel wrote: > > > I would like to print the "address" of the smaller dendrograms on the edge > similar to this: > > addr <- function(n) { > if(!is.leaf(n)) { > attr(n, "edgetext") <- paste("height of",(attr(n,"height")) > } > n > } > labeledDends <- dendrapply(de

[R] predict from a multiple regression model

2008-01-22 Thread Fränzi Korner
Hello how can I predict from a lm-object over a range of values of one explanatory variable without having to specify values for all the other explanatory variables? e.g. mod<-lm(y~x1+x2+x3+x4) x1.new<-seq(0, 100) predict(mod, new=list(x1=x1.new)) Here, predict() does not

Re: [R] select repositories under linux

2008-01-22 Thread Gabor Csardi
Agreed, i had no idea that this is a Bioconductor package. G. On Tue, Jan 22, 2008 at 09:49:50AM -0500, James W. MacDonald wrote: > This is questionable advice for many CRAN packages, and horrible advice > for a Bioconductor package. If there are any dependencies (and BioC > packages often hav

Re: [R] accessing the "address" of items in a recursive list

2008-01-22 Thread phlow
j daniel wrote: > > > I would like to print the "address" of the smaller dendrograms on the edge > similar to this: > > addr <- function(n) { > if(!is.leaf(n)) { > attr(n, "edgetext") <- paste("height of",(attr(n,"height")) > } > n > } > labeledDends <- dendrapply(de

[R] Lattice on FreeBSD

2008-01-22 Thread Armin Goralczyk
Hi list I tried to install package lattice on FreeBSD, but install.package() does not seem to find it in the repositories, even trying different mirrors. Could it be that lattice package is not available for FreeBSD? -- Armin Goralczyk, M.D. -- Universitätsmedizin Göttingen Abteilung Allgemein- u

Re: [R] Lattice on FreeBSD

2008-01-22 Thread Gabor Csardi
It is definitely on CRAN: http://cran.at.r-project.org/src/contrib/Descriptions/lattice.html You can download and install it "by hand", but if you want to make install.packages work, please give us at least an error message or something. G. On Tue, Jan 22, 2008 at 03:29:19PM +0100, Armin Goralc

Re: [R] select repositories under linux

2008-01-22 Thread James W. MacDonald
This is questionable advice for many CRAN packages, and horrible advice for a Bioconductor package. If there are any dependencies (and BioC packages often have many, and their dependencies may have dependencies...) you can end up in download hell, all because you have ignored the functionality

[R] 2 Rprofile.site files???

2008-01-22 Thread marcia . rocha
Dear R users, I have been having a problem with my file Rprofile.site. I did already ask the list some suggestions which have been well taken into account but unfortunately have not completely resolved my problem. I seem to have 2 files of Rprofile.site on my computer. If I open the file through

Re: [R] Communicating with R through a named pipe: display refresh problem

2008-01-22 Thread Prof Brian Ripley
Rather, non-interactive R does not run an event loop. The usual way around this is to use a pty, as R run from a pty is considered to be interactive. (Whether a fifo and a named pipe are the same concept is moot: some OSes have one and not the other.) The plan is to use threads in due course

Re: [R] predict from a multiple regression model

2008-01-22 Thread Chuck Cleland
On 1/22/2008 9:50 AM, Fränzi Korner wrote: > Hello > > > > how can I predict from a lm-object over a range of values of one explanatory > variable without having to specify values for all the other explanatory > variables? > > > > e.g. > > > > mod<-lm(y~x1+x2+x3+x4) > > > > x1.new

Re: [R] CRAN down?

2008-01-22 Thread Prof Brian Ripley
I was told that they had a UPS failure on one of the servers at the weekend. It has been up and down for parts of each of the last three days, with many down periods (both short and long). On Tue, 22 Jan 2008, Peter Dalgaard wrote: Stefan Grosse wrote: I am having problems to access the r-p

Re: [R] Communicating with R through a named pipe: display refresh problem

2008-01-22 Thread Parker Jones
> Rather, non-interactive R does not run an event loop. The usual way > around this is to use a pty, as R run from a pty is considered to be > interactive. > > (Whether a fifo and a named pipe are the same concept is moot: some OSes > have one and not the other.) > > The plan is to use thr

[R] Duncan's MRT: limitations to qtukey() function?

2008-01-22 Thread Andrea Onofri
Dear all, I'm using R to perform multiple comparison testing on agriculture genotype trials. To perform the Duncan's MRT, I use the qtukey() function with the following syntax: qtukey(p = ((1 - 0.05) ^ (pos - 1)), nmeans = pos, df = ni) I experience a strange behaviour when the number of mean

[R] anova function to test the difference between two coefficients in nlme package

2008-01-22 Thread shirley zhang
Dear Dr. Bates, and R-help, I've tried the anova function to test the difference between two coefficients, as shown on page 225 of your book "Mixed Effects Models in S and S-Plus (Statistics and Computing)". When I type: anova( fm2BW.lme, L = c(TimeDiet2 = 1, TimeDiet3 = -1) ) I got the follow

Re: [R] R on a supercomputer?

2008-01-22 Thread Chi Chan
If anyone gets R working with Rmpi and Grid Engine, please let me know. I will need to set up a compute farm with SGE. Thx, --Chi On Jan 21, 2008 8:19 PM, Mark Kimpel <[EMAIL PROTECTED]> wrote: > try Rmpi package > > On Jan 21, 2008 7:13 PM, markaoki <[EMAIL PROTECTED]> wrote: > > > hi, > > Does

Re: [R] Stationarity of a Time Series

2008-01-22 Thread Spencer Graves
the FinTS package includes in scripts\ch02.R a comparison of 4 different AFD unit root functions with a published example. it also includes a function plotArmaTrueacf that computes the roots from the AR part of a theoretical or fitted model. From this, you can see if any roots lie near the un

Re: [R] Duncan's MRT: limitations to qtukey() function?

2008-01-22 Thread Peter Dalgaard
Andrea Onofri wrote: > Dear all, > > I'm using R to perform multiple comparison testing on agriculture > genotype trials. To perform the Duncan's MRT, I use the qtukey() > function with the following syntax: > > qtukey(p = ((1 - 0.05) ^ (pos - 1)), nmeans = pos, df = ni) > > I experience a stran

[R] a Q about R in unix

2008-01-22 Thread Wensui Liu
Dear All, I finally have chance to have R install on our unix server. However, the system admin asked me if I prefer command-line or gui interface. I have experience with R on linux before but never use R on unix. Here are my questions that I need you guys help. 1) is there a good gui for R/unix li

Re: [R] ODE's in R

2008-01-22 Thread Spencer Graves
have you looked at lsoda{odesolve}? have you looked at the scripts\CSTR subdirectory in the fda package? it includes an example worked in both R and Matlab with slightly better answers in R but with a much longer compute time. sg The fda package Peter Dalgaard wrote: > Markku Karhunen wrote:

Re: [R] anova function to test the difference between two coefficients in nlme package

2008-01-22 Thread shirley zhang
Dear Dr. Bates, and R-help, I just found the reason I got the error message is because I copied the code directly from the book. When I tried the code in "~\library\nlme\scripts" under the R installation directory like the following, I got the same answere as in the book. anova(fm2BW.lme, L = c("

Re: [R] R object as a function

2008-01-22 Thread Thomas Steiner
Dear Duncan, thanks a lot for your answer. I was think a was distracted by the FED rate cut ;) Now it works. Have a nice day Thomas myfun1<-function(x,pa) { return(pa[1]*x^2+pa[2]*x+pa[3]) } myfun2<-function(x,param,myfunk1,pa) { return(param[1]*myfunk1(x,pa)+param[2]*myfunk1(-x,pa)) } test<-

[R] Recursive Function

2008-01-22 Thread Carla Rebelo
It is possible to place two functions in a recursive function Main results so as to simultaneously? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] 2 Rprofile.site files???

2008-01-22 Thread Duncan Murdoch
On 1/22/2008 10:19 AM, [EMAIL PROTECTED] wrote: > Dear R users, > I have been having a problem with my file Rprofile.site. I did already ask > the list some suggestions which have been well taken into account but > unfortunately have not completely resolved my problem. I seem to have 2 files > o

Re: [R] R object as a function

2008-01-22 Thread Sebastian Mueller
On Tuesday 22 January 2008 13:52:29 Thomas Steiner wrote: > Thank you very much Duncan for your quick answers. > > > You're not passing a function as myfunk1, you're passing mf, which is > > the result of evaluating myfun1, so it's a numeric vector. > > Yes, this is exacty my problem. > If I leave

[R] MLE for censored distributions in R

2008-01-22 Thread Thomas Downey
Hi just wondering if there is a package that can get the maximum likelihood or method of moments estimator for distributions with censored data? The distributions I'm interested in are: Exponential, pareto, beta, gamma and lognormal. -- View this message in context: http://www.nabble.com/MLE-fo

[R] recoding one variable into another - but differently for different cases

2008-01-22 Thread Dimitri Liakhovitski
Hello, I have 2 variables in my sample Data: Data$A and Data$B Variable Data$A can assume values: 1, 2, 3, and 4. Variable Data$B identifies my cases and can assume values: 1 and 2. I need to recode my variable Data$A into a new variable Data$new such that: People who are Data[Data$B %in% 1, ] a

Re: [R] select repositories under linux

2008-01-22 Thread Prof Brian Ripley
On Tue, 22 Jan 2008, James W. MacDonald wrote: > This is questionable advice for many CRAN packages, and horrible advice > for a Bioconductor package. If there are any dependencies (and BioC > packages often have many, and their dependencies may have > dependencies...) you can end up in download h

[R] extension to nlme self start SSmicmen?

2008-01-22 Thread David Airey
Dear list, Has anyone created a version of SSmicmen that allows testing for group differences? The basic Michaelis-Menten equation is: (Bmax * X) / (Kd + X). The nlme package allows modeling of random effects for Bmax and Kd as needed, but I curious how I can build in group differences? I ha

[R] Res: predict from a multiple regression model

2008-01-22 Thread Milton Cezar Ribeiro
Hi Franzi, Up to I know you can´t predict values without you have x2,x3 and x4 parameters. So you have three possible solution 1) set x2, x3 and x4 to Zero, *but* it will depend so much of what you want, because if you set them to zero, it means that you are adjusting something like mod<-lm(y~

Re: [R] recoding one variable into another - but differently for different cases

2008-01-22 Thread Marc Schwartz
Dimitri Liakhovitski wrote: > Hello, > I have 2 variables in my sample Data: Data$A and Data$B > Variable Data$A can assume values: 1, 2, 3, and 4. > Variable Data$B identifies my cases and can assume values: 1 and 2. > > I need to recode my variable Data$A into a new variable Data$new such that:

[R] stripchart

2008-01-22 Thread mohamed nur anisah
hi, I want to plot a dotplot graph but unfortunately R does not have it any more. It suggest to use either the stripchart or the dotchart and i prefer to play around with the stripchart graph. Sadly, the result is not like i want where I'm actually wants the plots/points were scattered aro

Re: [R] recoding one variable into another - but differently for different cases

2008-01-22 Thread Gabor Grothendieck
You could create a lookup table or use recode in the car package. Another possibility is to use a logical/arithmetic expression. The following expression says that - if A is 1 then use the first term equals the coefficient, namely 1 if B ==1 and -1 if B == 2. Also, if A is not 1 then that term

Re: [R] recoding one variable into another - but differently fordifferent cases

2008-01-22 Thread Bert Gunter
Try this: z1 <- c(1,-1,0,99)[Data$A] z2 <- c(-1,1,0,99)[Data$A] Data$new <- ifelse(Data$B == 1, z1,z2) (This does not generalize, however, and assumes that the values you gave are exact. Gabor's approach would work more generally) -- Bert Gunter Genentech Nonclinical Statistics -Original Me

[R] suppress some boxes drawn by legend(,fill)

2008-01-22 Thread Tom Boonen
Is there any way suppress box color and frame of a box drawn by legend(,fill)? I am able to suppress the color, but not the frame (see the example below). Many thanks! (This follows up from a question asked on the list in 2006 by Florian Koller) Tom x1 <- rnorm(100) x2 <- rnorm(100, 2) hist(x1, m

Re: [R] extension to nlme self start SSmicmen?

2008-01-22 Thread David Airey
> Dear list, > > Has anyone created a version of SSmicmen that allows testing for > group differences? The basic Michaelis-Menten equation is: > > (Bmax * X) / (Kd + X). > > The nlme package allows modeling of random effects for Bmax and Kd > as needed, but I curious how I can build in group di

Re: [R] stripchart

2008-01-22 Thread John Kane
Have a look at stripplot in lattice. I think it may do what you want if you cbind e & f and then create an identifier to plot against. e <- c(17358865 , 17966995 , 21306539 , 27880531, 34166504, 36111044, 36266288, 36854306 , 43786190 , 44322336 , 45529444, 46302360, 53479132, 58567262, 6

Re: [R] suppress some boxes drawn by legend(,fill)

2008-01-22 Thread John Kane
box.lty = 0 assuming I understand the question. --- Tom Boonen <[EMAIL PROTECTED]> wrote: > Is there any way suppress box color and frame of a > box drawn by > legend(,fill)? I am able to suppress the color, but > not the frame (see > the example below). Many thanks! (This follows up > from a

[R] X11 font at size 6 could not be loaded

2008-01-22 Thread Wittner, Ben, Ph.D.
I recently upgraded my OS to Fedora 8 from Red Hat Enterprise Work Station 3. Before I upgraded certain operations would produce a warning to the effect that a desired font was not available so one had been substituted, which was okay. After the upgrade to Fedora 8, the plotting operation halts mid

Re: [R] suppress some boxes drawn by legend(,fill)

2008-01-22 Thread John Kane
It occured to me afterwards that this was not what you wanted. I think Jerome Asselin in http://finzi.psych.upenn.edu/R/Rhelp02a/archive/15483.html has a solution that may do what you want Try legend(3, 0.45, legend = c("x1", "x2", "mean(x1)", "mean(x2)"), pch=c(22,22,30,30), col = c("

Re: [R] X11 font at size 6 could not be loaded

2008-01-22 Thread Peter Dalgaard
Wittner, Ben, Ph.D. wrote: > I recently upgraded my OS to Fedora 8 from Red Hat Enterprise Work Station 3. > Before I upgraded certain operations would produce a warning to the effect > that > a desired font was not available so one had been substituted, which was okay. > After the upgrade to Fedo

Re: [R] recoding one variable into another - but differently for different cases

2008-01-22 Thread Gabor Grothendieck
Slight correction of the English: - if A is 1 then the first term equals the coefficient of (A == 1). That is the first term equals 1 if B==1 and equals -1 if B==2. If A does not equal 1 then the first term is zero and can be ignored. - terms 2 and 3 are interpreted analogously - if A==3 (or o

[R] Reading .csv file under linux

2008-01-22 Thread David Scott
I have encountered a problem with reading a .csv file on a linux box. I can read the file on my windows machine (under XP) but on the linux box it gives : > patients <- read.csv("../Patients.csv", header = FALSE, + col.names = patientsNames) Error in type.convert(data[[i]],

Re: [R] X11 font at size 6 could not be loaded

2008-01-22 Thread Prof Brian Ripley
Have you also changed your locale? F8 defaults to UTF-8 locales, whereas people usually set up RHEL3 with an 8-bit locale. That changes the font selection, and you may find that running in en_US works whereas en_US.utf8 does not. Note that the font you quote is an 8 point 100dpi font, at 11 p

Re: [R] Reading .csv file under linux

2008-01-22 Thread Prof Brian Ripley
On Wed, 23 Jan 2008, David Scott wrote: > > I have encountered a problem with reading a .csv file on a linux box. I > can read the file on my windows machine (under XP) but on the linux box it > gives : > >> patients <- read.csv("../Patients.csv", header = FALSE, > + col.names

Re: [R] X11 font at size 6 could not be loaded

2008-01-22 Thread Wittner, Ben, Ph.D.
Thank you very much. I found .noarch.rpm's for the first 4 of the 6 you listed below and installed them and the problem went away. Strangely, when I tried to intstall (using rpm -Uvh) the 100 dpi ones I got a message saying that they were already installed. Nevertheless, when I restarted the X ser

Re: [R] X11 font at size 6 could not be loaded

2008-01-22 Thread Wittner, Ben, Ph.D.
Dear Prof. Ripley, Thanks very much. Changing the locale did not help, but finding and installing (or re-installing) xorg-x11-fonts for 75 and 100 dpi did the trick. It's still a bit of a mystery to me, but my attempt to install xorg-x11-fonts for 100 dpi appeared to fail, but nevertheless I found

Re: [R] Reading .csv file under linux

2008-01-22 Thread David Scott
On Tue, 22 Jan 2008, Prof Brian Ripley wrote: > On Wed, 23 Jan 2008, David Scott wrote: > >> >> I have encountered a problem with reading a .csv file on a linux box. I >> can read the file on my windows machine (under XP) but on the linux box it >> gives : >> >>> patients <- read.csv("../Patient

Re: [R] Reading .csv file under linux

2008-01-22 Thread Prof Brian Ripley
On Wed, 23 Jan 2008, David Scott wrote: > On Tue, 22 Jan 2008, Prof Brian Ripley wrote: > >> On Wed, 23 Jan 2008, David Scott wrote: >> >>> >>> I have encountered a problem with reading a .csv file on a linux box. I >>> can read the file on my windows machine (under XP) but on the linux box it >

Re: [R] recoding one variable into another - but differently for different cases

2008-01-22 Thread Dimitri Liakhovitski
Thanks a lot, everyone! Dimitri On 1/22/08, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > Slight correction of the English: > > - if A is 1 then the first term equals the coefficient of (A == 1). > That is the first term equals 1 if B==1 and equals -1 if B==2. > If A does not equal 1 then the

  1   2   >