[R] extracting the t-statistic: just the numbers, please

2004-07-29 Thread Michael Rennie
Hi, there I am quite sure there is an easy answer to this, but I am unsure how to gather a bunch of t-statistics in an organized format. I am trying to generate a list of t-statistics for a randomization routine. If I try to collect a bunch of t-statistics from a run, this is what happens:

Re: [R] where is average shifted histogram?

2004-07-29 Thread Peter Dalgaard
Eckart Bindewald [EMAIL PROTECTED] writes: Hello! In the book Modern Applied Statistics with S (4th ed), section 5.6 the concept of the average shifted histogram or ASH is mentionend. Also it is mentioned in the same section The code used is in the scripts for this chapter (from figure

Re: [R] RE: [S] tree function in R language

2004-07-29 Thread Uwe Ligges
Marc Schwartz wrote: Shouldn't the URL be (for R 1.8.1 on Windows): http://cran.r-project.org/bin/windows/contrib/1.8/PACKAGES There is no URL as listed below, which is presumably why the error message. The URL geven below indicates that the code in the base package is R = 1.6.x. These outdated

Re: [R] extracting the t-statistic: just the numbers, please

2004-07-29 Thread Christian Schulz
data(sleep) t.test(extra ~ group, data = sleep)$statistic[1] t -1.860813 t.test(extra ~ group, data = sleep)$statistic[[1]] [1] -1.860813 hope this helps, christian Am Donnerstag, 29. Juli 2004 07:57 schrieb Michael Rennie: Hi, there I am quite sure there is an

Re: [R] extracting the t-statistic: just the numbers, please

2004-07-29 Thread Spencer Graves
The function as.vector will remove the names: t.test(1:9)$statistic t 5.477226 as.vector(t.test(1:9)$statistic) [1] 5.477226 Is this what you want? spencer graves Michael Rennie wrote: Hi, there I am quite sure there is an easy answer to this, but I am unsure how to gather a

Re: [R] extracting the t-statistic: just the numbers, please

2004-07-29 Thread Peter Dalgaard
Michael Rennie [EMAIL PROTECTED] writes: simt t t t t t t t 0.3474150 0.1542973 -0.4044992 1.243 -0.2933944 -0.5809257 0.7799080 t t t -1.4132713 1.2048335 -0.6596936 Which gives me a

Re: [R] attach files on start up

2004-07-29 Thread Uwe Ligges
Kathryn Jones wrote: Hi, I was wondering if anyone could please tell me if there's a way to attach the same files each time R starts up? See ?Startup Uwe Ligges Thanks! Kathryn Jones __ [EMAIL PROTECTED] mailing list

Re: [R] where is average shifted histogram?

2004-07-29 Thread Martin Maechler
PD == Peter Dalgaard [EMAIL PROTECTED] on 29 Jul 2004 08:02:54 +0200 writes: PD Eckart Bindewald [EMAIL PROTECTED] writes: Hello! In the book Modern Applied Statistics with S (4th ed), section 5.6 the concept of the average shifted histogram or ASH is mentionend. Also it

Re: [R] Transparent backgrounds in png files

2004-07-29 Thread Prof Brian Ripley
The bitmap() device does not support transparency. The png() device does. On Thu, 29 Jul 2004, Patrick Connolly wrote: The result I'm aiming to achieve is a bitmap that can be imported into a PowerPoint file that shows what's behind the lines of the plot. There's a way in PowerPoint that

[R] readline or not .. {was Parallel Functions on AIX}

2004-07-29 Thread Martin Maechler
AndyL == Liaw, Andy [EMAIL PROTECTED] on Thu, 29 Jul 2004 00:02:26 -0400 writes: From: Brian Ripley The first thing to ascertain is that R will actually build on such a machine -- there have been a lot of reports of failure on AIX, and no recent reports of

Re: [R] where is average shifted histogram?

2004-07-29 Thread Prof Brian Ripley
On 29 Jul 2004, Peter Dalgaard wrote: Eckart Bindewald [EMAIL PROTECTED] writes: Hello! In the book Modern Applied Statistics with S (4th ed), section 5.6 the concept of the average shifted histogram or ASH is mentionend. Also it is mentioned in the same section The code used is in

Re: [R] where is average shifted histogram?

2004-07-29 Thread Peter Dalgaard
Martin Maechler [EMAIL PROTECTED] writes: PD file.show(file.path(.path.package(MASS),scripts,ch05.R)) eehm, as the . in .path.package() suggests, there should be a more canonical way --- and there is, using system.file() : dir(system.file(scripts, package = MASS)) Drats! Forgot

RE: [R] How to add an object to an RData file ?

2004-07-29 Thread Ernesto Jardim
On Wed, 2004-07-28 at 20:07, Thomas Lumley wrote: On Wed, 28 Jul 2004, Liaw, Andy wrote: I guess it would be nice if save() has an `append' option... It would still have to read it in and out again, and then we would have all the issues about multiple objects with the same name.

[R] 2 questions : format and hh:mm

2004-07-29 Thread Bruno Cutayar
Dear R-users, i have two questions : 1- first of all, i wish to know the way to obtain a serie with a format like 00 : ( 01,02,03,04) or like postal code (01100,0). for instance, i do : format(strptime(as.character(c(1:4)),%H),%H) but it sounds complicate and not really efficient!

RE: [R] 2 questions : format and hh:mm

2004-07-29 Thread Jacques VESLOT
in order to generate your series, maybe : format(seq(ISOdate(2003,1,1, 0, 0, 0, tz=), by=min, length=1440),format=%H:%M) jacques -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] la part de Bruno Cutayar Envoyé : jeudi 29 juillet 2004 13:43 À : [EMAIL PROTECTED] Objet

Re: [R] 2 questions : format and hh:mm

2004-07-29 Thread Prof Brian Ripley
On Thu, 29 Jul 2004, Bruno Cutayar wrote: Dear R-users, i have two questions : 1- first of all, i wish to know the way to obtain a serie with a format like 00 : ( 01,02,03,04) or like postal code (01100,0). for instance, i do : format(strptime(as.character(c(1:4)),%H),%H)

[R] proximity covariate to model dependence in cox model (question from Vito Muggeo)

2004-07-29 Thread Mayeul KAUFFMANN
(I received a messsage from Vito Muggeo [who sometimes posts here] about my previous posts here. Thus, it might be of interest here) dear Mayeul, I read your post on R -list about survival analysis with multiple (two if I am not right) events per subject. Sometimes subjetcs have even 3

[R] Lattice graphics: adding lines to a plot

2004-07-29 Thread Matthew Walker
I am trying to use the Lattice package to produce the same result as I can with the base graphics. With base graphics I can type: x - 1:100 y - x+rnorm(length(x)) g - lm( y ~ x ) model.y - g$coef[1]+g$coef[2]*x plot(x,y) # a plot of the data lines( x, model.y ) # a plot of the model,

[R] Debug S4 Methods

2004-07-29 Thread Gunnar Wrobel
Dear list, is there any way to debug the S4 methods using the debug() function in R1.9.1? I am able to use browser() inside a S4 method but I wondered if there is a way to debug the function without recompiling the package. Thanks! Gunnar -- -- Dr.

Re: [R] Lattice graphics: adding lines to a plot

2004-07-29 Thread Chuck Cleland
How about this? library(lattice) xyplot(y ~ x, panel = function(x, y, ...){ panel.xyplot(x, y, ...) panel.lmline(x, y, type=l) }) Matthew Walker wrote: I am trying to use the Lattice package to produce the

Re: [R] attach files on start up

2004-07-29 Thread Roger D. Peng
You can put the attach() statements (and any other startup code) in the .Rprofile file in your working directory. -roger Kathryn Jones wrote: Hi, I was wondering if anyone could please tell me if there's a way to attach the same files each time R starts up? Thanks! Kathryn Jones

RE: [R] using Rterm under cygwin, no possiblity to delete characters

2004-07-29 Thread Dewez Thomas
Dear Brian, You have to call Rterm.exe *from a command shell*. `cygwin' is not a command shell, but a collection of tools that provides several such. So we can only guess at what you are using. Rterms runs satisfactorily in many shells (I use tcsh, others use Cygwin bash ...).

[R] Help w/ matrix calc

2004-07-29 Thread eesteves
Dear All, Help is needed! I have a matrix with frequencies of fish larvae per length class (var. sl) and age-group (var. median.no) obtained with k-table(cut(sl,(5:22)),median.no) k[2:5,1:5] #to ilustrate k 4 5 6 7 (6,7] 3 1 0 0 (7,8] 3 0 1 0 (8,9] 3 4 3 5 (9,10] 3

Re: [R] Help w/ matrix calc

2004-07-29 Thread Adaikalavan Ramasamy
m - matrix( 1:12, nc=3 ) m [,1] [,2] [,3] [1,]159 [2,]26 10 [3,]37 11 [4,]48 12 apply(m, 1, mean) # row means [1] 5 6 7 8 apply(m, 2, mean) # column means [1] 2.5 6.5 10.5 Replace 'mean' with 'var' if you want variances instead. On Thu,

Re: [R] Lattice graphics: adding lines to a plot

2004-07-29 Thread Deepayan Sarkar
On Thursday 29 July 2004 06:37, Chuck Cleland wrote: How about this? library(lattice) xyplot(y ~ x, panel = function(x, y, ...){ panel.xyplot(x, y, ...) panel.lmline(x, y, type=l) }) That should

Re: [R] Help w/ matrix calc

2004-07-29 Thread Ernesto Jardim
On Thu, 2004-07-29 at 12:38, [EMAIL PROTECTED] wrote: Dear All, Help is needed! I have a matrix with frequencies of fish larvae per length class (var. sl) and age-group (var. median.no) obtained with k-table(cut(sl,(5:22)),median.no) k[2:5,1:5] #to ilustrate k 4 5 6 7

Re: [R] 2 questions : format and hh:mm

2004-07-29 Thread Gabor Grothendieck
Bruno Cutayar bcutayar at lfdj.com writes: 2- i search to generate a serie of hours and minutes on 24h : 00:00 , 00:01, 00:02, 00:03, ...,..., 23:59 Using the chron package, if min is sequence of chron times, e.g. require(chron) m - 24 * 60 # minutes in a day min -

[R] jpeg() on UNIX

2004-07-29 Thread David . R . Wille
Dear R users, I am currently having difficulty migrating a web application from XP to a SGI UNIX since when I run R in the background (i.e. in a process started from the web server) the graphics device jpeg() requires, but cannot connect to, X11. I could go via bitmap() and PS but wondered if

Re: [R] jpeg() on UNIX

2004-07-29 Thread Thomas Lumley
On Thu, 29 Jul 2004 [EMAIL PROTECTED] wrote: Dear R users, I am currently having difficulty migrating a web application from XP to a SGI UNIX since when I run R in the background (i.e. in a process started from the web server) the graphics device jpeg() requires, but cannot connect to, X11.

Re: [R] Help w/ matrix calc

2004-07-29 Thread James MacDonald
For row or column means with a matrix of any size, you will be much better served by using rowMeans() colMeans() Best, Jim James W. MacDonald Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623

[R] Kudos to the R support team

2004-07-29 Thread Michael Rennie
Hi there, I just wanted to take a quick second to thank everyone who maintains this service- just in case you don't hear it enough, there are a plethora of people who rely on this service (as evidenced by the help archives), and even if they don't say it, are greatly thankful for what you do

Re: [R] Kudos to the R support team

2004-07-29 Thread Berton Gunter
May I add to Michael's comment: 1) There is no formal service; the R Core team members and other regular contributors who do yeo-persons' service do so entirely voluntarily and at their individual discretion.. 2) The whole cultural/sociological phenomenon of R strikes me as remarkable. Granting

