Re: [R] Can I use a variable to pass a file name to scan() ?

2005-03-27 Thread Spencer Graves
What operating system and which version of R? I got a similar error message under R 2.0.1 under Windows 2000: > y <- scan(file = x[1]) Error in scan(file = x[1]) : "scan" expected a real, got "ÐÏࡱ" Part of the function definition for "scan" is 'scan(file = "", what = double(0

[R] Can I use a variable to pass a file name to scan() ?

2005-03-27 Thread Andrew Peterson
Hi, can anyone please tell me if it is possible to use a variable to pass a file name to scan()? I am trying to write a program that loops through a series of text files. I use list.files() to create a character vector of file names. Then I would like to take one string at a time from the charact

Re: [R] Where can I found the package "ordinal" ?

2005-03-27 Thread 美菊 黃
Thanks for your apply. I have tried the link: http://fdg-popgen146.unimaas.nl/~plindsey/rlibs.html but it show that : Access forbidden! You don't have permission to access the requested object. It is either read-protected or not readable by the server. If you think this is a server e

Re: [R] Applying function to multiple input vectors

2005-03-27 Thread hadley wickham
>Is there a method analogous to sapply() for this operation? Check out mapply. Hadley __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.htm

[R] Applying function to multiple input vectors

2005-03-27 Thread Ronnen Levinson
Hi. Say I have a function f with two inputs, x and y f <- function(x,y) {something} that I wish to evaluate with two input vectors of length N X <- c(x1, x2, ..., xN) Y <- c(y1, y2, ..., yN) to obtain the length-N output vector c( f(x1,y1), f(x2,y2), ..., f(

Re: [R] Negative binomial GLMMs in R

2005-03-27 Thread Anders Nielsen
Dear List, I have tried the program (Linux version) supplied to fit the negative binomial mixed model. It seems to work really well and converge fast. Since this is apparently a model that is difficult to fit with what is presently in R, and more difficult to fit with other standard tools, it wo

Re: [R] "Fold" in R?

2005-03-27 Thread Gabor Grothendieck
Seung Jun cc.gatech.edu> writes: : : Fold in Mathematica (or reduce in Python) works as follows: : : Fold[f, x, {a, b, c}] := f[f[f[x,a],b],c] : : That is, f is a binary operator, x is the initial value, and the results : are cascaded along the list. I've found it useful for reducing lists

Re: [R] "Fold" in R?

2005-03-27 Thread Peter Dalgaard
Seung Jun <[EMAIL PROTECTED]> writes: > Fold in Mathematica (or reduce in Python) works as follows: > > Fold[f, x, {a, b, c}] := f[f[f[x,a],b],c] > > That is, f is a binary operator, x is the initial value, and the > results are cascaded along the list. I've found it useful for > reducing lists

[R] "Fold" in R?

2005-03-27 Thread Seung Jun
Fold in Mathematica (or reduce in Python) works as follows: Fold[f, x, {a, b, c}] := f[f[f[x,a],b],c] That is, f is a binary operator, x is the initial value, and the results are cascaded along the list. I've found it useful for reducing lists when I only have a function that accepts two argumen

[R] netcdf

2005-03-27 Thread Frank Aebly
Hi All, I'm very knew to R. I downloaded and am running it on my redhat so that I can use the clim.pact package. Everything is downloaded and installed correctly. When trying to read a netcdf file from the NCEP/NCAR reanalysis dataset using retrieve.nc I keep getting errors that the number o

Re: [R] Is there a diferent way to do this?

2005-03-27 Thread Uwe Ligges
Gilvan Justino wrote: Hi, I started creating a small class but I'm courious about how it is working. To create a instance of my class "Partri" I write this at Rgui: x <- new("Partri", name="Gilvan") and to change the slot "name" of this instance, I write: setName(x, newname="Justino") It is

Re: [R] Where can I found the package "ordinal" ?

2005-03-27 Thread Kjetil Brinchmann Halvorsen
Peter Dalgaard wrote: ¢é ¨ <[EMAIL PROTECTED]> writes: Hello,dear all: I want to install the package "ordinal",but I don't see the package listed under package sources. I try to search it by "google",then I found this: http://euridice.tue.nl/~plindsey/rlibs.html but the connect does not wor

[R] Time varying coefficients with Kalman

2005-03-27 Thread gordon dinetto
Dear R-users Is there any possibility to estimate a regression model with time varying intercept and slope of the form: r(t) = a(t) + b(t)*x(t) + eta(t) a(t+1) = a(t) + v(t) b(t+1) = b(t) + w(t) by utilising the Kalman routines in R. I have tried the KalmanLike in (ts) but it seems to be desi

Re: [R] Where can I found the package "ordinal" ?

2005-03-27 Thread Peter Dalgaard
¢é ¨ <[EMAIL PROTECTED]> writes: > Hello,dear all: > > > I want to install the package "ordinal",but I don't see the package listed > under package sources. > > I try to search it by "google",then I found this: > > http://euridice.tue.nl/~plindsey/rlibs.html > > but the connect does not wo

[R] RE: [Rd] F90

2005-03-27 Thread Gorjanc Gregor
Göran, thanks. Happy easter! -Original Message- From: Göran Broström [mailto:[EMAIL PROTECTED] Sent: ned 2005-03-27 07:38 To: Gorjanc Gregor Cc: r-help@stat.math.ethz.ch Subject: Re: [Rd] F90 On Sun, Mar 27, 2005 at 03:26:39AM +0200, Gorjanc Gregor wrote: > Hello! > > Has anyone succes