Re: [R] [R-pkgs] CRANberries -- An RSS feed about New and Updated CRAN packages

2007-07-09 Thread Roger Peng
LOL! -roger On 7/9/07, Barry Rowlingson [EMAIL PROTECTED] wrote: Dirk Eddelbuettel wrote: but the easiest way may just be to subscribe to Elijah's wonderful 'Planet R' feed aggregator My favourite RSS reader at the moment is the RSS cat caption generator:

Re: [R] gam function time trend spline

2007-07-02 Thread Roger Peng
If you're looking only at winter days then you probably don't need to remove seasonal trends, do you? -roger On 7/2/07, Kevin Sorensen [EMAIL PROTECTED] wrote: I've been doing a simple time-series analysis looking at the relationship between daily pneumonia hospitalizations and daily

Re: [R] where should R be installed?

2006-10-08 Thread Roger Peng
I usually install R somewhere off my home directory because it saves me the trouble of having to become root and install somewhere in the system. I'm the only person who uses the system anyway. -roger On 10/8/06, Daniel Nordlund [EMAIL PROTECTED] wrote: I am a new user of Linux (long time user

Re: [R] Is it possible to only read a subset by read.table ?

2006-07-12 Thread Roger Peng
It's not so straightforward as that, but you could construct something with readLines(). -roger On 7/12/06, David Vonka [EMAIL PROTECTED] wrote: Hello, is it possible to do something like DATA - read.table(file=blabla.dat,subset=(sex==male)), i.e. make R read only a subset of a csv file ?

Re: [R] detach

2006-07-12 Thread Roger Peng
I believe (3) should always work as long as zoo has a namespace. The ':::' operator will load the namespace of the package but will not attach it to the search list. -roger On 7/11/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: We try the following: search() as.Date(1)

Re: [R] lm with an arbitrary number of terms

2003-04-03 Thread Roger Peng
You need to paste() together a formula. There's an example in ?formula. Try, n - 10 rhs - paste(x, 1:n, collapse = +, sep = ) lhs - y ~ f - as.formula(paste(lhs, rhs)) Then pass `f' into lm(). -roger ___ UCLA Department of Statistics [EMAIL PROTECTED]

Re: [R] S intrp function

2003-04-03 Thread Roger Peng
There is function `interp' in library(akima). Maybe this is what you're looking for? -roger ___ UCLA Department of Statistics [EMAIL PROTECTED] http://www.stat.ucla.edu/~rpeng On Wed, 2 Apr 2003, Don Isgitt wrote: Hi. I am trying some S-Plus scripts that I used

Re: [R] locfit troubles

2003-03-25 Thread Roger Peng
You should look at Loader, C. (1999) Local Regression and Likelihood, Springer. on which the package is based. In particular, check out page 218. locfit() evaluates the regression surface over a grid that's chosen adaptively. In small bandwidth situations, it can run out of memory for storing

Re: [R] question

2003-03-21 Thread Roger Peng
Try using the `pixmap' package from CRAN. -roger ___ UCLA Department of Statistics [EMAIL PROTECTED] http://www.stat.ucla.edu/~rpeng On Fri, 21 Mar 2003, vincent deschodt wrote: How can i open a bmp image and transform it in a matrix of pixels? how can i save it

Re: [R] X11 connection error in web cgi mode only

2003-03-17 Thread Roger Peng
I believe you get this error because the jpeg and png libraries require the X11 device to be open in order to generate the plot. I'll guess that if you're doing CGI then the X11 device is not available. You can try using the `bitmap' device if you want jpeg or png. This converts to jpeg/png

Re: [R] Error in making R-1.6.2.

2003-03-17 Thread Roger Peng
My experience (which isn't worth much) is that the problem isn't with the header file itself but that it depends on some *other* header file that isn't getting included. This other file may have macro definitions, etc. which, if not included, could cause a parse error. -roger

Re: [R] Trying to build R-1.6.2 under sparc-sun-solaris2.9.

2003-03-17 Thread Roger Peng
Is it possible that something has changed in your system setup since the last install? The problem below seems to be that SOCKLEN_T is not defined, which is why (I think) you get the error Rsock.c:378: `len' undeclared (first use in this function) If I remember correctly, your configure gave

Re: [R] help with likelihood contour plot

2003-03-17 Thread Roger Peng
Be careful, I don't think your loglik function is vectorized correctly. In particular, it only works for single values of th1 and th2. If th1 or th2 are vectors, you will get a warning and the wrong answer. The problem is the subtraction u - th1, because u is already vector. outer() expects that

Re: [R] printf() in C

2003-02-21 Thread Roger Peng
Try including the line R.h and using the function Rprintf(). This prints output to the R console. -roger ___ UCLA Department of Statistics [EMAIL PROTECTED] http://www.stat.ucla.edu/~rpeng On Fri, 21 Feb 2003, Maria N Kocherginsky wrote: Hi, 1. I'm making an R

