Re: [R] how to specify dev.print target by a variable?

2005-12-22 Thread Prof Brian Ripley
On Fri, 23 Dec 2005, Berwin A Turlach wrote: > G'day Leif, > >> "LK" == Leif Kirschenbaum <[EMAIL PROTECTED]> writes: > >LK> How do I do this such that I can specify FOO to be one of >LK> several choices? (GDD, PNG, postscript, etc.) If I make FOO a >LK> character variable, then "

Re: [R] (C programming problem on MacOS X)

2005-12-22 Thread Prof Brian Ripley
Please do INSTALL the package and test loading it before R CMD check. You will get better errror messages. This has been discussed on the appropriate R list (R-devel, not here), many times. Since you mention -lgslcblas and no BLAS, my guess is that your shared object has unsatisfied entry point

Re: [R] Reading in large file in pieces

2005-12-22 Thread Prof Brian Ripley
On Thu, 22 Dec 2005, Sean Davis wrote: > I have a large file (millions of lines) and would like to read it in pieces. > The file is logically separated into little modules, but these modules do > not have a common size, so I have to scan the file to know where they are. > They are independent, so

Re: [R] Reading in large file in pieces

2005-12-22 Thread Ales Ziberna
See ?scan or maybe ?readLines - Original Message - From: "Sean Davis" <[EMAIL PROTECTED]> To: "r-help" Sent: Friday, December 23, 2005 12:08 AM Subject: [R] Reading in large file in pieces I have a large file (millions of lines) and would like to read it in pieces. The file is logical

Re: [R] reading long matrix

2005-12-22 Thread Gabor Grothendieck
One correction. I had hard coded the last statement for testing with the data provided. Change it to this for generality: result <- array(nums, c(nr, nc, n), c(NULL, NULL, L[breaks])) On 12/22/05, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > One way to do this is to use read.fwf. I have b

Re: [R] reading long matrix

2005-12-22 Thread Gabor Grothendieck
One way to do this is to use read.fwf. I have borrowed Jim's use of scan and use a similar calculation to get the indexes of the breaks, breaks. We then determine the common number of rows and columns in each species. The second group of statements replaces all 9's with spaces so that upon parsi

Re: [R] how to specify dev.print target by a variable?

2005-12-22 Thread Berwin A Turlach
G'day Leif, > "LK" == Leif Kirschenbaum <[EMAIL PROTECTED]> writes: LK> How do I do this such that I can specify FOO to be one of LK> several choices? (GDD, PNG, postscript, etc.) If I make FOO a LK> character variable, then "dev.print" complains. Mmh, I am not sure what the comp

[R] how to specify dev.print target by a variable?

2005-12-22 Thread Leif Kirschenbaum
I want to do the following: DEVw=500 DEVh=350 fname="my_plot" dev.print(file=fname, device=FOO, width=DEVw, height=DEVh, bg="transparent") How do I do this such that I can specify FOO to be one of several choices? (GDD, PNG, postscript, etc.) If I make FOO a character variable, then "dev

Re: [R] convolution of the double exponential distribution

2005-12-22 Thread Duncan Murdoch
On 12/22/2005 7:56 PM, Bickel, David wrote: > Is there any R function that computes the convolution of the double > exponential distribution? > > If not, is there a good way to integrate ((q+x)^n)*exp(-2x) over x from > 0 to Inf for any value of q and for any positive integer n? I need to > perfor

[R] convolution of the double exponential distribution

2005-12-22 Thread Bickel, David
Is there any R function that computes the convolution of the double exponential distribution? If not, is there a good way to integrate ((q+x)^n)*exp(-2x) over x from 0 to Inf for any value of q and for any positive integer n? I need to perform the integration within a function with q and n as argu

[R] (no subject)

2005-12-22 Thread wei sun
Hi, I am new in writing R extension. I read the "Writing R Extensions", and search online but just cannot find the answer. I am trying to add c-code, which depend on GSL C library, into my R package. I am using Max OS-X 10.4.3, powerpc-apple-darwin8-gcc-4.0.1 I begin wtih package.skeleton,

[R] Reading in large file in pieces

2005-12-22 Thread Sean Davis
I have a large file (millions of lines) and would like to read it in pieces. The file is logically separated into little modules, but these modules do not have a common size, so I have to scan the file to know where they are. They are independent, so I don't have to read one at the end to interpret

[R] Testing a linear hypothesis after maximum likelihood

2005-12-22 Thread Peter Muhlberger
I'd like to be able to test linear hypotheses after setting up and running a model using optim or perhaps nlm. One hypothesis I need to test are that the average of several coefficients is less than zero, so I don't believe I can use the likelihood ratio test. I can't seem to find a provision any

