Re: [R] KalmanLike: missing exogenous factor?

2004-10-11 Thread Prof Brian Ripley
On Mon, 11 Oct 2004, Heng Sun wrote: > From the help document on KalmanLike, KalmanRun, etc., > I see the linear Gaussian state space model is > > a <- T a + R e > y = Z' a + eta > > following the book of Durbin and Koopman. > > In practice, it is useful to run Kalman > filtering/smoothing/for

Re: [R] How to read unbalanced data from file?

2004-10-11 Thread Petr Pikal
On 11 Oct 2004 at 11:45, wfang wrote: > Hi, >I tried to read some unbalance data (with different number if rows) > > using x<- read.table("filename", header = true) command, but the > program refuses to read the table. Could you tell me why this is Hallo Your OS, your R version is missin

Re: [R] plotting directly to the printer

2004-10-11 Thread Matt Austin
?postscript provides an example __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] plotting with multiple files

2004-10-11 Thread Matt Austin
T. Murlidharan Nair sdsc.edu> writes: > > Hi !! > I need to generate plots from several multiple file and I am doing this > by reading it as a list using c(file1, file2.). > Since I need to either print the plots or save it as an plot image while > generating the plots in a loop, has anyo

[R] KalmanLike: missing exogenous factor?

2004-10-11 Thread Heng Sun
>From the help document on KalmanLike, KalmanRun, etc., I see the linear Gaussian state space model is a <- T a + R e y = Z' a + eta following the book of Durbin and Koopman. In practice, it is useful to run Kalman filtering/smoothing/forecasting with exogenous factor: a <- T a + L b + R e y =

[R] plotting directly to the printer

2004-10-11 Thread T. Murlidharan Nair
How do I send the plots directly to the printer ? Thanks ../Murli __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] plotting with multiple files

2004-10-11 Thread T. Murlidharan Nair
Hi !! I need to generate plots from several multiple file and I am doing this by reading it as a list using c(file1, file2.). Since I need to either print the plots or save it as an plot image while generating the plots in a loop, has anyone done this before. Also is there a getchar() equiva

Re: [R] split and rlm

2004-10-11 Thread Stuart Luppescu
On æ, 2004-10-11 at 15:54 +0100, Prof Brian Ripley wrote: > On Mon, 11 Oct 2004, Stuart Luppescu wrote: > 0) Do use extractor function like coef() and df.residual(). > > 1) for the 100 fits try using the default interface, not the formula one. > > 2) df.residual is not a relevant concept, and the

Re: [R] colClasses

2004-10-11 Thread Peter Dalgaard
"Kalaylioglu, Zeynep (IMS)" <[EMAIL PROTECTED]> writes: > Hi > I am trying to read a data frame from a text editor in to R. I want some > of the columns to be read in as "character" not numeric. > I figured that I can do that by using "colClasses" in "read.table" > command. However, I couldn't fi

Re: [R] colClasses

2004-10-11 Thread Witold Eryk Wolski
I would try. colClasses=c("character","numeric","character","numeric","numeric") /E Kalaylioglu, Zeynep (IMS) wrote: Hi I am trying to read a data frame from a text editor in to R. I want some of the columns to be read in as "character" not numeric. I figured that I can do that by using "colClasses

Re: [R] colClasses

2004-10-11 Thread Roger D. Peng
When using colClasses you need to specify the types of all the columns. So assuming the other columns are numeric data, you could set colClasses = c("character", "numeric", "character", "numeric", "numeric") -roger Kalaylioglu, Zeynep (IMS) wrote: Hi I am trying to read a data frame from a text

Re: [R] colClasses

2004-10-11 Thread Duncan Murdoch
On Mon, 11 Oct 2004 16:21:31 -0400, "Kalaylioglu, Zeynep (IMS)" <[EMAIL PROTECTED]> wrote: >Hi >I am trying to read a data frame from a text editor in to R. I want some >of the columns to be read in as "character" not numeric. >I figured that I can do that by using "colClasses" in "read.table" >c