[R] Question on getting a data from dataframe

2004-07-29 Thread Stephen Opiyo
I am working with amino acid sequences changing each letter to numbers.I have a data from acf transformation called Zm as shown below. I would like to get Indices D1 to D10 and then create F1 to F10 as indicated below. Is there anyway I can do that in R without typing each of them one by

[R] R and the Journal of Statistical Software

2004-07-29 Thread Jan de Leeuw
http://www.jstatsoft.org JSS is now up to Volume 11. This year is the first multi-volume year, with three volumes so far. JSS now has its own ISSN number and its own CODEC. A JSS LaTeX format will become available soon. JSS is aiming to become an (electronic) ASA journal, independent of JCGS,

[R] Comparing correlated (paired) ROC curves (sensitivities).

2004-07-29 Thread Wolski
Hi! I am looking for functions which I can use to compare correlated ROC curves, or even better correlated (paired - obtained from the same data with different measures) sensitivities given FP rates. Eryk Dipl. bio-chem. Eryk Witold Wolski@MPI-Moleculare Genetic Ihnestrasse

[R] fitting gaussian mixtures

2004-07-29 Thread Xiao-Jun Ma
Hi R-helpers, I'm trying to model a univariate as a bi-modal normal mixtures. I need to estimate the parameters of each gaussian (mean and sd) and their weights. What's the best way to do this in R? Thanks, Xiao-Jun __ [EMAIL PROTECTED] mailing

