[R] samr error

2008-01-22 Thread My Coyne
I'm running samr (Two class unpaired), but keep getting the following error: perm= 1 Error in if (logged2) { : argument is of length zero library (impute) library (samr) data = list (x=dat, y=y, geneid = matrix(twoUnpaired.data[,1],ncol=1), genenames = matrix(twoUnpaired.data[,2], ncol=1))

Re: [R] data frame to matrix

2008-01-22 Thread mel
My Coyne a écrit : > I have a data frame and would like to convert it into a matrix, how do I do > that? either use the df for the initialisation values mat = matrix(df, ...) or as.matrix() could do the trick. __ R-help@r-project.org mailing list https:

[R] Odp: data frame to matrix

2008-01-22 Thread Petr PIKAL
Hi what about as.matrix(data_frame) Regards Petr Pikal [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 23.01.2008 07:38:50: > Hello, > > I have a data frame and would like to convert it into a matrix, how do I do > that? > > > > Thanks > > > > --My Coyne > > > > > > > > > >

[R] data frame to matrix

2008-01-22 Thread My Coyne
Hello, I have a data frame and would like to convert it into a matrix, how do I do that? Thanks --My Coyne [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] a Q about R in unix

2008-01-22 Thread Don MacQueen
I would suggest that you view unix and linux as being essentially the same, from the point of view of using R. I use ESS for syntax coloring, help with indentation and parentheses matching, that sort of thing, and it works very well. -Don At 11:08 AM -0500 1/22/08, Wensui Liu wrote: >Dear All,

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

2008-01-22 Thread David Airey
. Just to close the query, here are the data and my R code to use nlme to test for a strain difference in receptor binding using nlme and the self start function SSmicmen. Cheers, Dave "rownames","y","x","strain","pool" "1",1,54.0423393249512,0.169009417295456,"dba","5_10" "2",2,96.19451904

Re: [R] help with levelplot()

2008-01-22 Thread hadley wickham
On Jan 22, 2008 8:39 PM, dxc13 <[EMAIL PROTECTED]> wrote: > > useR's, > > I want to create a "movie" of a sin function (from 0 to pi/2) using > levelplot() in the lattice package. I basically want to create 20 or so > plots of the sin function starting with an amplitude of 0 and ending at > amplit

[R] help with levelplot()

2008-01-22 Thread dxc13
useR's, I want to create a "movie" of a sin function (from 0 to pi/2) using levelplot() in the lattice package. I basically want to create 20 or so plots of the sin function starting with an amplitude of 0 and ending at amplitude 1. By using a loop and plotting these in succession, it will have

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

2008-01-22 Thread Gabor Grothendieck
Note that if you do use NA rather than 99 as others have suggested then the A==4 term should use ifelse rather than multiplication since 0 * NA = NA, not 0: transform(Data, new = (A == 1) * ((B == 1) - (B == 2)) + (A == 2) * ((B == 2) - (B ==1)) + ifelse(A == 4, NA, 0)) In fact, although more

Re: [R] How to do more advanced cross tabulation in R?

2008-01-22 Thread tom soyer
Thanks Charles and Gabor! Sorry Charles, the numbers were wrong in my example. You had the correct one. On 1/22/08, Charles C. Berry <[EMAIL PROTECTED]> wrote: > > On Tue, 22 Jan 2008, tom soyer wrote: > > > Hi, > > > > I am trying to reproduce some functionalities of Excel pivot table in R, > > s

Re: [R] install ncdf package on a 64-bit machine

2008-01-22 Thread Katharine Mullen
I am running 64-bit Ubuntu 7.10 and unfortunately remember seeing that error message but not how I got it to go away. I would first try compiling netcdf-3.6.2 from source, without changing the default directories for installation. Looking at the error message it seems like the 3 shared librarie

Re: [R] How to do more advanced cross tabulation in R?

2008-01-22 Thread Charles C. Berry
On Tue, 22 Jan 2008, tom soyer wrote: > Hi, > > I am trying to reproduce some functionalities of Excel pivot table in R, > sadly, I couldn't figure out how to do it. I am wondering if this is even > possible in R. Does anyone know? > Using 'ftable()', I can match your format, but the cell values

Re: [R] How to do more advanced cross tabulation in R?

2008-01-22 Thread Gabor Grothendieck
I think you are looking for ftable: xt <- xtabs(sales ~ company + year + quarter, data = DF) ftable(quarter ~ year + company, xt) You also might want to look at the reshape package and the rpad package. Here is a demo of a pivot table in R using rpad for the user interface and reshape for the da

Re: [R] deparse, substitute and S4 generics

2008-01-22 Thread Martin Morgan
Michal -- setMethod creates a nested function named .local when method arguments do not match generic arguments. This changes the environment in which deparse(substitute()) evaluates, and probably is a significant warning flag about using these types of idioms with S4. Creating .local is meant I

[R] How to do more advanced cross tabulation in R?

2008-01-22 Thread tom soyer
Hi, I am trying to reproduce some functionalities of Excel pivot table in R, sadly, I couldn't figure out how to do it. I am wondering if this is even possible in R. Does anyone know? Here is an example: year=rep(2003,16) quarter=rep(1:4,each=4) sales=1:16 company=rep(c("a","b","c","d"),4) df=da

Re: [R] a Q about R in unix

2008-01-22 Thread Wensui Liu
Any insight? I really appreciate your input. wensui On 1/22/08, Wensui Liu <[EMAIL PROTECTED]> wrote: > 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 befor

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

2008-01-22 Thread Rolf Turner
On 23/01/2008, at 2:02 PM, hadley wickham wrote: > No one else mentioned this, but if those 99s represent missings, you > should be using NA not a special numeric value. Amen, bro. Using ``99'' to represent a missing value is a heinous, if all too often inflicted, crime against

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

2008-01-22 Thread hadley wickham
No one else mentioned this, but if those 99s represent missings, you should be using NA not a special numeric value. Hadley On Jan 22, 2008 5:40 PM, Dimitri Liakhovitski <[EMAIL PROTECTED]> wrote: > Thanks a lot, everyone! > Dimitri > > > On 1/22/08, Gabor Grothendieck <[EMAIL PROTECTED]> wrote:

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

2008-01-22 Thread Deepayan Sarkar
On 1/22/08, Judith Flores <[EMAIL PROTECTED]> wrote: > Hi, > >Is there an analog function of textplot in the > lattice package? I need to add a data frame to a > lattice plot. I work in a Windows environment and I am > using R v 2.6.1 There's nothing built-in, but if you are happy with fixed w

Re: [R] Reading .csv file under linux

2008-01-22 Thread Peter Dalgaard
David Scott wrote: > I am a total dunce when it comes to encodings though. How do you find the > encoding of a file? > You don't. Either you know it, or you are up the proverbial creek (or roof). The "8-bit ascii" encodings is one of the greater computer crimes of the last century precisely b

Re: [R] deparse, substitute and S4 generics

2008-01-22 Thread Michał Bojanowski
Hello Bill, Thanks! Indeed that works. Can you give me a hunch why? Does it have anything to do with environments and scope? ~michal Bill.Venables wrote: > > Try putting a ... argument in the method for g as well > > setGeneric("g", function(object, ...) standardGeneric("g")) > > setMethod

[R] install ncdf package on a 64-bit machine

2008-01-22 Thread Linda Smith
Dear All, I recently got a 64bit machine and had netcdf-3.6.2 installed. Then I tried to install ncdf package but got the following error message when using netcdflib: gcc -std=gnu99 -I/home/ljin/share/R-2.6.1/include -I/home/ljin/share/R-2.6.1/include -I. -I/usr/local/include-fpic -g -O2 -c

Re: [R] deparse, substitute and S4 generics

2008-01-22 Thread Bill.Venables
Try putting a ... argument in the method for g as well setGeneric("g", function(object, ...) standardGeneric("g")) setMethod("g", "ANY", function(object, ...) ### change { nam <- deparse(substitute(object)) cat("name:", nam, "\n") object } ) Now it works. Bill Venables CSIRO Labo

[R] Adding a table to a lattice plot

2008-01-22 Thread Judith Flores
Hi, Is there an analog function of textplot in the lattice package? I need to add a data frame to a lattice plot. I work in a Windows environment and I am using R v 2.6.1 Thank you, Judith Be a bette

[R] deparse, substitute and S4 generics

2008-01-22 Thread Bojanowski, M.J. (Michal)
Hello everyone, I encountered the following confusing behavior of 'deparse' and 'substitute' while programming with S4 classes (see example below). It seems like the presence of '...' argument in the definition of the generic generates the problem. I have no clue why, can anyone explain that to me

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

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] 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] 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] 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] 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 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

[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] 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

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] 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("

[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
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

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] 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

[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] 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

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 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

[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

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] 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~

[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

[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

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

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

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

[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

[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] 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<-

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] 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("

[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] 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] 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] 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

[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 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

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

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

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] 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

[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] 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

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] 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] 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:

[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.

[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

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] 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] 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] 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 _

[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] 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] 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] 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

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 <-

[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] 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

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] 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 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] 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 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] 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

  1   2   >