[R] 64-bit R on Intel Xeon EM64T running fine

2004-10-11 Thread Michael Seewald
Dear mailing-list members, In the days of cheap RAM and microarray applications feasting on memory, 64-bit computers become more and more useful - to actually make use of memory beyond the magic 4GB border. I would like to report the success of running 64-bit R on an Intel Xeon EM64T machine unde

[R] colClasses

2004-10-11 Thread Kalaylioglu, Zeynep (IMS)
Hi I am trying to read a data frame from a text editor in to R. I want some of the columns to be read in as "character" not numeric. I figured that I can do that by using "colClasses" in "read.table" command. However, I couldn't find out how to use "colClasses". e.g. say I have 5 column in the da

[R] lmList - strange problem

2004-10-11 Thread Michael Jerosch-Herold
I am using lmList, which takes 'Data' partitioned according to the levels of a grouping factor (gf) and individual 'lm' fits are obtained for each 'data'partition, using a model defined as in "lm". So my call to lmList looks something like: > mg.lis <- lmList(strmbf ~ age1c + gender1 + sysbp.cli

Re: [R] memory in R

2004-10-11 Thread Gabor Grothendieck
yyan liu yahoo.com> writes: : : Hi: : I am doing a MCMC algorithm which is well known to : consume much computer memory. And I have a problem : everytime I run my R program. It stopped at certain : iteration and says "can not allocate a vector of 19 : kb". : It seems that the computer's memory

Re: [R] nlm question

2004-10-11 Thread Peter Dalgaard
Thomas Lumley <[EMAIL PROTECTED]> writes: > You might want to look at the function surface, eg: > >dd<-expand.grid(x=seq(0,2,length=20),y=seq(0,2,length=20)) >yy<-apply(dd,1,mfun1) >contour(seq(0,2,length=20),seq(0,2,length=20),matrix(yy,20),nlevels=40) > > The function is nearly fla

RE: [R] memory in R

2004-10-11 Thread Prof Brian Ripley
On Mon, 11 Oct 2004, Vadim Ogranovich wrote: > Setting A <- NULL doesn't immediately release the memory, the memory is > actually released in gc(), which R calls for you at some "random" time. > In situations like this I explicitely call gc() and do not wait for R to > do this, e.g > A <- NULL; gc

[R] scoping problem when calling step inside a function

2004-10-11 Thread Scott Gilpin
Hi everyone - I'm trying to do a forward stepwise regression (I've tried both step and stepAIC) inside of a function. I can do it outside the function with no problems (first example in code below). I can also do a backward stepwise regression inside a function (second example), but forward step

RE: [R] memory in R

2004-10-11 Thread Vadim Ogranovich
Setting A <- NULL doesn't immediately release the memory, the memory is actually released in gc(), which R calls for you at some "random" time. In situations like this I explicitely call gc() and do not wait for R to do this, e.g A <- NULL; gc() Hope this helps, Vadim > -Original Message-

[R] memory in R

2004-10-11 Thread yyan liu
Hi: I am doing a MCMC algorithm which is well known to consume much computer memory. And I have a problem everytime I run my R program. It stopped at certain iteration and says "can not allocate a vector of 19 kb". It seems that the computer's memory has been exhausted. However, it is said that a

Re: [R] nlm question

2004-10-11 Thread Thomas Lumley
On Mon, 11 Oct 2004, Laura Holt wrote: Dear R People: I am trying to duplicate the example from Dennis and Schnabel's "Numerical Methods for Unconstrained Optimization and Nonlinear Equations", which starts on page 149. My reason for doing so: to try to understand the "nlm" function. Here is th

Re: [R] Problem with RMySQL-0.5-3.zip/R 2.0.0 on Windows XP

2004-10-11 Thread vha
Thank you very much, David. I installed the compiled RMySQL zip package and it works fine now. Witold Eryk Wolski also suggested the following way to get around having to recompile. In the package directory is directory called meta. There are some *.rds files generated I during the build, pr

Re: [R] install failure Ruuid package on OS X