Re: [R] fitting gaussian mixtures

2004-07-29 Thread Sundar Dorai-Raj
Xiao-Jun Ma wrote: Hi R-helpers, I'm trying to model a univariate as a bi-modal normal mixtures. I need to estimate the parameters of each gaussian (mean and sd) and their weights. What's the best way to do this in R? Thanks, Xiao-Jun __ [EMAIL

Re: [R] MLE, precision

2004-07-29 Thread boshao zhang
Dear Spencer: My problem get solved by using Matlab. It runs pretty quick(less than 5 seconds)and the result is stable with respect to the initial values. I was amaized. Here my t and are as long as 2390, sum the functions over t and d, the function becomes daunting. But I still like to try

[R] Stumped with subsetting

2004-07-29 Thread Peter Wilkinson
This seems like such a trivial thing to do: given a data.frame DF and variables w,v, x,y,z I can do DF[x] or DF[c(x,y)] if I create a vector, mylist = c(x,y) then I do DF[mylist] I am not getting x and y, I get something else. what is the correct way to subset a data.frame by columns using a

Re: [R] Stumped with subsetting

2004-07-29 Thread Sundar Dorai-Raj
Peter Wilkinson wrote: This seems like such a trivial thing to do: given a data.frame DF and variables w,v, x,y,z I can do DF[x] or DF[c(x,y)] if I create a vector, mylist = c(x,y) then I do DF[mylist] I am not getting x and y, I get something else. what is the correct way to subset a data.frame

Re: [R] Stumped with subsetting

2004-07-29 Thread Tony Plate
Seems to work fine for me if I understand correctly what you're trying to do (there are some typos in your message, which may mean I'm not understanding): data - data.frame(x=1:3,y=4:6,z=7:9) data[c(x,y)] x y 1 1 4 2 2 5 3 3 6 mylist - c(x,y) data[mylist] x y 1 1 4 2 2 5 3 3 6

