Re: [R] plot rownames

2008-05-28 Thread Prof Brian Ripley
On Tue, 27 May 2008, T.D.Rudolph wrote: In the following example: x - rnorm(1:100) y - seq(from=-2.5, to=3.5, by=0.5) z - as.matrix(table(cut(x,c(-Inf, y, +Inf ## I wish to transform the values in z j - log(z) ## Yet retain the row names row.names(j)-row.names(z) Hmm. The rownames

Re: [R] Linear Programming.

2008-05-28 Thread Arne Henningsen
Hi Marcus! On Wednesday 28 May 2008 05:56, Marcus Vinicius wrote: Dear all, May anyone explain to me how I run a linear programming or Data Envelopment Analysis (DEA models) into R? Package DEA (on CRAN): http://cran.r-project.org/web/packages/DEA/index.html Package FEAR (NOT on CRAN):

[R] How to make R running faster

2008-05-28 Thread ctu
Hi everyone, I run the R loops on window XP and vista. Both are Intel core 2 Duo 2.2 GHz with 2 GB ram and XP is significantly faster than vista. Dose anyone know how speed up R loops in vista? Thank you in advance. Chunhao Tu __

Re: [R] Tukey HSD (or other post hoc tests) following repeated measures ANOVA

2008-05-28 Thread Dieter Menne
Ullrich Ecker ullrich.ecker at uwa.edu.au writes: I am fairly new to R, and I am aware that others have had this problem before, but I have failed to solve the problem from previous replies I found in the archives. Now, I want to calculate a post-hoc test following up a within-subjects

[R] R News, volume 8, issue 1 is now available

2008-05-28 Thread John Fox
Dear R users, The May 2008 issue of `R News' is now available on CRAN under the Documentation/Newsletter link. John (on behalf of the R News Editorial Board) John Fox, Professor Department of Sociology McMaster University Hamilton ON Canada L8S 4M4

[R] can I do this with R?

2008-05-28 Thread Maria
Hello, I am just about to install R and was wondering about a few things. I have only worked in Matlab because I wanted to do a logistic regression. However Matlab does not do logistic regression with stepwiseforward method. Therefore I thought about testing R. So my question is can I do

Re: [R] hash or other quick lookup function?

2008-05-28 Thread Esmail Bonakdarian
Hi Duncan, Duncan Murdoch wrote: Duncan Murdoch wrote: Esmail Bonakdarian wrote: Hello all, I have a matrix of bit values. I compute certain values based on the bits in each row. There may be *duplicate* entries in the matrix, ie several rows may be identical. These rows change over time,

Re: [R] Unexpected behaviour in reading genomic coordinate files of R-2.7.0

2008-05-28 Thread Prof Brian Ripley
From the NEWS file for R-patched: o A field containing just a sign is no longer regarded as numeric (it was on all platforms in 2.7.0, but not on most in earlier versions of R). So the default behaviour has already been changed. The right way to overcome this was (as

Re: [R] request: which integer in each column is in majority

2008-05-28 Thread Uwe Ligges
Muhammad Azam wrote: Respected R helpers/ users I am one of the new R user. I have a problem regarding to know which of the integer in each column of the following matrix is in majority. I want to know that integer e.g. in the first column 1 is in majority. Similarly in the third column 4

Re: [R] rmeta package: metaplot or forestplot of meta-analysis under DSL (ramdon) model

2008-05-28 Thread Jonathan Baron
I don't know if this helps, but recently I tried to use rmeta to make a forest plot and gave up because the data I had were not in the right format, so I simulated a forest plot using gplots. I did it all sideways and then rotated the PostScript. See

[R] Unexpected behaviour in reading genomic coordinate files of R-2.7.0

2008-05-28 Thread Margherita
Great R people, I have noticed a strange behaviour in read.delim() and friends in the R 2.7.0 version. I will describe you the problem and also the solution I already found, just to be sure it is an expected behaviour and also to tell people, who may experience the same difficulty, a way to

[R] Tukey HSD (or other post hoc tests) following repeated measures ANOVA

2008-05-28 Thread Ullrich Ecker
Hi everyone, I am fairly new to R, and I am aware that others have had this problem before, but I have failed to solve the problem from previous replies I found in the archives. As this is such a standard procedure in psychological science, there must be an elegant solution to this...I think.

[R] confidence interval for the logit - predict.glm

2008-05-28 Thread Christine Sonvilla
Hello all, I've come across an online posting http://www.biostat.wustl.edu/archives/html/s-news/2001-10/msg00119.html that described how to get confidence intervals for predicted values from predict.glm. These instructions were meant for S-Plus. Yet, it generally seems to work with R too,

[R] Computing P-Value

2008-05-28 Thread Edward Wijaya
Hi, Is there an R function or package that computes p-value? -GV __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented,

Re: [R] how to bind lists recursively

2008-05-28 Thread Patrick Burns
[EMAIL PROTECTED] wrote: This is somewhat subtle. Rolf's solution (here corrected to...) a - list() for(i in 0:1) a[[i+1]] - i is the best of the loop solutions (or at least the best I know of). The But Bill does know a better way -- it just slipped his mind. system.time({ a -

[R] request: which integer in each column is in majority

2008-05-28 Thread Muhammad Azam
Respected R helpers/ users I am one of the new R user. I have a problem regarding to know which of the integer in each column of the following matrix is in majority. I want to know that integer e.g. in the first column 1 is in majority. Similarly in the third column 4 is in majority. So what is

Re: [R] request: which integer in each column is in majority

2008-05-28 Thread Karl Ove Hufthammer
Muhammad Azam: I am one of the new R user. I have a problem regarding to know which of the integer in each column of the following matrix is in majority. I want to know that integer e.g. in the first column 1 is in majority. x=matrix(c(1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,4,1,2,3,3),ncol=4) x

Re: [R] Pros and Cons of R

2008-05-28 Thread Neil Shephard
I feel the discussion about ease of installation on Linux (/*NIX type systems) isn't really relevant to the Pros and Cons of R. The problems encountered by people are often a consequence of their lack of knowledge/understanding of the operating system, and not a deficiency of R itself. Just my

[R] Sample size for 2-sample proportion tests

2008-05-28 Thread Karl Knoblick
Hallo! I found a question exactly as mine, but I did not found an answer. Therefore I post this again - hopefully there will be an answer! Thanks in advance! karl From: Berta ibanez Date: Tue, 27 Feb 2007 18:58:48 +0100 Hi R-users, I want to calculate the sample size needed to carry out a

[R] extracting information from lmer objects

2008-05-28 Thread epigone26
Hi, I wish to extract a subset of the information of given by summary(lmer.object) as a dataframe. In particular, I wish to extract just a table listing the Estimate, Std Error, and t-values rounded to 3 decimal places. I have learned how to extract the coefficients with

[R] Evidence Theory in R

2008-05-28 Thread Lars Fischer
Hello, well, I searched list-archive, cran and the references, but found nothing. Thus: Does anybody around here know anything about Dempster-Shafer Theory, Evidence Theory or Hints in R? Has anybody stumbled about a package that I overlooked or implemented something in this area? I really would

[R] How to remove NAs and lme function

2008-05-28 Thread Jen_mp3
I am working on a project to find a model for the concentration of dissolved oxygen in the river clyde. Ive fitted a linear mixed model as lme(DOW~Temperature+Salinity+Year+factor(Station)*factor(Depth), random~1|id), where id is an identifier of the day over 20 years defined as Day*1 +

Re: [R] package functions documentation

2008-05-28 Thread Martin Morgan
Ardia David [EMAIL PROTECTED] writes: Great, thanks a lot! It works properly now. By the way, how can I get rid of the warning message : * checking line endings in C/C++/Fortran sources/headers ... WARNING Found the following sources/headers with CR or CRLF line endings: Should I open an

Re: [R] How to remove NAs and lme function

2008-05-28 Thread Andrew Robinson
Jen, try na.action = na.exclude Andrew On Wed, May 28, 2008 9:26 pm, Jen_mp3 wrote: I am working on a project to find a model for the concentration of dissolved oxygen in the river clyde. Ive fitted a linear mixed model as lme(DOW~Temperature+Salinity+Year+factor(Station)*factor(Depth),

Re: [R] how to bind lists recursively

2008-05-28 Thread John Fox
Dear Brian and Bill, Here's an interesting contrasting example (taken from this month's Help Desk column in R News, which Bill has already seen), first verifying the relative timings for Brian's example: system.time({ + a - vector(list, 10001) + for(i in 0:1) a[[i+1]] - i + }) user

Re: [R] Rotated text on a regression line

2008-05-28 Thread Thomas Adams
Christoph, I see two problems: (1) use plot(x,y,pch=16,xlim=c(0,10),asp=1), as the default has the x/y scales different. (2) It looks to me that the expression srt=180/pi*atan(slope) should be srt=180*atan(slope)/pi Regards, Tom Dr. Christoph Scherber wrote: Dear all, I stumbled over a

Re: [R] How to make R running faster

2008-05-28 Thread John Fox
Dear Chunhao Tu, There is, coincidentally, a discussion of loops and related issues in the Help Desk column in the current issue of R News (see the newsletter link on CRAN). Regards, John -- John Fox, Professor Department of Sociology McMaster University Hamilton,

Re: [R] need help for building R in Ubuntu 8.04

2008-05-28 Thread Dirk Eddelbuettel
On Wed, May 28, 2008 at 02:29:10PM +0200, Martin Maechler wrote: EH == Erin Hodgess [EMAIL PROTECTED] on Sun, 25 May 2008 13:27:04 -0500 writes: EH Try: ./configure --with-x=no well.. no! really don't. Seconded. At best this qualified for the 'then do not do it' school

[R] rbinom not using probability of success right

2008-05-28 Thread Philip Twumasi-Ankrah
I am trying to simulate a series of ones and zeros (1 or 0) and I am using rbinom but realizing that the number of successes expected is not accurate. Any advice out there. This is the example: N-500 status-rbinom(N, 1, prob = 0.15) count-sum(status) 15 percent of 500 should be 75 but what I

Re: [R] can I do this with R?

2008-05-28 Thread Charilaos Skiadas
A google search for logistic regression with stepwise forward in r returns the following post: https://stat.ethz.ch/pipermail/r-help/2003-December/043645.html Haris Skiadas Department of Mathematics and Computer Science Hanover College On May 28, 2008, at 7:01 AM, Maria wrote: Hello, I am

Re: [R] function to compute consensus DNA sequence by plurality?

2008-05-28 Thread Jean lobry
Kim, Is is what you want? tmp - readLines(textConnection( TGCATACACCGACAACATCCTCGACGACTACACCTACTACG CGCCTACACCAACGATGTCCTGGACGACTTCTGCTACTACG CGCCTACACCAACGATGTCCTGGACGACTTCTGCTACTACG CGCCTACACCAACGATGTCCTGGACGACTTCTGCTACTACG CGCCTACACCAACGATGTCCTGGACGACTTCTGCTACTACG

Re: [R] how to bind lists recursively

2008-05-28 Thread Prof Brian Ripley
On Wed, 28 May 2008, John Fox wrote: Dear Brian and Bill, Here's an interesting contrasting example (taken from this month's Help Desk column in R News, which Bill has already seen), first verifying the relative timings for Brian's example: system.time({ + a - vector(list, 10001) +

Re: [R] rbinom not using probability of success right

2008-05-28 Thread Prof Brian Ripley
You asked for each of 500 to be included with probability 0.15, not for 15% of 500. If you want the latter, use sample, e.g. sample(c(rep(1,75), rep(0,425))) And to see if your 77 is reasonable for binomial sampling: binom.test(77, 500, 0.15) Exact binomial test data: 77 and 500

Re: [R] rbinom not using probability of success right

2008-05-28 Thread Ted Harding
On 28-May-08 12:53:26, Philip Twumasi-Ankrah wrote: I am trying to simulate a series of ones and zeros (1 or 0) and I am using rbinom but realizing that the number of successes expected is not accurate. Any advice out there. This is the example: N-500 status-rbinom(N, 1, prob = 0.15)

Re: [R] rbinom not using probability of success right

2008-05-28 Thread Charles Annis, P.E.
Do it again. What did you get this time? Then do it another time. Do you see what is happening? Charles Annis, P.E. [EMAIL PROTECTED] phone: 561-352-9699 eFax: 614-455-3265 http://www.StatisticalEngineering.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Re: [R] How to make R running faster

2008-05-28 Thread Erin Hodgess
I remember reading the colSum and colMean were better, when you need sums and means On Wed, May 28, 2008 at 8:26 AM, Esmail Bonakdarian [EMAIL PROTECTED] wrote: Neil Shephard wrote: Loops are not massively efficient within R. Look into using the apply() family of functions

Re: [R] rbinom : Does randomness preclude precision?

2008-05-28 Thread Philip Twumasi-Ankrah
Teds reply is a bit comforting and as indicated in my post, I am resorting to using sample but as an academic issue, does randomness preclude precision? Randomness should be in the sequence of zeros and ones and how they are simulated at each iteration of the process but not in the eventual

Re: [R] How to make R running faster

2008-05-28 Thread Esmail Bonakdarian
Neil Shephard wrote: Loops are not massively efficient within R. Look into using the apply() family of functions (eapply()/lapply()/mapply/rapply()/tapply()). Didn't someone post not too long ago that apply is internally represented as a for-loop? Or am I not remembering this correctly? The

Re: [R] Computing P-Value

2008-05-28 Thread Gundala Viswanath
Dear Ben, Given a set of words ('foo', 'bar', 'bar', 'bar', quux . foo) this can be in 10.000 items. I would like to compute the significance of the word occurrence with P-Value. Is there a simple way to do it? - GV On Wed, May 28, 2008 at 11:46 PM, Ben Bolker [EMAIL PROTECTED] wrote:

Re: [R] (no subject)

2008-05-28 Thread Ben Bolker
Philip Twumasi-Ankrah nana_kwadwo_derkyi at yahoo.com writes: Teds reply is a bit comforting and as indicated in my post, I am resorting to using sample but as an academic issue, does randomness preclude precision? Randomness should be in the sequence of zeros and ones and how they

Re: [R] rbinom : Does randomness preclude precision?

2008-05-28 Thread Charles Annis, P.E.
What do you mean by ... *eventual* nature of the distribution? If you simulated 100 samples, would you expect to see 1.5 successes? Or 1? Or 2? How many, in your thinking, is eventual? Charles Annis, P.E. [EMAIL PROTECTED] phone: 561-352-9699 eFax: 614-455-3265

[R] Grouped weighted.mean

2008-05-28 Thread Chip Barnaby
Dear all -- I want to compute weighted.mean() for grouped rows. Data frame extract is just below. For each Key, I want the mean of IAC weighted by Wt. DP0[1:20,] Key IACWt 2 C3-PD030020050.PD030020050.3.12.3.0 0.765

[R] individual analysis

2008-05-28 Thread julien . jung
Dear R-community, I'm looking forward to analyse the results statistically for a new medical diagnostic tool. The aim is to know whether a given subject is different from the mean or distribution of a population of controls for one continuous variable (a neuro-imaging results which can be

Re: [R] How to remove NAs and lme function

2008-05-28 Thread Jen_mp3
Thanks, that worked! Andrew Robinson-6 wrote: Jen, try na.action = na.exclude Andrew On Wed, May 28, 2008 9:26 pm, Jen_mp3 wrote: I am working on a project to find a model for the concentration of dissolved oxygen in the river clyde. Ive fitted a linear mixed model as

[R] Fixing the coefficient of a regressor in formula

2008-05-28 Thread Marie-Pierre Sylvestre
Dear R users, I want to estimate a Cox PH model with time-dependent covariates so I am using a counting process format with the following formula: Surv(data$start, data$stop, data$event.time) ~ cluster(data$id) + G1 + G2 + G3 + G4 + G5 +G6 Gs represent a B-spline basis functions so they

Re: [R] rbinom : Does randomness preclude precision?

2008-05-28 Thread Charles Annis, P.E.
I think I see the rub: You would like to see the distribution of a sample be identical to the distribution from which it was sampled. But if it is random then that can happen only in the long run, not on every sample. That is why samples from a normal density are *not* themselves normal -

Re: [R] can I do this with R?

2008-05-28 Thread Smita Pakhale
Hi Maria, But why do you want to use forwards or backwards methods? These all are 'backward' methods of modeling. Try using AIC or BIC. BIC is much better than AIC. And, you do not have to believe me or any one else on this. Just make a small data set with a few variables with known

[R] odds ratio's and function

2008-05-28 Thread Wim Bertels
Hallo, i tried writing a function to extract all the odds ratio's from a ftable: (+ p.adjust needs to build in) So i tried the following: ORCalcul - function(m) { or-matrix(1:(length(m[,1])-1)*(length(m[1,])-1)*5,length(m[,1])-1,length(m[1,])-1) for(i in 1:length(m[,1])-1) {

Re: [R] Grouped weighted.mean

2008-05-28 Thread Erik Iverson
Hello - Chip Barnaby wrote: Dear all -- I want to compute weighted.mean() for grouped rows. Data frame extract is just below. For each Key, I want the mean of IAC weighted by Wt. DP0[1:20,] Key IACWt 2

[R] Searchreplace string?

2008-05-28 Thread Romain
Hi there, I would like to know if it is possible to modify a text file with a R function. In fact I would like to know if a function Search Replace exists. My problem is to create config files from a Base file in which I have to modify values of parameters. My Base File: #... #... Param1=

Re: [R] Computing P-Value

2008-05-28 Thread Ben Bolker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gundala Viswanath wrote: | Dear Ben, | | Given a set of words | ('foo', 'bar', 'bar', 'bar', quux . foo) this can be in 10.000 items. | I would like to compute the significance of the word occurrence with P-Value. | | Is there a simple way to

Re: [R] rbinom : Does randomness preclude precision?

2008-05-28 Thread Daniel Nordlund
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Philip Twumasi-Ankrah Sent: Wednesday, May 28, 2008 6:52 AM To: [EMAIL PROTECTED] Cc: r-help@r-project.org Subject: Re: [R] rbinom : Does randomness preclude precision? Teds reply is a bit

[R] Help on Calculating day differences

2008-05-28 Thread Thorsten Muehge
Hello R Freaks, I calculate the difference in days between two events with the following litte R expresseion: T1a - strptime(T1,%m/%d/%y %H:%M:%S); T2a - strptime(T2,%m/%d/%y %H:%M:%S); T1b - as.Date(T1a); T2b - as.Date(T2a); days - T2b-T1b; time - T2a - T1a; In the project I would like to

[R] superposing barplots having different scales

2008-05-28 Thread Bill Shipley
Hello. I know how to make a bar plot in which a numeric y variable is plotted against some grouping variable X (say, groups A, B, C) when this grouping variable is subdivided into each of two subgroups; so the bars would be: (group A subgroup 1) beside (group A subgroup 2), then (group B subgroup

Re: [R] How to make R running faster

2008-05-28 Thread Robert A LaBudde
At 10:25 AM 5/28/2008, Esmail Bonakdarian wrote: Erin Hodgess wrote: I remember reading the colSum and colMean were better, when you need sums and means Well .. I'm waiting for the experts to jump in and give us the straight story on this :-) All of the algorithms are represented internally

Re: [R] Help on Calculating day differences

2008-05-28 Thread Gabor Grothendieck
See ?is.holiday in chron. You need to supply a .Holidays vector and then do this: library(chron) d1 - Sys.Date() d2 - Sys.Date() + 100 sq - sq(d1, d2, by = day) sum(!is.holiday(sq) !is.weekend(sq)) # endpoints included The fCalendar package also has functionality in this area. On Wed, May

Re: [R] Evidence Theory in R

2008-05-28 Thread H. W. Borchers
Lars Fischer lars at sec.informatik.tu-darmstadt.de writes: Hello, well, I searched list-archive, cran and the references, but found nothing. Thus: Does anybody around here know anything about Dempster-Shafer Theory, Evidence Theory or Hints in R? Has anybody stumbled about a package

Re: [R] lm() output with quantiative predictors not the same as SAS

2008-05-28 Thread Ben Bolker
alicia.senauer at yale.edu writes: I am trying to use R lm() with quantitative and qualitative predictors, but am getting different results than those that I get in SAS. In the R ANOVA table documentation I see that Type-II tests corresponds to the tests produced by SAS for

Re: [R] superposing barplots having different scales

2008-05-28 Thread Ben Bolker
Bill Shipley bill.shipley at usherbrooke.ca writes: Hello. I know how to make a bar plot in which a numeric y variable is plotted against some grouping variable X (say, groups A, B, C) when this grouping variable is subdivided into each of two subgroups; so the bars would be: (group A

Re: [R] plot rownames

2008-05-28 Thread T.D.Rudolph
I did have the problem of not having two continuous variables and this approach circumvents this, allowing me in fact to plot the rownames. Prof Brian Ripley wrote: On Tue, 27 May 2008, T.D.Rudolph wrote: In the following example: x - rnorm(1:100) y - seq(from=-2.5, to=3.5, by=0.5)

[R] manipulating multiply imputed data sets

2008-05-28 Thread Donald Braman
Hi folks, I have five imputed data sets and would like to apply the same recoding routines to each. I could do this sort of thing pretty easily in Stata using MIM, but I've decided to go cold turkey on other stats packages as a incentive for learning more about R. Most of the recoding is for

[R] Suitable package for carrying out sigma and beta convergence in panel data

2008-05-28 Thread Amarjit Singh Sethi
Dear all nbsp; I wish to carry out sigma- and beta-convergence analysis in respect of panel data [wherein current value of one of the variables needs be regressed upon suitably transformed lagged values of another variable(s)]. I am quite new to the R-language and am not very much aware of the

[R] R reference Books

2008-05-28 Thread Neil Gupta
Hi I am still fairly new to R but picking it up quickly. I have some problems manipulating data in tables. I was wondering if anyone new any good resources such as an R manual. Some of the intro pdfs I viewed do not show how...much appreciated. [[alternative HTML version deleted]]

Re: [R] manipulating multiply imputed data sets

2008-05-28 Thread John Fox
Dear Donald, I can't guarantee that there aren't other problems, but your call to update() is in error; you need allmis - update(allmis, white = recode(RACE, '1=1; else=0; ')) not allmis - update(allmis, white - recode(RACE, '1=1; else=0; ')) [The last ; in the recode specification is

[R] Gantt chart like graphics

2008-05-28 Thread kljosc
Dear R Community, I have a dataframe like this dat product1 product2 ... productn 01.1.2008 1 1 1 02.1.2008 1 1 2 . 15.2.2008 2 2 NA . 04.4.2008 2 2 1 05.4.2008 NA 2

[R] multistate survival analysis w/ time varying covariates

2008-05-28 Thread gulemeto
Hi, I've seen in the NestCohort package that one can do a hazard model with a binary outcome using covariates. I am interested in multistate hazard models with time-varying covariates, but can't seem to find this already implemented in an R package. Is this included somewhere but called

Re: [R] R reference Books

2008-05-28 Thread Douglas Bates
There is a very good book called Data Manipulation with R by Phil Spector that just became available. It is brief and concise. I would recommend that book for learning about manipulating data in tables. For anyone interested in data exploration and graphics I would also recommend Deepayan

[R] library(Matrix) and image() colors?

2008-05-28 Thread jgarcia
Hi, I'm trying to produce a plot of an image of a Matrix, but I don't get other colors than the default grey scale: image(Matrix(topo.matrix.2),col.regions=topo.colors(100),colorkey=FALSE) this still is plotted in grey. Is there any mistake in my syntax? Thanks and regards, Javier --

[R] Can plot() be used for multiple plots?

2008-05-28 Thread Ben Fairbank
Greetings helpRs -- I would like to use plot() to plot two cumulative distribution curves so that a user of the plot can compare the distributions of the two variables. The following code draws two distributions separately, but I cannot find the instruction necessary to add a second

Re: [R] library(Matrix) and image() colors?

2008-05-28 Thread Deepayan Sarkar
On 5/28/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I'm trying to produce a plot of an image of a Matrix, but I don't get other colors than the default grey scale: image(Matrix(topo.matrix.2),col.regions=topo.colors(100),colorkey=FALSE) this still is plotted in grey. Is there

Re: [R] can I do this with R?

2008-05-28 Thread Xiaohui Chen
step or stepAIC functions do the job. You can opt to use BIC by changing the mulplication of penalty. I think AIC and BIC are not only limited to compare two pre-defined models, they can be used as model search criteria. You could enumerate the information criteria for all possible models if

[R] calling C function from R

2008-05-28 Thread Wen-Ching Lin
Hi, I am reading the source code of rpart. I have problems understand the following code and would appreciate for any helps. In rpart.s, there is a line: rpfit lt;- .C(C_s_to_rp, nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; n = as.integer(nobs), nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;

Re: [R] can I do this with R?

2008-05-28 Thread Frank E Harrell Jr
Xiaohui Chen wrote: step or stepAIC functions do the job. You can opt to use BIC by changing the mulplication of penalty. I think AIC and BIC are not only limited to compare two pre-defined models, they can be used as model search criteria. You could enumerate the information criteria for

Re: [R] can I do this with R?

2008-05-28 Thread Xiaohui Chen
Frank E Harrell Jr 写道: Xiaohui Chen wrote: step or stepAIC functions do the job. You can opt to use BIC by changing the mulplication of penalty. I think AIC and BIC are not only limited to compare two pre-defined models, they can be used as model search criteria. You could enumerate the

Re: [R] How to make R running faster

2008-05-28 Thread Richard Rowe
[EMAIL PROTECTED] wrote: Hi everyone, I run the R loops on window XP and vista. Both are Intel core 2 Duo 2.2 GHz with 2 GB ram and XP is significantly faster than vista. Dose anyone know how speed up R loops in vista? Thank you in advance. Chunhao Tu

Re: [R] can I do this with R?

2008-05-28 Thread Andrew Robinson
On Wed, May 28, 2008 at 03:47:49PM -0700, Xiaohui Chen wrote: Frank E Harrell Jr ??: Xiaohui Chen wrote: step or stepAIC functions do the job. You can opt to use BIC by changing the mulplication of penalty. I think AIC and BIC are not only limited to compare two pre-defined models,

Re: [R] Gantt chart like graphics

2008-05-28 Thread Gabor Grothendieck
Try gantt.chart in the plotrix package. On Wed, May 28, 2008 at 1:54 PM, kljosc [EMAIL PROTECTED] wrote: Dear R Community, I have a dataframe like this dat product1 product2 ... productn 01.1.2008 1 1 1 02.1.2008 1 1 2 .

Re: [R] Writing intermediate analysis to disk

2008-05-28 Thread Moshe Olshansky
Hi Stephen, Have you looked at 'save' and 'load'? As far as I understand, to really release the memory you need to close R, so you may try to write a script (shell script on Unix, batch file on Windows) which invokes Rcmd to load the data, make an iteration and save the result, so that R dies

Re: [R] confidence interval for the logit - predict.glm

2008-05-28 Thread Christine Sonvilla
Dear Brian and list members, Thanks very much for your response Brian! I applied the adjusted calculation that you advised me to use [1/(1+exp(-upperlogit))] and as a result I don't get any more NA values in my upper confidence interval values. Yet, some outcomes are very akward, since for

[R] Separator argument in read.table

2008-05-28 Thread Gundala Viswanath
Hi, Suppose I have the following tabular data: 1729_at | TRADD | TNFRSF1A-associated via death domain | protein-coding 1773_at | FNTB | farnesyltransferase, CAAX box, beta | protein-coding 177_at | PLD1 | phospholipase D1, phosphatidylcholine-specific | protein-coding What is the right

Re: [R] can I do this with R?

2008-05-28 Thread Smita Pakhale
Using any 'significance level', I think is the main problem in the stepwise variable selection method. As such in 'normal' circumstances the interpretation of p-value is topsy-turvy. Then you can only imagine as to what happens to this p-value interpretation in this process of variable

[R] Levels error after printing

2008-05-28 Thread Gundala Viswanath
Hi all, After running this code: __BEGIN__ dat - read.table(gene_prob.txt, sep = \t) n - length(dat$V1) print(n) print(dat$V1) __END__ With this input in gene_prob.txt __INPUT__ HFE 0.00107517988586552 NF1 0.000744355305599206 PML 0.000661649160532628 TCF30.000661649160532628 NF2

[R] Extracting variables from random effects formulas

2008-05-28 Thread Rebecca Sela
I would like to be able to extract the names of the variables in a formula that specifies random effects. For example, given: random = ~ 1+year | st_name I'd like to be able to get year and st_name out of random. Neither terms(random) nor random[2] seems to work. Is there a way to get