[R] Zipping Rdata Files

2005-04-07 Thread Brian . J . GREGOR
Saving Rdata files in a zip archive form can in some cases save a considerable amount of disk space. R has the zip.file.extract function to extract files from zip archives, but appears not to have any corresponding function to save in zipped form. (At least I have not been able to find anything in

[R] oRegon R users group

2004-06-15 Thread Brian . J . GREGOR
R users in Oregon, Please contact me if you would like to participate in an R users group. At our agency, we use R extensively for transportation model development, implementation and analysis. We would like to meet periodically with other R users in various professions to exchange ideas on using

RE: [R] Error with 1.9.0 - winMenuAdd not usable in .Rprofile

2004-04-21 Thread Brian . J . GREGOR
I had this problem too. The documentation for the winMenus says that these functions are part of the utils package. R must be loading this library after it sources in Rprofile. If you add library(utils) to the beginning of your .First function, it should take care of the problem. Brian Gregor, P.E

[R] Why are Split and Tapply so slow with named vectors, why is a for loop faster than mapply

2004-04-08 Thread Brian . J . GREGOR
First, here's the problem I'm working on so you understand the context. I have a data frame of travel activity characteristics with 70,000+ records. These activities are identified by unique chain numbers. (Activities are part of trip chains.) There are 17,500 chains. I use the chain numbers as f

RE: [R] how to learn R quickly?

2004-04-06 Thread Brian . J . GREGOR
You might check out a short email course that Ben Stabler and I developed for transportation modelers in Oregon. It's on our web site. http://www.odot.state.or.us/tddtpau/r/rbook.pdf Brian Gregor, P.E. Transportation Planning Analysis Unit Oregon Department of Transportation [EMAIL PROTECTED] (503

RE: [R] using matrix data for function

2003-09-19 Thread Brian . J . GREGOR
It seems to me that the simplest approach is as follows. Say you have a function as follows: dosomething <- function(x,y) 0.523*x^2 + 0.34*y Then you just use apply as follows to get your result (assuming that the first column of matrix m contains the x values and the second column contains the y v

[R] How "else" works

2003-02-11 Thread Brian . J . GREGOR
I have what is likely to be a simple question about the else keyword. The usage in the help pages is as follows: if(cond) cons.expr else alt.expr I would expect to be able to use it in the following way as well: if(cond){ cons.expr } else alt.ex