Re: [R] Stumped with subsetting

2004-07-29 Thread Sundar Dorai-Raj
Sundar Dorai-Raj wrote: Peter Wilkinson wrote: This seems like such a trivial thing to do: given a data.frame DF and variables w,v, x,y,z I can do DF[x] or DF[c(x,y)] if I create a vector, mylist = c(x,y) then I do DF[mylist] I am not getting x and y, I get something else. what is the correct

Re: [R] Stumped with subsetting

2004-07-29 Thread Peter Wilkinson
Hi there, thanks for the reply. I was expecting what Tony posted. By the way I got the format for my question out of Introduction to R. So I expected it to work as in the text, but it turns out my list somehow was not a vector: list[1] [1] PERH0125 44 Levels: PERH0015 PERH0019 PERH0023

[R] Any orthnormal matrix can keep the curve's shape and size unchnaged?

2004-07-29 Thread Fred
Dear R users, I want to know, given a curve f in d-dimensional space, It is possible to keep the curve’s shape and size unchanged by an arbitrary dxd orthnormal matrix A? That is, the new curve g = A*f is still the same shape and size as f? Thanks for your advices and answers. Fred

Re: [R] MLE, precision

2004-07-29 Thread Spencer Graves
1. Don't use t as a variable name. It is the name of the matrix transpose function. In most but not all contexts, R is smart enough to tell whether you want the system function or the local object. 2. I can't tell from your question what you want. PLEASE do read the posting