2004-10-11 Thread Thomas Lumley
On Mon, 11 Oct 2004, Ingmar Visser wrote: Dear All, When installing the Ruuid package (from Bioconductor) from sources on my MAC (OS X 10.3.5, R version 2.0.0) I get the following errors: Yes. You need the "GLib" library (eg http://developer.gnome.org/doc/API/2.0/glib/glib-building.html). It need

Re: [R] Problem with RMySQL-0.5-3.zip/R 2.0.0 on Windows XP

2004-10-11 Thread Prof Brian Ripley
On Mon, 11 Oct 2004 [EMAIL PROTECTED] wrote: > I have been installing and using the RMySQL package, version 0.5-3 with > R versions 1.9.0 and 1.9.1 on Windows XP without any problem. I > installed the package using the .zip binary package available at > http://stat.bell-labs.com/RS-DBI/download/in

[R] Diagnosing trouble with R-2.0, Fedora Core 2, and Rcmdf

2004-10-11 Thread Paul Johnson
Greetings, R-help! On 2 Fedora Core 2 Linux systems, i've completely erased the previous R and all packages and then installed R-2.0 and installed fresh packages. In using Rcmdr, I see some trouble and I wonder if other people see this and if it is due to the tcl/tk, or R, or Rcmdr. (If readers

[R] nlm question

2004-10-11 Thread Laura Holt
Dear R People: I am trying to duplicate the example from Dennis and Schnabel's "Numerical Methods for Unconstrained Optimization and Nonlinear Equations", which starts on page 149. My reason for doing so: to try to understand the "nlm" function. Here is the function: mfun1 function(x) {

Re: [R] read "4-jan-02" as date

2004-10-11 Thread Peter Dalgaard
bogdan romocea <[EMAIL PROTECTED]> writes: > Dear R users, > > I have a column with dates (character) in a data frame: > 12-Jan-01 11-Jan-01 10-Jan-01 9-Jan-01 8-Jan-01 5-Jan-01 > and I need to convert them to (Julian) dates so that I can > sort the whole data frame by date. I thought it would

[R] Problem with RMySQL-0.5-3.zip/R 2.0.0 on Windows XP

2004-10-11 Thread vha
I have been installing and using the RMySQL package, version 0.5-3 with R versions 1.9.0 and 1.9.1 on Windows XP without any problem. I installed the package using the .zip binary package available at http://stat.bell-labs.com/RS-DBI/download/index.html. However, I ran into a problem using thi

Re: [R] read "4-jan-02" as date

2004-10-11 Thread Gabor Grothendieck
> : From: bogdan romocea <[EMAIL PROTECTED]> : : Dear R users, : : I have a column with dates (character) in a data frame: : 12-Jan-01 11-Jan-01 10-Jan-01 9-Jan-01 8-Jan-01 5-Jan-01 : and I need to convert them to (Julian) dates so that I can : sort the whole data frame by date. I thought it

Re: [R] read "4-jan-02" as date

2004-10-11 Thread Prof Brian Ripley
On Mon, 11 Oct 2004, bogdan romocea wrote: > Dear R users, > > I have a column with dates (character) in a data frame: > 12-Jan-01 11-Jan-01 10-Jan-01 9-Jan-01 8-Jan-01 5-Jan-01 > and I need to convert them to (Julian) dates so that I can > sort the whole data frame by date. I thought it would

Re: [R] read "4-jan-02" as date

2004-10-11 Thread Tony Plate
Works fine when you give as.Date() a character vector. I suspect the Date column in your data frame is a factor. > d <- c("12-Jan-01", "11-Jan-01", "10-Jan-01", "9-Jan-01", "8-Jan-01", "5-Jan-01") > d [1] "12-Jan-01" "11-Jan-01" "10-Jan-01" "9-Jan-01" "8-Jan-01" "5-Jan-01" > as.Date(d, format

Re: [R] read "4-jan-02" as date

2004-10-11 Thread Sundar Dorai-Raj
bogdan romocea wrote: Dear R users, I have a column with dates (character) in a data frame: 12-Jan-01 11-Jan-01 10-Jan-01 9-Jan-01 8-Jan-01 5-Jan-01 and I need to convert them to (Julian) dates so that I can sort the whole data frame by date. I thought it would be very simple, but after checking

[R] How to read unbalanced data from file?

2004-10-11 Thread wfang
Hi, I tried to read some unbalance data (with different number if rows) using x<- read.table("filename", header = true) command, but the program refuses to read the table. Could you tell me why this is happening and how to fix it? I just want to create a ANOVA table. Thanks. Wenyi ___

[R] install failure Ruuid package on OS X

2004-10-11 Thread Ingmar Visser
Dear All, When installing the Ruuid package (from Bioconductor) from sources on my MAC (OS X 10.3.5, R version 2.0.0) I get the following errors: m00245:~ ivisser$ R CMD INSTALL -l /Users/ivisser/Library/R/library/ /Users/ivisser/Desktop/Ruuid * Installing *source* package 'Ruuid' ... loading ca

[R] Multiple regression trees-more info

2004-10-11 Thread fietz
Sorry, as I was mentioned already I'm new in this field an thus I forgot to tell more details: I'm using R software 1.9.1 with the 'mvpart' package. In the meantime I came closer to the solution of my problem, but I get an error (see the script below). But I still don't have an idea how to label

Re: [R] R-1.9.1 compiling problem

2004-10-11 Thread Peter Dalgaard
lu kan <[EMAIL PROTECTED]> writes: > Hi Peter, > > Thanks for your help. > > But the installation file "INSTALL" comes with > R-1.9.1. > The following is a copy of it. That's irrelevant. Try typing "which install" and have a look at your PATH settings. -- O__ Peter Dalgaard

Re: [R] split and rlm

2004-10-11 Thread Peter Dalgaard
Stuart Luppescu <[EMAIL PROTECTED]> writes: > Hello, I'm trying to do a little rlm of some data that looks like this: > > UNITCOHORT perdo adjodds > 1010 96 0.398901.06894 > 1010 97 0.481131.57500 > 1010 98 0.363281.21498 > 1010 99

[R] plot hclust - canberra dist + median linkage

2004-10-11 Thread Dan Bolser
Gives strange results. I get 'weird' dendrograms with canberra / binary distance metric and median / centroid cluster methods. Is this just my data? Dan __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] R-1.9.1 compiling problem

2004-10-11 Thread lu kan
Hi Peter, Thanks for your help. But the installation file "INSTALL" comes with R-1.9.1. The following is a copy of it. Lu - INSTALLING R UNDER UNIX This document concerns building and installing R from sources. Pre-made binaries are made available for s

[R] read "4-jan-02" as date

2004-10-11 Thread bogdan romocea
Dear R users, I have a column with dates (character) in a data frame: 12-Jan-01 11-Jan-01 10-Jan-01 9-Jan-01 8-Jan-01 5-Jan-01 and I need to convert them to (Julian) dates so that I can sort the whole data frame by date. I thought it would be very simple, but after checking the documentation and

Re: [R] logistic regression

2004-10-11 Thread Dimitris Rizopoulos
Hi Heike, you'd probably want lines(xsun, predict(model2, type="response", newdata=data.frame(sun=xsun, qsun=xsun*xsun))) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35,

Re: [R] logistic regression

2004-10-11 Thread Prof Brian Ripley
On Mon, 11 Oct 2004, Heike Zimmermann wrote: > Hello, > > I have a problem concerning logistic regressions. When I add a quadratic > term to my linear model, I cannot draw the line through my scatterplot > anymore, which is no problem without the quadratic term. > In this example my binary respo

RE: [R] split and rlm

2004-10-11 Thread Liaw, Andy
Here's one example: [BTW, please tell us when you're using functions in contributed packages.] > library(MASS) > dat <- data.frame(unit=rep(1:5, each=10), y = rnorm(50), x1=rnorm(50), + x2 = rnorm(50)) > fit <- by(dat, dat$unit, function(dat) rlm(y ~ x1 + x2, dat, +

Re: [R] R-1.9.1 compiling problem

2004-10-11 Thread Peter Dalgaard
lu kan <[EMAIL PROTECTED]> writes: > I downloaded R-1.9.1.tgz, and tried to install it on > debian linux machine according to the installation > commands > ./configure > make > > but I got the following error message. Could you > please advise me what is the reason for this. > `/home1/lu/usr/t

Re: [R] split and rlm

2004-10-11 Thread Prof Brian Ripley
On Mon, 11 Oct 2004, Stuart Luppescu wrote: > Hello, I'm trying to do a little rlm of some data that looks like this: > > UNITCOHORT perdo adjodds > 1010 96 0.398901.06894 > 1010 97 0.481131.57500 > 1010 98 0.363281.21498 > 1010 99

[R] Quality of png Plot

2004-10-11 Thread stefan . albrecht
Dear all, I have troubles to save a high resultion picture with a png() command on my Windows NT 4.0 with R 2.0.0. Even a simple sequence like > png(bg = "white") > plot(1,1) > dev.off() gives a picture with all text somewhat blurred. I guess it is related to the fact that the picture is tra

Re: [R] logistic regression

2004-10-11 Thread Sundar Dorai-Raj
Heike Zimmermann wrote: Hello, I have a problem concerning logistic regressions. When I add a quadratic term to my linear model, I cannot draw the line through my scatterplot anymore, which is no problem without the quadratic term. In this example my binary response variable is "incidence", the e

Re: [R] Multiple regression trees

2004-10-11 Thread Prof Brian Ripley
You haven't even told us which add-on package you are using to get `multiple regression trees'. Is that multiple 'regression trees' or 'multiple regression' trees or what? On Mon, 11 Oct 2004 [EMAIL PROTECTED] wrote: > I'm quite new in R, but I'm working with multiple regression trees and I > wo

[R] logistic regression

2004-10-11 Thread Heike Zimmermann
Hello, I have a problem concerning logistic regressions. When I add a quadratic term to my linear model, I cannot draw the line through my scatterplot anymore, which is no problem without the quadratic term. In this example my binary response variable is "incidence", the explanatory variable is "

[R] split and rlm

2004-10-11 Thread Stuart Luppescu
Hello, I'm trying to do a little rlm of some data that looks like this: UNITCOHORT perdo adjodds 1010 96 0.398901.06894 1010 97 0.481131.57500 1010 98 0.363281.21498 1010 99 0.443911.38608 It works fine like this: rlm(perdo ~

Re: [R] File23525

2004-10-11 Thread Prof Brian Ripley
On Mon, 11 Oct 2004, Cristian Pattaro wrote: > After installing R 2.0.0, I have problem with the "help.search" as below: > > > help.search("table") > Error in help.search("table") : could not find package 'file23525' > > > help.search("mean") > Error in help.search("mean") : could not find pac

[R] Multiple regression trees

2004-10-11 Thread fietz
Dear list, I'm quite new in R, but I'm working with multiple regression trees and I would like to know a couple of things: 1. how can I label the regression tree with the number of node (each node should be labled with its number) 2. I like to know for each end node (leaves) the number of occurenc

[R] File23525

2004-10-11 Thread Cristian Pattaro
Hi! After installing R 2.0.0, I have problem with the "help.search" as below: > help.search("table") Error in help.search("table") : could not find package 'file23525' > help.search("mean") Error in help.search("mean") : could not find package 'file23525' I have had the same problem with othe

Re: [R] R 2.0.0 not suffisantly reliable to be be used

2004-10-11 Thread Rajarshi Guha
(forgot to post to the list) On Mon, 2004-10-11 at 09:44, Mike Prager wrote: > >On Sun, 10 Oct 2004, Fan wrote: > > > > > For occasional users, I would say, there's no worst thing than that: > > > you installed the new release, and soem of your existing codes no > > > longer work ! > > There is a

[R] R-1.9.1 compiling problem

2004-10-11 Thread lu kan
I downloaded R-1.9.1.tgz, and tried to install it on debian linux machine according to the installation commands ./configure make but I got the following error message. Could you please advise me what is the reason for this. _ make[1]: Entering directory `/home1/lu/usr/tmp1/R-1.9.1

Re: [R] R 2.0.0 not suffisantly reliable to be be used

2004-10-11 Thread Mike Prager
On Sun, 10 Oct 2004, Fan wrote: > For occasional users, I would say, there's no worst thing than that: > you installed the new release, and soem of your existing codes no > longer work ! There is a close parallel here. On comp.lang.fortran, a frequent problem is that existing code doesn't work w

RE: [R] question on function argument

2004-10-11 Thread Liaw, Andy
> From: Edwin Leuven > > is there a document which explains more in detail what does happen > when functions are evaluated? The `R Language Definition' manual has a chapter `Functions' with a section `Evaluation' (Sec. 4.3 in the PDF version). That might be helpful for you. Also, Thomas Lumley

Re: [R] question on function argument

2004-10-11 Thread Edwin Leuven
(1) Insufficient information in problem report (what is "myframe"?) Assuming that myframe is a data.frame containing a variable called "x1": correct (2) Believing that function calls are macros and you must be right. from the examples in the r-intro i was under the impression that R substitutes th

Re: [R] hclust title and paste - messed up

2004-10-11 Thread Peter Dalgaard
Dan Bolser <[EMAIL PROTECTED]> writes: > main=paste(c( >"Distance Measure", d, >"Cluster Method", m),sep=" "), > xlab='', > sub='' > ) > However, my plot title (main) has 4 lines, when I think it should only > have one line. > > Wha

Re: [R] hclust title and paste - messed up

2004-10-11 Thread Gregoire Thomas
paste(c("a","b","c"),collapse="") paste("a","b","c",sep="") On Mon, 2004-10-11 at 13:40, Dan Bolser wrote: > I use the following code to scan a (limited) parameter space of clustering > strategies ... > > data <- read.table(... > > dataTranspose <- t(data) > > distMeth <- c("euclidean", >

Re: [R] question on function argument

2004-10-11 Thread Peter Dalgaard
Edwin Leuven <[EMAIL PROTECTED]> writes: > dear all, > > i've looked at the r-intro (chapter 10, writing your own functions) > and searched the r-help archives but am still stuck at the following. > > i have a simple function, something like: > > myhist<-function(yvar) { > y<-subset(myframe,y

[R] hclust title and paste - messed up

2004-10-11 Thread Dan Bolser
I use the following code to scan a (limited) parameter space of clustering strategies ... data <- read.table(... dataTranspose <- t(data) distMeth <- c("euclidean", "maximum", "manhattan", "canberra", "binary" ) clustMeth <

[R] question on function argument

2004-10-11 Thread Edwin Leuven
dear all, i've looked at the r-intro (chapter 10, writing your own functions) and searched the r-help archives but am still stuck at the following. i have a simple function, something like: myhist<-function(yvar) { y<-subset(myframe,yvar>1 & yvar<=15,select=yvar) attach(y) hist(yvar) } cal

RE: [R] R 2.0.0 not suffisantly reliable to be be used

2004-10-11 Thread Ted Harding
On 10-Oct-04 Liaw, Andy wrote: >> From: Fan >> >> After wasting one whole day, I've finally decided to stay with 1.9.1, >> some problems have been reported to R-Bugs. >> >> For occasional users, I would say, there's no worst thing than that: >> you installed the new release, and soem of your exis

Re: [R] which() and value replacement in a matrix

2004-10-11 Thread Petr Pikal
On 9 Oct 2004 at 16:14, Patrick Giraudoux wrote: > Thanks for the clue. > > Actually the trouble comes when refering to a data.frame. If I use the > matrix from the data.frame (matrix(mydataframe)), everything goes > smoothly... > > So I wrote: > > indices<-which(myforetbin > 0,arr.ind=T) > m