[R] need help

2008-02-13 Thread Zakaria, Roslinazairimah - zakry001
Hi, Anybody using tweedie.profile function to determine profile loglikelihood value? Thank you for your attention. Roslinazairimah Zakaria PhD Candidate School of Maths & Stats University of South Australia Mawson Lakes, SA 5095. Ph: 83025296 [[alternative HTML version delete

Re: [R] passing username and password to source()

2008-02-13 Thread Dieter Menne
[Ricardo Rodriguez] Your XEN ICT Team xen.net> writes: > But considering I am just newbie, could you point me to any example to > get this working? Thanks! > I was thinking of something like this (note: you must store PassEnv2.r on disk as a file). # File PassEnv.r Sys.setenv(PASSW="mypass"

Re: [R] summary statistics

2008-02-13 Thread Petr PIKAL
Hi one of the good starting points is Paul Johnsons StatsRus (the first hit in Google and I believe it is in Rwiki too). It helped me when I started with R about 10 years ago. For me usually the best way to arrange data is in "database form". It means each column is a variable (numerical, cate

Re: [R] non-interactive connection to SQL Server

2008-02-13 Thread Prof Brian Ripley
On Wed, 13 Feb 2008, Moshe Olshansky wrote: > Hi everyone, > > I am afraid that I have already asked this question in > the past (or at least I knew an answer to it) but I am > unable to do it now. > I have an SQL Server data base. I used the GUI > interface of odbcDriverConnect to create a .dsn f

Re: [R] Installation of R on UNIX - Sparc Solaris v8 [SEC=UNCLASSIFIED]

2008-02-13 Thread Prof Brian Ripley
On Thu, 14 Feb 2008, [EMAIL PROTECTED] wrote: > Dear Prof Ripley and Don, > > Thank you all for your kind reply. > > The UNIX system we have is Sparc Solaris v8 (a 64bit version). The > Precompiled binary distributions of the base system and contributed packages > are only available for Linux, Mac

Re: [R] Installation of R on UNIX - Sparc Solaris v8 [SEC=UNCLASSIFIED]

2008-02-13 Thread Jin.Li
Dear Prof Ripley and Don, Thank you all for your kind reply. The UNIX system we have is Sparc Solaris v8 (a 64bit version). The Precompiled binary distributions of the base system and contributed packages are only available for Linux, MacOS X and Windows. The only thing available for UNIX seems S

Re: [R] RGTK2 and glade on Windows - GUI newbie

2008-02-13 Thread Felix Andrews
I just discovered a good introduction to the RGtk2 package: RShowDoc("overview2", package="RGtk2") I have been using RGtk2 for over a year without knowing about that, and struggling with the API documentation, so can I suggest that it be mentioned somewhere prominent? i.e. put it on the project we

[R] Package for Multiple Additive Regression Trees

2008-02-13 Thread Christopher Schwalm
Hello List, I've been unsuccessful in tracking down a package that does MART. J Friedman's website has a page that mentions an R implementation but the links lead nowhere. There is also a nice walkthru/vignette pdf on his site. But I can not find this package anywhere. Perhaps it's commercial?

[R] non-interactive connection to SQL Server

2008-02-13 Thread Moshe Olshansky
Hi everyone, I am afraid that I have already asked this question in the past (or at least I knew an answer to it) but I am unable to do it now. I have an SQL Server data base. I used the GUI interface of odbcDriverConnect to create a .dsn file for this data base and every time I want to connect I

Re: [R] Creating a data.frame

2008-02-13 Thread Moshe Olshansky
Just make d <- data.frame(x,y,z). cbind forces x,y and z to be of the same type. --- Joe Trubisz <[EMAIL PROTECTED]> wrote: > OK...newbie question here. > Either I'm reading the docs wrong, or I'm totally > confused. > > Given the following: > > x<-c("aaa","bbb","ccc") > y<-rep(0,3) > z<-rep(0

Re: [R] compiling 2.6.2 using icc

2008-02-13 Thread Denham Robert
I thought the problem was that I had tried to use a --with-blas argument as an option to the configure script like: --with-blas="-L/opt/freeware/atlas/atlas-3.7.37/lib/ -lf77blas -lpthread -latlas" since I had built R with gcc like this in the past. But it still doesn't seem to compile the package

Re: [R] Principal component analysis PCA

2008-02-13 Thread Wang, Zhaoming (NIH/NCI) [C]
Try EIGENSTRAT http://www.nature.com/ng/journal/v38/n8/abs/ng1847.html or use a subset of SNPs. Zhaoming -Original Message- From: SNN [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 13, 2008 9:14 PM To: r-help@r-project.org Subject: [R] Principal component analysis PCA Hi, I

[R] Principal component analysis PCA

2008-02-13 Thread SNN
Hi, I am trying to run PCA on a set of data with dimension 115*300,000. The columns represnt the snps and the row represent the individuals. so this is what i did. #load the data code<-read.table("code.txt", sep='\t', header=F, nrows=30) # do PCA # pr<-prcomp(code, retx=T, center=T) I a

[R] Bayesian function in R

2008-02-13 Thread shweta
Hi all, I was looking for a Bayesian function in R which can take input as a matrix (containing gene expression values) and giving the output as a pair of genes which are related. Precisely, giving output as a pair of genes (A and B) and whether A depends on B or vice versa. Please let me know

Re: [R] use of poly()

2008-02-13 Thread Dylan Beaudette
On Wednesday 13 February 2008, [EMAIL PROTECTED] wrote: > You ask > > When using continuous data in both Y and X, does the > difference between "raw" and "orthagonal" polynomials > have any practical meaning? > > Yes, indeed it does, even if X is not 'continuous'. There are (at >

Re: [R] apply on large arrays

2008-02-13 Thread Bill.Venables
Hmm. I think this could be faster still: tab1 <- with(pisa1, table(CNT,GENDER,ISCOF,ISCOM)) tab3 <- rowSums(tab1 == 1) but check it... Bill Venables CSIRO Laboratories PO Box 120, Cleveland, 4163 AUSTRALIA Office Phone (email preferred): +61 7 3826 7251 Fax (if absolutely necess

[R] help in simplyfiying programme

2008-02-13 Thread raymond chiruka
my program given below can some one make it presentable. I trying to simulate survival data and calculate the power. I think i could have done better. s=10 number=0 count1=0;count2=0;count3=0;count4=0;count5=0;count6=0;count7=0;count8=0; count9=0; count11=0;count22=0;count33=0;cou

Re: [R] apply on large arrays

2008-02-13 Thread Bill.Venables
Your code is tab1 <- with(pisa1, table(CNT,GENDER,ISCOF,ISCOM)) tab2 <- apply(tab1, 1:4, function(x) ifelse(sum(x) == 1, 1, 0)) tab3 <- apply(tab2, 1, sum) As far as I can see, step 2, (the problematic one), merely replaces any entries in tab1 tha

[R] apply on large arrays

2008-02-13 Thread Erich Neuwirth
I have a big contingency table, approximately of size 60*2*500*500, and I need to count the number of cells containing a count of 1 for each of the factors values defining the first dimension. Here is my attempt: tab1<-with(pisa1,table(CNT,GENDER,ISCOF,ISCOM)) tab2<-apply(tab1,1:4,function(x)ifel

Re: [R] Creating a data.frame

2008-02-13 Thread Ted Harding
On 13-Feb-08 22:17:32, Joe Trubisz wrote: > OK...newbie question here. > Either I'm reading the docs wrong, or I'm totally confused. > Given the following: > > x<-c("aaa","bbb","ccc") > y<-rep(0,3) > z<-rep(0,3) > > is.character(x) > [1] TRUE > > is.numeric(y) > [1] TRUE > > Now...I want to cre

Re: [R] Creating a data.frame

2008-02-13 Thread Andrew Robinson
Hi Joe, cbind coerces the data to be the same type. Much nicer is: d <- data.frame(x=x, y=y, z=z) Cheers Andrew On Wed, Feb 13, 2008 at 05:17:32PM -0500, Joe Trubisz wrote: > OK...newbie question here. > Either I'm reading the docs wrong, or I'm totally confused. > > Given the following: >

Re: [R] use of poly()

2008-02-13 Thread Bill.Venables
You ask When using continuous data in both Y and X, does the difference between "raw" and "orthagonal" polynomials have any practical meaning? Yes, indeed it does, even if X is not 'continuous'. There are (at least) two practical differences: 1. With orthogonal

Re: [R] Creating a data.frame

2008-02-13 Thread Chuck Cleland
On 2/13/2008 5:17 PM, Joe Trubisz wrote: > OK...newbie question here. > Either I'm reading the docs wrong, or I'm totally confused. > > Given the following: > > x<-c("aaa","bbb","ccc") > y<-rep(0,3) > z<-rep(0,3) > > is.character(x) > [1] TRUE > > is.numeric(y) > [1] TRUE > > Now...I want to c

Re: [R] passing username and password to source()

2008-02-13 Thread [Ricardo Rodriguez] Your XEN ICT Team
Richard Rowe wrote: > I think this is a two stage process: > > 1) you need to find what the server requires (check its documentation) > 2) work out how to deliver the appropriate text string from R > > Until you determine step 1, speculating on step 2 is a waste of time, > > Richard > Thanks! This

Re: [R] Creating a data.frame

2008-02-13 Thread Peter Alspach
Joe d <- data.frame(x=x, y=y, z=z) sapply(d, class) x y z "factor" "numeric" "numeric" d <- data.frame(x=x, y=y, z=z, stringsAsFactors=F) sapply(d, class) x y z "character" "numeric" "numeric" HTH Peter Alspach > -Origin

Re: [R] passing username and password to source()

2008-02-13 Thread [Ricardo Rodriguez] Your XEN ICT Team
Dieter Menne wrote: > One way to handle this is to use Sys.setenv/Sys.getenv to pass parameters by > environment. Make sure, however, that this does not violate security, because > these parameter could be read by other programs. A quick workaround would be > that the receiving program immediately

[R] Creating a data.frame

2008-02-13 Thread Joe Trubisz
OK...newbie question here. Either I'm reading the docs wrong, or I'm totally confused. Given the following: x<-c("aaa","bbb","ccc") y<-rep(0,3) z<-rep(0,3) is.character(x) [1] TRUE is.numeric(y) [1] TRUE Now...I want to create a data frame, but keep the data types. In reading the docs, I assum

Re: [R] lmer: Estimated variance-covariance is singular, false convergence

2008-02-13 Thread Bert Gunter
Your data do not support your model complexity. You need to simplify the model. If you do not know what this means, I suggest you consult with a local statistician. Bert Gunter Genentech Nonclinical Statistics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf

[R] lmer: Estimated variance-covariance is singular, false convergence

2008-02-13 Thread Martin Klipp
Dear R Community! We analyse the impact of climbing activity on cliff vegetation. During our fieldwork, we recorded 90 Transects in 3 climbing sites. The aim is to see, if the plant cover (response: Cover) is influenced only by crevice availability (predictor: Cracs), or, additional, by the dista

[R] Error in model.frame.default: invalid type (list) for variable ...

2008-02-13 Thread Klaus (Diego)
I'm getting the following errors when I try to execute the glm() procedure: If my matrix of predictors is a data.frame, R shows me this error: Error in model.frame.default(formula = Ycentro ~ metodocentro - 1, data = metodocentro, : invalid type (list) for variable 'metodocentro' If my matrix

[R] do.call() browser() hang with large data.frame

2008-02-13 Thread Alistair Gee
I have a problem similar to this: http://tolstoy.newcastle.edu.au/R/help/06/02/21987.html If I try to debug (via browser()) and the call stack has a do.call() call with a large data frame, R hangs for a very long time. If, instead, replaced the do.call() call with a direct call, there is no hang.

Re: [R] How to handle Which on two matrices that do not have samenumber of rows

2008-02-13 Thread Yinghai Deng
How about this? PC[na.omit(match(P1[,1],PC[,1])),] HTH, DYH -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of My Coyne Sent: February 13, 2008 2:07 PM To: [EMAIL PROTECTED] Subject: [R] How to handle Which on two matrices that do not have samenumber of rows

[R] use of poly()

2008-02-13 Thread Dylan Beaudette
Hi, I am curious about how to interpret the results of a polynomial regression-- using poly(raw=TRUE) vs. poly(raw=FALSE). set.seed(123456) x <- rnorm(100) y <- jitter(1*x + 2*x^2 + 3*x^3 , 250) plot(y ~ x) l.poly <- lm(y ~ poly(x, 3)) l.poly.raw <- lm(y ~ poly(x, 3, raw=TRUE)) s <- seq(-3, 3,

Re: [R] Survival (KM/Cox) plots with lattice?

2008-02-13 Thread Deepayan Sarkar
On 2/13/08, Dieter Menne <[EMAIL PROTECTED]> wrote: > Dear gRaphers, > > I am looking for a lattice-panel for survival (KM/Cox) plots. I know it's > not standard, but maybe someone has already tried? There are some half-formed ideas in http://dsarkar.fhcrc.org/talks/extendingLattice.pdf but noth

Re: [R] How to handle Which on two matrices that do not have same number of rows

2008-02-13 Thread Henrique Dallazuanna
Try this: merge(data.frame(P1), data.frame(PC), by.x=1, by.y=1) On 13/02/2008, My Coyne <[EMAIL PROTECTED]> wrote: > R-newbie question > > > > I have 2 matrices > > (a) P1 has only one column of 32K rows > > (b) PC has 2 column {P, C} of 3200 rows > > > > Every values in P1 matches with a va

[R] Generalized nonlinear mixed model function?

2008-02-13 Thread Phillip J van Mantgem
(Sorry for the re-posting. My first attempt failed.) I am wondering if there is an R function that could estimate a generalized nonlinear mixed model. From my reading it seems that nlme from the nlme package can fit nonlinear mixed models, while lmer from the lme4 package can fit generalized lin

[R] How to handle Which on two matrices that do not have same number of rows

2008-02-13 Thread My Coyne
R-newbie question I have 2 matrices (a) P1 has only one column of 32K rows (b) PC has 2 column {P, C} of 3200 rows Every values in P1 matches with a value in PC[,p] (column p). I would like to use Which to search for all value in P1 that matchex PC[,p] and get the PC[,c]. However

Re: [R] Does goodfit() require frequency count of the numbers or numbers themselves?

2008-02-13 Thread Achim Zeileis
On Thu, 14 Feb 2008, Aswad Gurjar wrote: > Hello, > > I am a student and for project I need R. > I have one problem regarding function goodfit(). ...from package "vcd". > Does goodfit() require frequency count of numbers or numbers themselves? > For example suppose I have data say 150 readings.D

[R] Generalized nonlinear mixed model function?

2008-02-13 Thread Phillip J van Mantgem
I am wondering if there is an R function that could estimate a generalized nonlinear mixed model. >From my reading it seems that nlme from the nlme package can fit nonlinear mixed models, while lmer from the lme4 package can fit generalized linear mixed models. One alternative I?ve found is g

Re: [R] gWidgets process management

2008-02-13 Thread Peter McMahan
One more note on stopping at user click. The following is a bit of a hack but it seems to work. (Note: In the slow function I used "for(i in 1:500){}" instead of "Sys.sleep(1)" to better simulate a real slow R-only function): reallySlowFunction <- function(n=10){ for(i in 1:n){

[R] Does goodfit() require frequency count of the numbers or numbers themselves?

2008-02-13 Thread Aswad Gurjar
Hello, I am a student and for project I need R. I have one problem regarding function goodfit(). Does goodfit() require frequency count of numbers or numbers themselves? For example suppose I have data say 150 readings.Do I need to use goodfit() directly on data or should I make suitable no of bin

Re: [R] matching last argument in function

2008-02-13 Thread Gabor Grothendieck
Add envir = parent.frame() to the do.call: with.options <- function(...) { L <- as.list(match.call())[-1] len <- length(L) old.options <- do.call(options, L[-len], envir = parent.frame()) on.exit(options(old.options)) invisible(eval.parent(L[[len]])) } # test with.options(wid

Re: [R] matching last argument in function

2008-02-13 Thread Alistair Gee
Hi Gabor, That almost works ... but it fails when I nest with.options() within another function: with.options <- function(...) { L <- as.list(match.call())[-1] len <- length(L) old.options <- do.call(options, L[-len]) on.exit(options(old.options)) invisible(eval.parent(L[[len]])) }

[R] Survival (KM/Cox) plots with lattice?

2008-02-13 Thread Dieter Menne
Dear gRaphers, I am looking for a lattice-panel for survival (KM/Cox) plots. I know it's not standard, but maybe someone has already tried? Dieter __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the pos

Re: [R] model construction

2008-02-13 Thread roger koenker
Weighting is entirely ok, if you think that the large transactions are ones for which the observed price is more accurate. (This sounds unlikely to me, but it might be possible; the seller might devote more careful calculation to larger sales.) Weights in lm() should be chosen as w_i = 1/v_i wher

Re: [R] Modelling disease spread

2008-02-13 Thread Bio7
The simecol package is maybe what you want. http://hhbio.wasser.tu-dresden.de/projects/simecol/ http://hhbio.wasser.tu-dresden.de/projects/simecol/ Another possibility is to use a program i've written. Here is a flash presentation maybe also interesting for you. http://www.uni-bielefeld.de/biolo

Re: [R] writing a simple function

2008-02-13 Thread Roland Rau
Hi, Ben Bolker wrote: > Roland Rau gmail.com> writes: > >> does this do what you want? >> >> overlap <- function(a,b,c,d) { >> all(c:d %in% a:b) >> } >> overlap(1,5,3,4) >> overlap(1,2,3,4) > > Do you really want this to be discrete? How about > > overlap <- function(a,b,c,d) { >ad

Re: [R] Newbie HLM with lme4 questions

2008-02-13 Thread Douglas Bates
On Feb 13, 2008 9:53 AM, Ista Zahn <[EMAIL PROTECTED]> wrote: > Dear R listers, > I know I'm breaking the rules by asking a "homework" related question-- > I hope you'll forgive me. I am a social psychology graduate student, > and the only one in my department who uses R. I successfully completed >

Re: [R] merging more than 2 data frames

2008-02-13 Thread Farrel Buchinsky
I have created a merged data frame and in turn merged that with another dataframe. I could see how it could become a pain if you had lots of dataframes. I would try running a for loop...but have never done it. "joseph" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi > merge() t

[R] model construction

2008-02-13 Thread Daniel Dunn
I buy flowers at a local market on a fairly regular basis. The flower vendors post their prices and if I want to buy only one or two flowers I will generally get the posted price. From time to time I want to buy large quantities of flowers, and sometimes a vendor will give me a better price than

Re: [R] gWidgets process management

2008-02-13 Thread Peter McMahan
Thanks for that link to the mac Gtk2, it's been very helpful. To work around my original problem I've decided to just have the gui be a seperate function that returns the parameter values entered. Then I'll call that function from within a non-gui function -- so have the window close and the

Re: [R] stumped by eval

2008-02-13 Thread Ross Boylan
On Wed, 2008-02-13 at 11:18 +0100, Peter Dalgaard wrote: > Berwin A Turlach wrote: > > G'day Peter, > > > > On Wed, 13 Feb 2008 08:03:07 +0100 > > Peter Dalgaard <[EMAIL PROTECTED]> wrote: > > > > > >> Ross Boylan wrote: > >> > >>> In the following example, the inner evaluation pulls in th

Re: [R] rolling sum (like in Rmetrics package)

2008-02-13 Thread Gabor Grothendieck
If there are no missing values then a rolling sum is just n * rolling mean so you can use your rolling mean. Also see: http://tolstoy.newcastle.edu.au/R/help/04/10/5161.html In the zoo package see rollapply and rollmean. In the caTools package see runmean and runsum.exact. runmean is particularl

Re: [R] rolling sum (like in Rmetrics package)

2008-02-13 Thread Romain Francois
Hello, rollapply in zoo can probably help you : > x <- zoo( 1:10 ) > rollapply( x, 4, sum ) 2 3 4 5 6 7 8 10 14 18 22 26 30 34 > sum( x[1:4] ) [1] 10 > sum( x[2:5] ) [1] 14 Cheers, Romain -- Mango Solutions data analysis that delivers Introduction to R training course :: London ::

Re: [R] rolling sum (like in Rmetrics package)

2008-02-13 Thread Charles C. Berry
See ?filter e.g. output <- filter( x, rep(1,20) ) HTH, Chuck On Wed, 13 Feb 2008, joshv wrote: > > Hello, I'm new to R and would like to know how to create a vector of "rolling > sums". (I have seen the Rmetrics package and the rollMean function and I > would like to do the

Re: [R] rolling sum (like in Rmetrics package)

2008-02-13 Thread jim holtman
Have you tried 'filter'? > x <- 1:20 > filter(x,filter=rep(1,5)) Time Series: Start = 1 End = 20 Frequency = 1 [1] NA NA 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 NA NA > On 2/13/08, joshv <[EMAIL PROTECTED]> wrote: > > > Hello, I'm new to R and would like to know how to create a vector

[R] rolling sum (like in Rmetrics package)

2008-02-13 Thread joshv
Hello, I'm new to R and would like to know how to create a vector of "rolling sums". (I have seen the Rmetrics package and the rollMean function and I would like to do the same thing except Sum instead of Mean.) I imagine someone has done this, I just can't find it anywhere. Example: x <- so

[R] Modelling disease spread

2008-02-13 Thread francogrex
I was at a lecture the other day and I saw a presentation of very neat (short) animation modeling epidemic disease spread over a map region. When I ask what software they used they mentioned SAS. Do you know if there are equivalent resources in R to model the spread of disease with animation outpu

Re: [R] User defined split function in Rpart

2008-02-13 Thread R Help
Direction corresponds to goodness: for the split represented by goodness[i], direction[i]=-1 means that values less than the split at goodness[i] will go left, greater than will go right. If direction[i] = 1 then they will be sent to opposite sides. The long-and-short of it is that, for most tre

Re: [R] survey package: proportion estimate confidence intervals using svymean

2008-02-13 Thread Thomas Lumley
On Tue, 12 Feb 2008, Peter Holck wrote: > Using the survey package I find it is convenient and easy to get estimated > proportions using svymean, and their corresponding estimated standard > errors. But is there any elegant/simple way to calculate corresponding > confidence intervals for those pr

Re: [R] Is there a simple way to use one-way ANOVA comparing the means of groups?

2008-02-13 Thread Peter Dalgaard
Ben Bolker wrote: >> On 13/02/2008, Kes Knave gmail.com> wrote: >> >>> I have finally managed to get a "Analysis of Variance Table": >>> [snip] >>> > > >>> I want to compare the means of the four different groups, and see if >>> there is a difference. I searched for help, and think

Re: [R] Newbie HLM with lme4 questions

2008-02-13 Thread 宋时歌
Hi, I suggest you take a look at the mixed model materials in Zelig, which has both a structural form and a reduced form model specification for multilevel model. The structural form specification is what you need. Shige On Feb 13, 2008 11:53 PM, Ista Zahn <[EMAIL PROTECTED]> wrote: > Dear R li

[R] Newbie HLM with lme4 questions

2008-02-13 Thread Ista Zahn
Dear R listers, I know I'm breaking the rules by asking a "homework" related question-- I hope you'll forgive me. I am a social psychology graduate student, and the only one in my department who uses R. I successfully completed my multiple regression and structural equation modeling courses us

Re: [R] Is there a simple way to use one-way ANOVA comparing the means of groups?

2008-02-13 Thread Spencer Graves
see also the 'multcomp' and 'multcompView' packages. Henrique Dallazuanna wrote: > See ?TukeyHSD > > On 13/02/2008, Kes Knave <[EMAIL PROTECTED]> wrote: > >> Dear all, >> >> I have finally managed to get a "Analysis of Variance Table": >> >> >> Response: LogHand >> Df Sum

Re: [R] Package for sample size calculation

2008-02-13 Thread Matthias Gondan
Thanks a lot! I have now three packages: asypow, pwr, and http://www.cs.uiowa.edu/~rlenth/Power/ This should solve most of the problems we will encounter in this introductory course. Best wishes, Matthias Mitchell Maltenfort schrieb: > the library is called "pwr" and is based on the Cohen bo

Re: [R] writing a simple function

2008-02-13 Thread Ben Bolker
Roland Rau gmail.com> writes: > > does this do what you want? > > overlap <- function(a,b,c,d) { > all(c:d %in% a:b) > } > overlap(1,5,3,4) > overlap(1,2,3,4) Do you really want this to be discrete? How about overlap <- function(a,b,c,d) { ad } (although this assumes that ahttps:

Re: [R] writing a simple function

2008-02-13 Thread Bill.Venables
Your code looks like matlab, but I don't see how it would work even there. The specific problem is the to refer to an array, you do so with square brackets [..] and not round ones, (though your v is not an array, anyway, so your troubles are just starting). Let's tackle what I think may be your p

Re: [R] Is there a simple way to use one-way ANOVA comparin g the means of groups?

2008-02-13 Thread Ben Bolker
> On 13/02/2008, Kes Knave gmail.com> wrote: > > I have finally managed to get a "Analysis of Variance Table": > > [snip] > > I want to compare the means of the four different groups, and see if > > there is a difference. I searched for help, and think that maybe > > Tukey(stats) would be prope

Re: [R] writing a simple function

2008-02-13 Thread Roland Rau
Hi, mohamed nur anisah wrote: > Dear lists, > > any suggestion on how to write a function to return a TRUE if interval > [a,b] overlaps the interval [c,d]. I've tried it but an error occur saying > that 'could not find function v ; in addition warning message occur'. Below > is my codes.Pl

[R] [R-pkgs] FinTS_0.2-7

2008-02-13 Thread Spencer Graves
Hi, All: FinTS version 0.2-7 is now available on CRAN. This version adds two new functions: * ArchTest to compute the Engle (1982) Lagrange multiplier test for conditional heteroscedasticity, discussed on pp. 101-102 of Tsay, with examples on those pages worked in the R sc

Re: [R] Cox model

2008-02-13 Thread Duncan Murdoch
On 2/13/2008 9:08 AM, Gustaf Rydevik wrote: > On Feb 13, 2008 3:06 PM, Gustaf Rydevik <[EMAIL PROTECTED]> wrote: >> On Feb 13, 2008 2:37 PM, Matthias Gondan <[EMAIL PROTECTED]> wrote: >> > Hi Eleni, >> > >> > The problem of this approach is easily explained: Under the Null >> > hypothesis, the P va

[R] writing a simple function

2008-02-13 Thread mohamed nur anisah
Dear lists, any suggestion on how to write a function to return a TRUE if interval [a,b] overlaps the interval [c,d]. I've tried it but an error occur saying that 'could not find function v ; in addition warning message occur'. Below is my codes.Please help me sort this problem as i'm in p

Re: [R] Cox model

2008-02-13 Thread Gustaf Rydevik
On Feb 13, 2008 3:06 PM, Gustaf Rydevik <[EMAIL PROTECTED]> wrote: > On Feb 13, 2008 2:37 PM, Matthias Gondan <[EMAIL PROTECTED]> wrote: > > Hi Eleni, > > > > The problem of this approach is easily explained: Under the Null > > hypothesis, the P values > > of a significance test are random variable

Re: [R] summary statistics

2008-02-13 Thread stephen sefick
Jim, prettyR looks like it will work, but with the way that my data frame is set up I still can not get what I want out of it. I am lacking in my knowledge on manipulating data frames, and general R programing. Is there a reference that will give me all of these wonderful data manipulation tools t

Re: [R] Cox model

2008-02-13 Thread Gustaf Rydevik
On Feb 13, 2008 2:37 PM, Matthias Gondan <[EMAIL PROTECTED]> wrote: > Hi Eleni, > > The problem of this approach is easily explained: Under the Null > hypothesis, the P values > of a significance test are random variables, uniformly distributed in > the interval [0, 1]. It > is easily seen that the

Re: [R] Cox model

2008-02-13 Thread Matthias Gondan
Hi Eleni, The problem of this approach is easily explained: Under the Null hypothesis, the P values of a significance test are random variables, uniformly distributed in the interval [0, 1]. It is easily seen that the lowest of these P values is not any 'better' than the highest of the P values

Re: [R] dimnames

2008-02-13 Thread Eleni Christodoulou
What if you just removed the first column from your matrix: XX<-XX[,2:length(XX[1,])) so you have a new matrix without the first column and save this second one to a file? Regards, Eleni On Feb 13, 2008 3:06 PM, Roberto Olivares Hernandez <[EMAIL PROTECTED]> wrote: > Hi, > > I used the write.ta

Re: [R] dimnames

2008-02-13 Thread Gavin Simpson
On Wed, 2008-02-13 at 14:06 +0100, Roberto Olivares Hernandez wrote: > Hi, > > I used the write.table function to save data in txt file, and this is the > output: > > > V1 V2 V3 V4 > 1 YAL005C 21 14 11 > 2 YAL007C 2 1 4 > 3 YAL012W 8

Re: [R] Cox model

2008-02-13 Thread Eleni Christodoulou
Hmm...I see. I think I will give a try to the univariate analysis nonetheless...I intend to catch the p-values for each gene and select the most significant from these...I have seen it in several papers. Best Regards, Eleni On Feb 13, 2008 2:59 PM, Terry Therneau <[EMAIL PROTECTED]> wrote: > Wh

Re: [R] dimnames

2008-02-13 Thread Henrique Dallazuanna
Try this: write.table(XX,"XX.txt",quote=FALSE,sep="\t", row.names = FALSE) On 13/02/2008, Roberto Olivares Hernandez <[EMAIL PROTECTED]> wrote: > Hi, > > I used the write.table function to save data in txt file, and this is the > output: > > > V1 V2 V3 V4 > 1 YAL005C 21

[R] dimnames

2008-02-13 Thread Roberto Olivares Hernandez
Hi, I used the write.table function to save data in txt file, and this is the output: V1 V2 V3 V4 1 YAL005C 21 14 11 2 YAL007C 2 1 4 3 YAL012W 8 16 3 4 YAL016W 24 23 23 5 YAL019W 3 3 2 6

Re: [R] Cox model

2008-02-13 Thread Terry Therneau
What you appear to want are all of the univariate models. You can get this with a loop (and patience - it won't be fast). ngene <- ncol(genes) coefmat <- matrix(0., nrow=ngene, ncol=2) for (i in 1:ngene) { tempfit <- coxph(Surv(time, relapse) ~ genes[,i]) coefmat[i,] <- c(tempf

Re: [R] Formulae for R functions

2008-02-13 Thread Terry Therneau
> Can someone direct me to a resource or resources that list the formulae used > by R functions (i.e. predict.lm ) to calculate the statistic reported. I > am not a programmer and studying the r code is extremely slow going. I > have searched r-project.org and all the function help files withou

Re: [R] Is there a simple way to use one-way ANOVA comparing the means of groups?

2008-02-13 Thread Henrique Dallazuanna
See ?TukeyHSD On 13/02/2008, Kes Knave <[EMAIL PROTECTED]> wrote: > Dear all, > > I have finally managed to get a "Analysis of Variance Table": > > > Response: LogHand > Df Sum Sq MeanSq F valuePr(>F) > Prey35.3125 1.7708 20.672

[R] Is there a simple way to use one-way ANOVA comparing the means of groups?

2008-02-13 Thread Kes Knave
Dear all, I have finally managed to get a "Analysis of Variance Table": Response: LogHand Df Sum Sq MeanSq F valuePr(>F) Prey35.3125 1.7708 20.6722.066e-11 *** Residuals 16414.0488 0.0857 I want to compare the me

Re: [R] Markov and Hidden Markov models

2008-02-13 Thread Henrique Dallazuanna
See CRAN: http://cran-r.c3sl.ufpr.br/src/contrib/Descriptions/HiddenMarkov.html http://cran-r.c3sl.ufpr.br/src/contrib/Descriptions/hmm.discnp.html On 12/02/2008, David Kaplan <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a package that will estimate simple Markov models and hidden > Markov model

Re: [R] passing username and password to source()

2008-02-13 Thread Dieter Menne
[Ricardo Rodriguez] Your XEN ICT Team xen.net> writes: > Please, is it possible to pass an username and a password to source() to > access code stored in restricted access web server? > > I know I can use commands like... > > > source("http://mire.environmentalchange.net/~webmaster/R/3Dsurfac

Re: [R] stumped by eval

2008-02-13 Thread Peter Dalgaard
Berwin A Turlach wrote: > G'day Peter, > > On Wed, 13 Feb 2008 08:03:07 +0100 > Peter Dalgaard <[EMAIL PROTECTED]> wrote: > > >> Ross Boylan wrote: >> >>> In the following example, the inner evaluation pulls in the global >>> value of subset (a function) rather than the one I thought I was

[R] Intro to R :: London :: 06-07/03/2008 (Reminder)

2008-02-13 Thread Romain Francois
Mango Solutions are pleased to announce the above course in London as part of our schedule for Q1 2008. --- Introduction to R and R Programming - 6-7th March 2008 ---

Re: [R] summary statistics

2008-02-13 Thread Jim Lemon
stephen sefick wrote: > below is my data frame. I would like to compute summary statistics > for mgl for each river mile (mean, median, mode). My apologies in > advance- I would like to get something like the SAS print out of PROC > Univariate. I have performed an ANOVA and a tukey LSD and I wo

[R] Package for sample size calculation

2008-02-13 Thread Matthias Gondan
Dear list, Is anyone aware of a library for sample size calculation in R, similar to NQuery? I have to give a course in this area, and I would like to enable the students playing around with this. Best wishes, Matthias __ R-help@r-project.org mailing

Re: [R] Finding LD50 from an interaction Generalised Linear model

2008-02-13 Thread Gduncan
Many thanks indeed Bill. I understand now what you're getting at with the a/b-1! Many thanks again. Graeme Duncan Bill.Venables wrote: > > The trick is to fit the model in a form which has the two separate > intercepts and the two separate slopes as the parameters. > > You do have to realise

Re: [R] stumped by eval

2008-02-13 Thread Berwin A Turlach
G'day Peter, On Wed, 13 Feb 2008 08:03:07 +0100 Peter Dalgaard <[EMAIL PROTECTED]> wrote: > Ross Boylan wrote: > > In the following example, the inner evaluation pulls in the global > > value of subset (a function) rather than the one I thought I was > > passing in (a vector). Can anyone help me

Re: [R] R CMD SHLIB help

2008-02-13 Thread Prof Brian Ripley
On Tue, 12 Feb 2008, Deepak Chandran wrote: > Hello, > > I have been having a great deal of difficulty using R CMD SHLIB to > generate the .so file from my C file. I am using Win XP, and I have > cygwin installed. Not surprising: there are no .so objects on Windows. Also, we don't support Cyg

[R] survey package: proportion estimate confidence intervals using svymean

2008-02-13 Thread Peter Holck
Using the survey package I find it is convenient and easy to get estimated proportions using svymean, and their corresponding estimated standard errors. But is there any elegant/simple way to calculate corresponding confidence intervals for those proportions? Of course +/- 1.96 s.e. is a reasonab

[R] R CMD SHLIB help

2008-02-13 Thread Deepak Chandran
Hello, I have been having a great deal of difficulty using R CMD SHLIB to generate the .so file from my C file. I am using Win XP, and I have cygwin installed. I updated to the latest MinGW make files in order to get rid of some error. But I still get a few warnings (shown below), and no sh

Re: [R] learning S4

2008-02-13 Thread Christophe Genolini
Robin Hankin a écrit : > Christophe > > you might find the Brobdingnag package on CRAN helpful here. > Yep, I read it and I find it very usefull. A question anyway: Is there a way to change a slot without using the <- ? Instead of > new("obj") > [EMAIL PROTECTED] <- 3 I would like to have > n