[R] cross-compile R darwin2win, almost there

2004-07-29 Thread Simon Urbanek
I'm trying to cross-compile R on a Mac OS X box to target Win32. It works quite well, everything works, except for one fortran file ppr.f in the stats package: -- Making package stats adding build stamp to DESCRIPTION installing NAMESPACE file and metadata making DLL

[R] perl script in exec/

2004-07-29 Thread Jason Sinnwell
Dear useRs- I am developing a package that uses output from stand-alone unix software programs. I use multiple perl scripts to process the output and make it ready for reading into R. I would like to keep the perl scripts in the designated place for such files, exec/, but I can't find how a

[R] Editing Strings in R

2004-07-29 Thread Bulutoglu Dursun A Civ AFIT/ENC
I was wondering if there is a way of editting strings in R. I have a set of strings and each set is a row of numbers and paranthesis. For example the first row is: (0 2)(3 4)(7 9)(5 9)(1 5) and I have a thousand or so such rows. I was wondering how I could get the

[R] unwanted as.integer

2004-07-29 Thread Jack Tanner
a - sqlQuery(irrdb, select count(field) from mytable where field = 1) print(a) count(field) 18 paste(a) [1] as.integer(8) Why the as.integer() representation? I later pass the result into this write.html.table(), and what I get is rows of as.integer()... when all I want is the

Re: [R] unwanted as.integer

2004-07-29 Thread Sundar Dorai-Raj
Jack Tanner wrote: a - sqlQuery(irrdb, select count(field) from mytable where field = 1) print(a) count(field) 18 paste(a) [1] as.integer(8) Why the as.integer() representation? I later pass the result into this write.html.table(), and what I get is rows of as.integer()...

Re: [R] Any orthnormal matrix can keep the curve's shape and size unchnaged?

2004-07-29 Thread Giovanni Petris
Any orthogonal transformation preserves angles between vectors and their length. Therefore, I guess shape and size are preserved -- of course a precise answer depends on how you define these two features of a curve. I am missing what has all this to do with R, though. Giovanni Date: Thu, 29

Re: [R] Editing Strings in R

2004-07-29 Thread Marc Schwartz
On Thu, 2004-07-29 at 15:56, Bulutoglu Dursun A Civ AFIT/ENC wrote: I was wondering if there is a way of editting strings in R. I have a set of strings and each set is a row of numbers and paranthesis. For example the first row is: (0 2)(3 4)(7 9)(5 9)(1 5) and I have

Re: [R] Gaussian frailty leads to segmentation fault

2004-07-29 Thread Thomas Lumley
The crash happens when the penalty on the frailty term gets so small that the model is singular and there are no degrees of freedom left for the treatment effect. The attached revision for survival/R/coxph.wtest.s prevents the crash, but the model is still singular. If you use method=aic

[R] expression + paste + arguments + ...