Re: [R] reading long matrix

2005-12-22 Thread Liaw, Andy
Here's one possibility, if you know the number of species and the numbers of rows and columns before hand, and the dimension for all species are the same. readSpeciesMap <- function(fname, nspecies, nr, nc) { spcnames <- character(nspecies) spcdata <- array(0, c(nc, nr, nspecies)) ## o

Re: [R] reading long matrix

2005-12-22 Thread jim holtman
Here is a way of reading the data into a 'list'. You can convert the list to any array of the proper dimensions. > input <- scan('/tempxx.txt.r', what='') Read 21 items > input [1] "SPECIES1" "999001099" "900110109" "011101000" "901100101" "110100019" [7] "901110019" "SPECIES2" "99999" "9

Re: [R] how to put constraint in R?

2005-12-22 Thread Spencer Graves
What are you trying to do? Suppose, for example, that you have a categorical variable representing 3 different age groups, and you want to estimate a linear model. As long as R recognizes the variable as categorical (of class "factor" or "ordered factor", R handles this aut

Re: [R] Plot problems: xlim

2005-12-22 Thread Ben Bolker
Ronnie Babigumira gmail.com> writes: It sounds like you might want to break your axis. plotrix provides a function to draw the axis break, but you have to mess around with the data scaling and axis labels yourself. See RSiteSearch("axis break"); most of these discussions are about breaking

[R] reading long matrix

2005-12-22 Thread Colin Beale
Hi, I'm needing some help finding a function to read a large text file into an array in R. The data are essentially presence / absence / na data for many species and come as a grid with each species name (after two spaces) at the beginning of the matrix defining the map for that species. An exc

Re: [R] add factor to dataframe given ranges

2005-12-22 Thread Marc Schwartz (via MN)
On Thu, 2005-12-22 at 10:08 -0600, Marc Schwartz (via MN) wrote: > On Thu, 2005-12-22 at 16:58 +0100, Albert Vilella wrote: > > Hi all, > > > > I would like to factorize the entries in a dataframe given some > > groupings. E.g: > > > > mydf = data.frame( > > a = rnorm(100,10), > > b = rnorm(1

Re: [R] add factor to dataframe given ranges

2005-12-22 Thread Marc Schwartz (via MN)
On Thu, 2005-12-22 at 16:58 +0100, Albert Vilella wrote: > Hi all, > > I would like to factorize the entries in a dataframe given some > groupings. E.g: > > mydf = data.frame( > a = rnorm(100,10), > b = rnorm(100,10), > c = rgamma(100, 1, scale=1)) > > group = hist(mydf$c, breaks="FD") > g

Re: [R] boot problem

2005-12-22 Thread Angelo Canty
What are you trying to do? boot does the resampling for you so you should pass the statistic that you want calculated on the resamples. Read the helpfile regarding the format of the statistic. It should take two arguments, one of which is a vector of indices specifying the resample. On Tue,

Re: [R] from Colombia - help

2005-12-22 Thread Michael Dewey
At 13:50 20/12/05, andres felipe wrote: > Hi, my name is Andres Felipe Barrientos, I'm a student of Statistic and > don't speak in english. En mi trabajo de grado necesito implementar la > funcion smooth.spline y necesito saber con que tipo de spline trabaja > (b-splines o naturales). Since I

[R] add factor to dataframe given ranges

2005-12-22 Thread Albert Vilella
Hi all, I would like to factorize the entries in a dataframe given some groupings. E.g: mydf = data.frame( a = rnorm(100,10), b = rnorm(100,10), c = rgamma(100, 1, scale=1)) group = hist(mydf$c, breaks="FD") group$breaks The idea is to create a factor "mydf$d" with levels corresponding to

Re: [R] panel order in xyplot

2005-12-22 Thread Deepayan Sarkar
On 12/22/05, Antje Döring <[EMAIL PROTECTED]> wrote: > Hi all, > > > > I have a question concerning xyplot. My data is a data.frame looking like > that: > > > > In the first column I have numbers from 0 to 23 (hours of a day), the second > column contains the name of a weekday (Day as factor) and t

Re: [R] data frame

2005-12-22 Thread Sean Davis
On 12/22/05 9:11 AM, "Rhett Eckstein" <[EMAIL PROTECTED]> wrote: > Dear R users: > >> s4 <- seq(length=10, from=1, by=5) >> s<-data.frame(s4,s4,s4) > I would like to do some modification to s. > And I want the form like the following,if it is possible, how should I do? > The last column is the

Re: [R] data frame

2005-12-22 Thread jim holtman
Here is one way. You can change depending on what you want the offsets to be: > s4 <- seq(length=10, from=1, by=5) > s4 [1] 1 6 11 16 21 26 31 36 41 46 > f.x <- function(vec, n) c(rep(0,n), vec)[1:length(vec)] > f.x(s4,2) [1] 0 0 1 6 11 16 21 26 31 36 > df <- data.frame(s4=s4, s4.1=f.x(s4,

[R] bVar slot of lmer objects and standard errors

2005-12-22 Thread Ulrich Keller
Hello, I am looking for a way to obtain standard errors for emprirical Bayes estimates of a model fitted with lmer (like the ones plotted on page 14 of the document available at http://www.eric.ed.gov/ERICDocs/data/ericdocs2/content_storage_01/000b/80/2b/b3/94.pdf). Harold Doran mentioned

[R] data frame

2005-12-22 Thread Rhett Eckstein
Dear R users: > s4 <- seq(length=10, from=1, by=5) > s<-data.frame(s4,s4,s4) I would like to do some modification to s. And I want the form like the following,if it is possible, how should I do? The last column is the sum of previous three column. s4 s4.1 s4.2sum 1 11

Re: [R] Logistic regression to select genes and estimate cutoff point?

2005-12-22 Thread Frank E Harrell Jr
Lingsheng Dong wrote: > Hi, all, > I am new to R or even to statistics. Not sure if the question has a answer. > But I couldn't find a straight forward answer in the help mailing list. > I need use MicroArray data to select several diagnostic genes between Normal > samples and Tumor samples and

[R] panel order in xyplot

2005-12-22 Thread Antje Döring
Hi all, I have a question concerning xyplot. My data is a data.frame looking like that: In the first column I have numbers from 0 to 23 (hours of a day), the second column contains the name of a weekday (Day as factor) and the third column contains the number I am interested in. So as an

Re: [R] Install Rmpi on Fedora with mpich2 installed.

2005-12-22 Thread vittorio
I don't know Fedora but you should have installed the dev(-elopment) packages too (like mpich-dev or similar for instance). Usually under unixes those supplementary packages contain all the header files such as mpi.h needed to compile a C program. Vittorio Alle 20:45, martedì 20 dicembre 200

Re: [R] Plot problems: xlim

2005-12-22 Thread Jacques VESLOT
Please give an example of your data. set.seed(231) morp <- rnorm(20) range(morp) [1] -2.311664 1.650254 You can plot 2 histograms, one of them with the extreme value: par(mfrow=c(2,1)) hist(morp, breaks=10, freq=F) lines(density(morp)) par(mfrow=c(1,2)) hist(morp, breaks=10, freq=F) lines(dens

[R] Plot problems: xlim

2005-12-22 Thread Ronnie Babigumira
Hi, Still fresh in R, tried to figure this out, now on my second day running with no luck (and a pile of hair on my desk) so I have thrown in the towel and would like to ask for some help. Here is what I am trying to do. I am trying to plot a distribution, I have 99 points, bound in the range

Re: [R] strsplit with dataframes

2005-12-22 Thread Jacques VESLOT
try: cbind.data.frame(do.call("rbind", strsplit(as.character(yourdf$ID), "-")), yourdf$data) Henrik Andersson a écrit : >Hello fellow R people, > >I can not figure out a pretty way to use strplit with vectors > >Imagine that I got the following data from someone with ID's >representing severa

[R] strsplit with dataframes

2005-12-22 Thread Henrik Andersson
Hello fellow R people, I can not figure out a pretty way to use strplit with vectors Imagine that I got the following data from someone with ID's representing several factors ID data A1-B1-t10 A1-B1-t21 A1-B2-t15 A1-B2-t210 A1-B10-t1 0 A1-B10-t

Re: [R] No PNG support 2.2.1

2005-12-22 Thread Sylvain Brohée
I am effectively running R under Suse linux 9.2... However libpng is compiled and works! Thanks , Sylvain On Thursday 22 December 2005 12:02, Landini Massimiliano wrote: > On Thu, 22 Dec 2005 12:01:00 +0100, you wrote: > |=[:o) Hi everybody, > |=[:o) > |=[:o) When trying to save my plots as P

Re: [R] program work

2005-12-22 Thread Ido M. Tamir
> Does R support and read logs file? R can read log files if they are text files. ?read.table hth ido __ 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/postin

[R] No PNG support 2.2.1

2005-12-22 Thread Sylvain Brohée
Hi everybody, When trying to save my plots as PNG images, I get this error message? Can anybody give me a solution? > png("my_plot.png") Error in X11(paste("png::", filename, sep = ""), width, height, pointsize, : unable to start device PNG In addition: Warning message: no png support in

Re: [R] Logistic regression to select genes and estimate cutoff point?

2005-12-22 Thread Ido M. Tamir
You could take a look at www.bioconductor.org limma would be a good starting point. hth ido __ 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.ht

Re: [R] Huber location estimate

2005-12-22 Thread Murray Jorgensen
D'oh! Apologies for wasting everybody's time! Murray Martin Maechler wrote: >>"Murray" == Murray Jorgensen <[EMAIL PROTECTED]> >>on Thu, 22 Dec 2005 22:13:45 +1300 writes: > > > Murray> Prof Brian Ripley wrote: > >> On Thu, 22 Dec 2005, Murray Jorgensen wrote: > >> >

Re: [R] Problems with passing ... to a function

2005-12-22 Thread Ales Ziberna
Thanks to the helpful R-hlep-er, the problem has been solved. 'm' was matching 'maxiter'. Thanks again, Ales Ziberna - Original Message - From: "Ales Ziberna" <[EMAIL PROTECTED]> To: "R-help" Sent: Thursday, December 22, 2005 9:25 AM Subject: Problems with passing ... to a function De

Re: [R] Huber location estimate

2005-12-22 Thread Martin Maechler
> "Murray" == Murray Jorgensen <[EMAIL PROTECTED]> > on Thu, 22 Dec 2005 22:13:45 +1300 writes: Murray> Prof Brian Ripley wrote: >> On Thu, 22 Dec 2005, Murray Jorgensen wrote: >> >>> We have a choice when calculating the Huber location estimate: >>> > set.seed(221

Re: [R] bivariate kernel density estimates at point locations (rather than at grid locations)

2005-12-22 Thread Adelchi Azzalini
On Wed, 21 Dec 2005 12:21:54 -0500, Strickland, Matthew wrote: SM> Hello Dr. Adelchi Azzalini, SM> Dr. Strickland, your message was directed to the whole r-help list with no CC to myself, and sometimes I do not have the chance to browse the r-help list for weeks.. SM> Thank you for your qui

Re: [R] Hiding a function from ls()

2005-12-22 Thread Martin Maechler
> "Erich" == Erich Neuwirth <[EMAIL PROTECTED]> > on Thu, 22 Dec 2005 10:06:38 +0100 writes: Erich> I need to define a small helper function Erich> which should not be listed by ls(). Erich> What is the best and cleanest way of achieving this? "it depends": 1) if it's pa

Re: [R] Huber location estimate

2005-12-22 Thread Murray Jorgensen
Prof Brian Ripley wrote: > On Thu, 22 Dec 2005, Murray Jorgensen wrote: > >> We have a choice when calculating the Huber location estimate: >> > set.seed(221205) >> > y <- 7 + 3*rt(30,1) > > > That's Cauchy, BTW, a very extreme case. Sure, the sort of situation where one might want a robust e

[R] Hiding a function from ls()

2005-12-22 Thread Erich Neuwirth
I need to define a small helper function which should not be listed by ls(). What is the best and cleanest way of achieving this? -- Erich Neuwirth, University of Vienna Faculty of Computer Science Computer Supported Didactics Working Group Visit our SunSITE at http://sunsite.univie.ac.at Phone:

[R] program work

2005-12-22 Thread Enrico Pavan - TSW
Hi i'm enrico pavan and I work for TSW in Treviso, Italy and also I study Statistic at Treviso's University. TSW is an agency that work in search engine marketing and with R we would like to make some statistic about the site web work using logs file. Is it possible with R? Does R support and read

Re: [R] Huber location estimate

2005-12-22 Thread Prof Brian Ripley
On Thu, 22 Dec 2005, Murray Jorgensen wrote: > We have a choice when calculating the Huber location estimate: > > set.seed(221205) > > y <- 7 + 3*rt(30,1) That's Cauchy, BTW, a very extreme case. > > library(MASS) > > huber(y)$mu > [1] 5.9117 > > coefficients(rlm(y~1)) > (Intercept) > 5.920

[R] Problems with passing ... to a function

2005-12-22 Thread Ales Ziberna
Dear useRs! I have written a function that should pass argument "m" to the next function, however it does not! Please have a look at the function below that shows a problem and tell me what I am missing. As you can see, the "blocks" argument is passed corectly, while "m" is not. Best, Ale