Re: [R] group means

2003-02-20 Thread Roger Peng
You could try using `aggregate', e.g. df - data.frame(a = rnorm(10, 1), b = rnorm(10, 2)) grps - rep(1:2, each = 5) aggregate(df, list(grps), mean) -roger ___ UCLA Department of Statistics [EMAIL PROTECTED] http://www.stat.ucla.edu/~rpeng On Thu, 20 Feb 2003, Sundar

Re: [R] subset with NA

2003-02-19 Thread Roger Peng
If `temp' is your data frame and `tuna' is a variable in `temp', then try subset(temp, is.na(tuna)) -roger ___ UCLA Department of Statistics [EMAIL PROTECTED] http://www.stat.ucla.edu/~rpeng On Wed, 19 Feb 2003, Robert Schick wrote: Easy question that I can't find

Re: [R] programs for genetics - haplo.score for R

2003-02-14 Thread Roger Peng
It would appear that Gregory Warnes has ported it to R and the package `haplo.score' can be downloaded from CRAN (http://cran.r-project.org). -roger ___ UCLA Department of Statistics [EMAIL PROTECTED] http://www.stat.ucla.edu/~rpeng On Fri, 14 Feb 2003, Shona

Re: [R] OO programming in R

2003-02-13 Thread Roger Peng
You may want to look at the book Programming with Data by John Chambers, which describes the new-style classes. It has yet to fail me. Also the Bioconductor packages (http://www.bioconductor.org) use the new-style class system and provide a good source of code examples (even if you're not

Re: [R] OO programming in R

2003-02-13 Thread Roger Peng
Smaller (and simpler?) examples include the `pixmap' package and my `gpclib' package. They both use the `methods' package. -roger ___ UCLA Department of Statistics [EMAIL PROTECTED] http://www.stat.ucla.edu/~rpeng On Thu, 13 Feb 2003, Wolski wrote: Hi Kris! I am

Re: [R] Matrix formatting

2003-02-12 Thread Roger Peng
Is apply(foo.dat, 2, sort, na.last = TRUE) what you want? -roger ___ UCLA Department of Statistics [EMAIL PROTECTED] http://www.stat.ucla.edu/~rpeng On 12 Feb 2003, Tim Sharac wrote: Hi R-users: I have a data formatting question. I have a data set that looks

Re: [R] install error

2003-02-08 Thread Roger Peng
If you just run the `configure' script without other arguments, it will try to install in /usr/local, which you probably don't have permission to write to. Just pick a directory that you have permission to write to and use the --prefix argument to configure. For example, ./configure

Re: [R] Data manipulation

2003-02-07 Thread Roger Peng
You might want to try subsetting the data frame first, and then fit the model. Something like knap.sub - knap[c(41:60,81:100,101:120,121:140), ] knap.fit1 - lm(Kweed ~ TREAT, data = knap.sub) might work for you. -roger ___ UCLA Department of Statistics [EMAIL

Re: [R] AIC for regression models (was: (no subject))

2003-01-25 Thread Roger Peng
Yes, you can use the `AIC' function in R: set.seed(100) x1 - rnorm(100) x2 - rnorm(100) y - x1 + x2 + rnorm(100) AIC(lm(y ~ x1 + x2)) [1] 286.7287 -roger ___ UCLA Department of Statistics [EMAIL PROTECTED] http://www.stat.ucla.edu/~rpeng On Fri, 24 Jan 2003,

Re: [R] Ideas needed on automation of R

2003-01-12 Thread Roger Peng
Not sure about your first question. Regarding your second question, maybe you should just sink to a file: sink(ex.lm.out) example(lm) sink() -roger ___ UCLA Department of Statistics [EMAIL PROTECTED] http://www.stat.ucla.edu/~rpeng On Sun, 12 Jan 2003, [EMAIL

[R] Writing packages with `methods' package

2002-12-29 Thread Roger Peng
I'm trying to write a package which uses classes/methods as defined in the `methods' package. I have a single .R file which defines the class and various methods for that class. At the top of the file I have require(methods) and then setClass(myclass, ...) setGeneric(intersect)

Re: [R] Is there string class in R?

2002-12-25 Thread Roger Peng
See the paste() function. for(i in 1:N) { filename - paste(***, i, .PRN, sep = ) scan(filename) ... } -roger ___ UCLA Department of Statistics [EMAIL PROTECTED] http://www.stat.ucla.edu/~rpeng On Wed, 25 Dec 2002, Zhongming Yang wrote: Hi, I want to use

Re: [R] Memory leak in R v1.6.0?

2002-12-18 Thread Roger Peng
There was a memory leak discovered in R 1.6.0 but it's difficult to tell if this is in fact causing your problem. At any rate, you should upgrade to version 1.6.1 (the latest release). -roger ___ UCLA Department of Statistics [EMAIL PROTECTED]