2004-07-29 Thread ivo_welch-rstat8783
dear R wizards: I would like to write a function that roughly places the equivalent of the following latex text into the current plot: \newcommand{ \placesigma }[4]{ \put(\#1,\#2){ \sigma_{A , #3} = #4 } I cannot figure out how to do this. I know I have to use a function that uses

Re: [R] Transparent backgrounds in png files

2004-07-29 Thread Patrick Connolly
On Thu, 29-Jul-2004 at 08:38AM +0100, Prof Brian Ripley wrote: | The bitmap() device does not support transparency. The png() device does. Unfortunately, though png() does a fine job at a transparent background, it's rather lumpy even on a screen. | | On Thu, 29 Jul 2004, Patrick Connolly

[R] Do I need a special package to call a fortran program within R?

2004-07-29 Thread Chaochao Gao
Hi, there, I tried to use system (command.txt) to run a executive fortran code (like a.out) within R. But the screen shows that impossible to run this command. This is the first time I use R, so I was wondering if there is a special package to run fortran program. Any help will be highly

[R] getting values out of functions

2004-07-29 Thread Kathryn Jones
Hi there, Just wondering if there's a way to get a value you've assigned within a function, out of the function? For example, function () { testing -read.table(...,header=TRUE) } I want to be able to use 'testing' outside of the function, so be able to call ls() and testing be

Re: [R] expression + paste + arguments + ...

2004-07-29 Thread Spencer Graves
I don't know latex, but have you looked at ?plotmath, including 'demo(plotmath)', the examples in the documentation, and an R site search suggested in the posting guide (http://www.R-project.org/posting-guide.html)? What you want is probably fairly easy, once you parse the plotmath

RE: [R] getting values out of functions

2004-07-29 Thread Liaw, Andy
From: Kathryn Jones Hi there, Just wondering if there's a way to get a value you've assigned within a function, out of the function? For example, function () { testing -read.table(...,header=TRUE) } I want to be able to use 'testing' outside of the function, so be able

Re: [R] getting values out of functions

2004-07-29 Thread Spencer Graves
Have you looked at writing your own functions in An Introduction to R, downloadable from www.r-project.org - Documentation: Manuals? If you want more than one object, you can return a list with all the objects you want as components; see lists and data frames in the same manual.

Re: [R] getting values out of functions

2004-07-29 Thread Roger D. Peng
You can use assign(), but why do you want to do this? Also, a function always returns the last expression in the function body. Or you can use return(). -roger Kathryn Jones wrote: Hi there, Just wondering if there's a way to get a value you've assigned within a function, out of the

Re: [R] Any orthnormal matrix can keep the curve's shape and size unchnaged?

2004-07-29 Thread Spencer Graves
How do you define size and shape? The answer is probably yes. However, if you have an essentially 2-d circle embedded in a 3-d space, and size and shape are defined in terms of a 2-d projection, this circle could be rotated into an ellipse in any orientation and even to a line. Also, if f is

Re: [R] Editing Strings in R

2004-07-29 Thread Gabor Grothendieck
Bulutoglu Dursun A Civ AFIT/ENC Dursun.Bulutoglu at afit.edu writes: I was wondering if there is a way of editting strings in R. I have a set of strings and each set is a row of numbers and paranthesis. For example the first row is: (0 2)(3 4)(7 9)(5 9)(1 5) and I

Re: [R] Stumped with subsetting

2004-07-29 Thread Gabor Grothendieck
Peter Wilkinson pwilkinson at videotron.ca writes: : : Hi there, : : thanks for the reply. I was expecting what Tony posted. By the way I got : the format for my question out of Introduction to R. So I expected it to : work as in the text, but it turns out : : my list somehow was not a

Re: [R] Editing Strings in R

2004-07-29 Thread Marc Schwartz
On Thu, 2004-07-29 at 21:08, Gabor Grothendieck wrote: Bulutoglu Dursun A Civ AFIT/ENC Dursun.Bulutoglu at afit.edu writes: I was wondering if there is a way of editting strings in R. I have a set of strings and each set is a row of numbers and paranthesis. For example the

Re: [R] Editing Strings in R

2004-07-29 Thread Gabor Grothendieck
Marc Schwartz MSchwartz at MedAnalytics.com writes: On Thu, 2004-07-29 at 21:08, Gabor Grothendieck wrote: Bulutoglu Dursun A Civ AFIT/ENC Dursun.Bulutoglu at afit.edu writes: I was wondering if there is a way of editting strings in R. I have a set of strings and each set is a

Re: [R] Transparent backgrounds in png files

2004-07-29 Thread Marc Schwartz
On Thu, 2004-07-29 at 19:24, Patrick Connolly wrote: On Thu, 29-Jul-2004 at 08:38AM +0100, Prof Brian Ripley wrote: | The bitmap() device does not support transparency. The png() device does. Unfortunately, though png() does a fine job at a transparent background, it's rather lumpy even

[R] Scatter plot matrix over several pages

2004-07-29 Thread John Field
Hello R-helpers, I'm plotting a scatter plot matrix, but have more variables to consider than will legibly fit on one page. I'd appreciate some help on how I can persuade pairs or splom to plot the full matrix of plots over several pages. With thanks, John Field