Re: [R] Linker problem in installing 64-bit R

2006-04-21 Thread Prof Brian Ripley
Note: configure:4041: checking whether the C compiler works configure:4059: error: cannot run C compiled programs. so your compiler installation is broken, seriously enough that configure can make no progress. Also, gcc 3.4.2 is old and has a known bug that stops some R packages using

Re: [R] second try; writing user-defined GLM link function

2006-04-21 Thread Prof Brian Ripley
glm.24.pred-predict(glm.24,newdata=nestday, type=response, SE.fit=T) What is SE.fit? The help says se.fit. That _may_ be a problem. However, I think the real problem is that the link function argument includes a reference to vc.apfa$days that is appropriate for fitting, not prediction. One

Re: [R] PCA biplot question

2006-04-21 Thread bady
Hi, hi all, Hi everyone, I'd like to project two pcas onto one device window. I plot my first PCA: biplot(prcomp(t(cerebdevmat)), var.axes=FALSE, cex=c(1,.1), pc.biplot=TRUE) Now I'd like to project the features of another PCA onto this graph. Any suggestions? You can used co-inertia

[R] rcorrp.cens

2006-04-21 Thread Stefano Mazzuco
Hi R-users, I'm having some problems in using the Hmisc package. I'm estimating a cox ph model and want to test whether the drop in concordance index due to omitting one covariate is significant. I think (but I'm not sure) here are two ways to do that: 1) predict two cox model (the full model

Re: [R] Mutually Orthogonal Latin Squares

2006-04-21 Thread Robin Hankin
Hi Jinsong Finding even a pair of mutually orthogonal latin squares for arbitrary order is a difficult problem. For example, Euler conjectured that no orthogonal latin squares exist for order 4n+2; this was only disproved in 1960 (in 1900 it was proved that there are none of order 6). . . .

[R] Histogram to compare two datasets

2006-04-21 Thread Johan van Niekerk
Dear All, I am trying to create a histogram-like plot for comparing two datasets - For each interval, I want it to draw 2 bars - one for representing the number of values in each dataset for that interval. I have looked at the help for the hist() function and also for the histogram() function

Re: [R] Histogram to compare two datasets

2006-04-21 Thread Romain Francois
Le 21.04.2006 10:48, Johan van Niekerk a écrit : Dear All, I am trying to create a histogram-like plot for comparing two datasets - For each interval, I want it to draw 2 bars - one for representing the number of values in each dataset for that interval. I have looked at the help for the

[R] No Discounts for Springer books (e.g. S Programming)?

2006-04-21 Thread Hans-Peter
Hi, I want to buy the books Modern applied Statistics with S and S Programming. Both are Springer books and according to the Discount Info on the page books related to R (http://www.r-project.org/doc/bib/R-books.html) subject to a 20 % discount. Unfortunatley the promotion code doesn't work. I

[R] online tutorials

2006-04-21 Thread Maxon, Matthew
I work for a Investment group with a very extensive training program and we are having our new hires take a statistics course at University of Chicago where they have to complete some assignments with R. I was wondering if there are any online tutorials that exist where we could get our

Re: [R] creating empty cells with table()

2006-04-21 Thread Jim Lemon
Owen, Jason wrote: Hello, Suppose I simulate 20 observations from the Poisson distribution with lambda = 4. I can summarize these values using table() and then feed that to barplot() for a graph. Problem: if there are empty categories (e.g. 0) or empty categories within the range of the data

Re: [R] online tutorials

2006-04-21 Thread Peter Dalgaard
Maxon, Matthew [EMAIL PROTECTED] writes: I work for a Investment group with a very extensive training program and we are having our new hires take a statistics course at University of Chicago where they have to complete some assignments with R. I was wondering if there are any online

[R] Considering port of SAS application to R

2006-04-21 Thread Werner Wernersen
Hi there! I am considering to port a SAS application to R and I would like to hear your opinion if you think this is possible and worthwhile. SAS is mainly used to do data management and then to do some aggregations and simple computations on the data and to output a modified data set. The

Re: [R] Considering port of SAS application to R

2006-04-21 Thread Philippe Grosjean
Please, read the R Data Import/Export manual provided with any version of R, and come back with more specific questions. In general, R cannot deal with datasets as large as those handled by SAS. But this is true only when you use standard R functions, like read.table(), which are not written

Re: [R] Considering port of SAS application to R

2006-04-21 Thread Gabor Grothendieck
R supports a number of databases and if you only need to work with a small amount of data at once it should be readily do-able; however, R keeps objects in memory and if you need large amounts at once then you could run into problems. Note that S-Plus keeps objects on disk and has other features

Re: [R] online tutorials

2006-04-21 Thread louis homer
I got started with the book by Venables and Ripley 'Modern Applied Statistics with S-Plus'. If you will be working with the Windows version (unbelievably easy to install) you will also find helpful material in the help file. On Thursday 20 April 2006 09:24, Maxon, Matthew wrote: I work for a

Re: [R] rcorrp.cens

2006-04-21 Thread Frank E Harrell Jr
Stefano Mazzuco wrote: Hi R-users, I'm having some problems in using the Hmisc package. I'm estimating a cox ph model and want to test whether the drop in concordance index due to omitting one covariate is significant. I think (but I'm not sure) here are two ways to do that: 1) predict

Re: [R] online tutorials

2006-04-21 Thread falissard
If you are not afraid by exoticism, this web site http://www.kb.u-psud.fr/acces-etudiant/cours/biostat/Biostat.htm is a French speaking multimedia online tutorial to R... Best regards, Bruno Bruno Falissard INSERM U669,

Re: [R] No Discounts for Springer books (e.g. S Programming)?

2006-04-21 Thread Hans-Peter
Dear Augustin, What you have to do is to register in that web page or in Springer Alert, and when you order the books, the discount is applied to your order automatically. Thanks a lot, that worked. One has to register and then the discount token is applied. - For the record: Amazon was quite

Re: [R] Considering port of SAS application to R

2006-04-21 Thread bogdan romocea
Forget about R for now and port the application to MySQL/PostgreSQL etc, it is possible and worthwhile. In case you happen to use (and really need) some SAS DATA STEP looping features you might be forced to look into SQL cursors, otherwise the port should be (very) straightforward.

Re: [R] Considering port of SAS application to R

2006-04-21 Thread Steve Miller
Good suggestion. Multiple gigabytes is stretching it with R. Use PostgreSQL Python, and Python DBI database connectivity to replace your SAS data step, then use the RODBC package to import data into R convenience stores as appropriate. Steve Miller -Original Message- From: [EMAIL

[R] message posting

2006-04-21 Thread Steven Lacey
Hi, I sent two emails to the R help list and got no reply. While this may be my question, it is unlike the users of this list not to reply (thankfully!). I checked for my message using the archive for April 2006 and found the following where the text of message should have been: An embedded

Re: [R] Need R code

2006-04-21 Thread bogdan romocea
Here's an example. lst - list() for (i in 1:5) { lst[[i]] - data.frame(v=sample(1:20,10),sample(1:5,10,replace=TRUE)) colnames(lst[[i]])[2] - paste(x,i,sep=) } dfr - lst[[1]] for (i in 2:length(lst)) dfr - merge(dfr,lst[[i]],all=TRUE) dfr - dfr[order(dfr[,1]),] print(dfr)

Re: [R] message posting

2006-04-21 Thread Gavin Simpson
On Fri, 2006-04-21 at 09:22 -0400, Steven Lacey wrote: Hi, I sent two emails to the R help list and got no reply. While this may be my question, it is unlike the users of this list not to reply (thankfully!). I checked for my message using the archive for April 2006 and found the

Re: [R] message posting

2006-04-21 Thread mike waters
This can be checked/set from the toolbar at the top via the drop-down box next to the Compose in this mail format section displayed using: Tools-Options-Mail Format HTH Regards Mike A picture may be worth a thousand words, but HTML adds far more than a thousand bytes to an email.

[R] aov contrasts residual error calculation

2006-04-21 Thread Steven Lacey
Hi, I am using aov with an Error component to model some repeated measures data. By repeated measures I mean the data look something like this... subjABC 1 411 15 2 312 17 3 5914 4 610 18

[R] Need R-help

2006-04-21 Thread stat stat
Dear r users, I was trying to fit a garch(1,1) model to my dataset. But while executing I got a warning message NaNs produced in: sqrt(pred$e). And got the estimated sd's along with five NA, but as per my best knowledge I should get only one NA i.e. corresponding to the first observation

[R] where is the fitted value of autoregressive AR function in R?

2006-04-21 Thread Michael
myAR3=ar(mytimeseries, FALSE, 3); print(myAR3); Call: ar(x = mytimeseries, aic = FALSE, order.max = 3) Coefficients: 123 0.9220 0.0039 -0.1314 names(myAR) [1] orderar var.pred x.mean aic [6] n.used order.maxpartialacf resid

[R] forcing apply() to return data frame

2006-04-21 Thread Federico Calboli
Hi All, I am (almost) successfully using apply() to apply a function recursively on a data matrix. The function is question is as.genotype() from the library 'genetics' apply(subset(chr1, names$breed == 'lab'),2,as.genotype,sep =) Unfortuantely apply puts it's results into a matrix object

Re: [R] there is no xls reader in R?

2006-04-21 Thread Johnsons
I have used the following successfully: xls = odbcConnectExcel(fname) Rawdata.temp = sqlQuery( chan, select * from [sheet1$], max=2800 ) close(xls) Presuming your data is in the Excel tab sheet1. Of course, this assumes that column headers are in the first row. Greg Johnson -Original

Re: [R] R and ViM

2006-04-21 Thread Bill West
Yes, my r.vim ftplugin file is a windows only solution. It is not yet at the point, however, where it may be called a solution. :) It currently only handles single lines of code. I posted it before only as a proof of concept. I should have been clearer in my earier post. For my Linux

[R] programming advice?

2006-04-21 Thread Charles Annis, P.E.
Dear R-helpers: I am doing some exploratory programming and am considering a routine that has several other routines defined within it, so that I can avoid a large and messy global re-programming to avoid naming conflicts. My question is this: Because it is interpreted, does R have to

Re: [R] forcing apply() to return data frame

2006-04-21 Thread Thomas Lumley
On Fri, 21 Apr 2006, Federico Calboli wrote: Hi All, I am (almost) successfully using apply() to apply a function recursively on a data matrix. The function is question is as.genotype() from the library 'genetics' apply(subset(chr1, names$breed == 'lab'),2,as.genotype,sep =)

Re: [R] programming advice?

2006-04-21 Thread Duncan Murdoch
On 4/21/2006 10:45 AM, Charles Annis, P.E. wrote: Dear R-helpers: I am doing some exploratory programming and am considering a routine that has several other routines defined within it, so that I can avoid a large and messy global re-programming to avoid naming conflicts. My question is

Re: [R] programming advice?

2006-04-21 Thread Thomas Lumley
On Fri, 21 Apr 2006, Charles Annis, P.E. wrote: Dear R-helpers: I am doing some exploratory programming and am considering a routine that has several other routines defined within it, so that I can avoid a large and messy global re-programming to avoid naming conflicts. My question is

Re: [R] programming advice?

2006-04-21 Thread Seth Falcon
Charles Annis, P.E. [EMAIL PROTECTED] writes: Dear R-helpers: I am doing some exploratory programming and am considering a routine that has several other routines defined within it, so that I can avoid a large and messy global re-programming to avoid naming conflicts. My question is

Re: [R] forcing apply() to return data frame

2006-04-21 Thread Marc Schwartz (via MN)
On Fri, 2006-04-21 at 07:37 -0700, Thomas Lumley wrote: On Fri, 21 Apr 2006, Federico Calboli wrote: Hi All, I am (almost) successfully using apply() to apply a function recursively on a data matrix. The function is question is as.genotype() from the library 'genetics'

Re: [R] How does ccf() really work?

2006-04-21 Thread Spencer Graves
The standard estimate of cross correlation uses the same denominator for all lags AND ignores the reduction in the number of observations. Consider the following: a. - a-mean(a) b. - b-mean(b) SSa - sum(a.^2) SSb - sum(b.^2) SaSb - sqrt(SSa*SSb) sum(a.*b.)/SaSb # 0.618 = cor(a, b)

[R] R graph strip in Greek Letters

2006-04-21 Thread zj yang
Hi all, I have one question on xyplot() function. I am trying to produce a graph by this code. tmp - data.frame(a=rnorm(20), b=rnorm(20), rho=factor(rep(1:2, c(10,10))), k=factor(rep(1:5,4))) tmp.lattice - xyplot(a ~ b | rho*k, data=tmp,

Re: [R] forcing apply() to return data frame

2006-04-21 Thread Fredrik Karlsson
Hi, There is a frameApply fynction in the library gdata from the gregmisc package. The manual says it is like the function 'by', but returns a data.frame. Maybe this is something for you? /Fredrik 2006/4/21, Federico Calboli [EMAIL PROTECTED]: Hi All, I am (almost) successfully using

Re: [R] aov contrasts residual error calculation

2006-04-21 Thread Jacques Veslot
why not using lme() ? first, you need transform data: dat2 - as.data.frame(lapply(subset(dat, sel=-c(A,B,C)), rep, 3)) dat2$y - unlist(subset(dat, sel=c(A,B,C)), F, F) dat2$cond - factor(rep(c(A,B,C), each=nrow(dat))) dat2$inter -

Re: [R] programming advice?

2006-04-21 Thread Charles Annis, P.E.
Many thanks to Duncan Murdoch, Thomas Lumley, Patrick Burns, and Seth Falcon, for the illuminating advice, which will be found in the R-help archives. Charles Annis, P.E. [EMAIL PROTECTED] phone: 561-352-9699 eFax: 614-455-3265 http://www.StatisticalEngineering.com -Original

Re: [R] aov contrasts residual error calculation

2006-04-21 Thread Steven Lacey
Jacques, Thanks for the reply. I am not using lme because I don’t have the time to understand how it works and I have a balanced design, so typcial linear modelling in aov should be sufficient for my purposes. Down the road I plan to learn lme, but I'm not there yet. So any suggestions with

Re: [R] R debugging options

2006-04-21 Thread Spencer Graves
Regarding a function that lists functions, have you considered getFunctions in library(svIDE)? You need to provide the argument, as in getFunctions(1); getFunctions() returns an error message. Beyond this, the objects function in S-Plus (at least version 6.2) has a

Re: [R] aov contrasts residual error calculation

2006-04-21 Thread Jacques Veslot
with error strata, aov() becomes difficult too... a nice and brief presentation of mixed models with r by John Fox at: http://cran.r-project.org/doc/contrib/Fox-Companion/appendix.html Steven Lacey a écrit : Jacques, Thanks for the reply. I am not using lme because I don’t have the time

[R] Titles in MAplots

2006-04-21 Thread Brooks, Anthony B
Hi Does anyone know how to set the titles in MAplots to just show the CEL file name? So far I have; #define 'Array' as object containing CEL names Array - col.names(Data) #open bmp and make a separate bmp for each MAplot bmp(C:/MAplot%03d.bmp) #remove the annotation and minimise margins

Re: [R] aov contrasts residual error calculation

2006-04-21 Thread Spencer Graves
Hi, Steve: I'm on the opposite extreme: I don't know aov, and given that it is largely obsolete, I'm not too eager to learn it. spencer graves Steven Lacey wrote: Jacques, Thanks for the reply. I am not using lme because I don’t have the time to understand how it

Re: [R] R graph strip in Greek Letters

2006-04-21 Thread Sundar Dorai-Raj
zj yang wrote: Hi all, I have one question on xyplot() function. I am trying to produce a graph by this code. tmp - data.frame(a=rnorm(20), b=rnorm(20), rho=factor(rep(1:2, c(10,10))), k=factor(rep(1:5,4))) tmp.lattice -

Re: [R] R and ViM

2006-04-21 Thread Jeffrey Horner
Bill West wrote: Yes, my r.vim ftplugin file is a windows only solution. It is not yet at the point, however, where it may be called a solution. :) It currently only handles single lines of code. I posted it before only as a proof of concept. I should have been clearer in my earier

Re: [R] Considering port of SAS application to R

2006-04-21 Thread Werner Wernersen
Now it sounds like a consense that it is not advisable to do everything in R but to use a database system and scripting language instead for the rough work. Thanks for all of your suggestions! Werner Steve Miller [EMAIL PROTECTED] schrieb: Good suggestion. Multiple gigabytes is stretching

[R] AIC and numbers of parameters

2006-04-21 Thread Philip Stephens
Hi. I'm fairly new to R and have a quick question regarding AIC, logLik and numbers of parameters. I see that there has been some correspondence on this in the past but none of the threads seem to have been satisfactorily resolved. I have been trying to use R to obtain AIC for fitted models

Re: [R] lmer{lme4}, poisson family and residuals

2006-04-21 Thread Ben Bolker
Amelie LESCROEL lescroel_cebc at no-log.org writes: Hello, I’m trying to fit the following model: Dependent variable: MAXDEPTH (the maximum depth reached by a penguin during a given dive) Fixed effects: SUCCESSMN (an index of the “individual quality” of a bird), STUDYDAY (the day of

Re: [R] second try; writing user-defined GLM link function

2006-04-21 Thread Jessi Brown
Ok, I persuaded predict.glm to work with the default type (link) instead of response. However, I don't think it did what I expected it to do, as the output (which should be log-odds, right?) leads to non-sensical final daily survival rates (daily survival rate = probability of surviving that

Re: [R] Parallel computing with the snow package: external file I/O possible?

2006-04-21 Thread Martin Morgan
Waichler, Scott R [EMAIL PROTECTED] writes: genoud()) should be independent. However, in the code below, the directory created by each node has the same random number in its name. This is probably because 'random' numbers are generated starting from a 'seed', the seed is determined (by

[R] question in fitting AR model in time series?

2006-04-21 Thread Michael
How to force some AR coefficients to be ZERO and only allow the function ar in R to change the other coefficients? Thanks a lot! [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list

Re: [R] Hmisc + summarize + quantile: Why only quantiles for first variable in data frame?

2006-04-21 Thread Kim Milferstedt
Hi Frank Harrell, thanks for the response. I understand your comment but I wasn't able to find (or recognize) an answer on how to tell FUN explicitely to use matrix operations. Would you be so kind and give me an example? Thanks so much, Kim Please read the documentation and see the

Re: [R] question in fitting AR model in time series?

2006-04-21 Thread Rolf Turner
See argument ``fixed'' in help(arima). cheers, Rolf Turner [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] Creat new column based on condition

2006-04-21 Thread Sachin J
Hi, How can I accomplish this task in R? V1 10 20 30 10 10 20 Create a new column V2 such that: If V1 = 10 then V2 = 4 If V1 = 20 then V2 = 6 V1 = 30 then V2 = 10 So the O/P looks like this V1 V2 10 4 20 6 30 10

Re: [R] Creat new column based on condition

2006-04-21 Thread Gabor Grothendieck
Try: V1 - matrix(c(10, 20, 30, 10, 10, 20), nc = 1) V2 - 4 * (V1 == 10) + 6 * (V1 == 20) + 10 * (V1 == 30) or V2 - matrix(c(4, 6, 10)[V1/10], nc = 1) On 4/21/06, Sachin J [EMAIL PROTECTED] wrote: Hi, How can I accomplish this task in R? V1 10 20 30 10 10 20

Re: [R] Creat new column based on condition

2006-04-21 Thread Sachin J
Hi Gabor, The first one works fine. Just out of curiosity, in second solution: I dont want to create a matrix. I want to add a new column to the existing dataframe (i.e. V2 based on the values in V1). Is there a way to do it? TIA Sachin Gabor Grothendieck [EMAIL PROTECTED]

Re: [R] Creat new column based on condition

2006-04-21 Thread Gabor Grothendieck
DF - data.frame(V1 = c(10, 20, 30, 10, 10, 20)) DF$V2 - with(DF, 4 * (V1 == 10) + 6 * (V1 == 20) + 10 * (V1 == 30)) DF$V3 - c(4, 6, 10)[DF$V1/10] or DF - data.frame(V1 = c(10, 20, 30, 10, 10, 20)) DF - transform(DF, V2 = 4 * (V1 == 10) + 6 * (V1 == 20) + 10 * (V1 == 30), V3 = c(4, 6,

Re: [R] how to control the data type

2006-04-21 Thread Pontarelli, Brett
You can also try: round(runif(1)*10^4)/10^4 --Brett -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dirk Eddelbuettel Sent: Thursday, April 20, 2006 8:18 PM To: zhongmiao wang Cc: r-help@stat.math.ethz.ch Subject: Re: [R] how to control the data type

Re: [R] R debugging options

2006-04-21 Thread John Fox
Dear Spencer, I wasn't aware of getFunctions(), though I've now taken a look at it. It's pretty similar to listFunctions() (from my email to the list), except that getFunctions() uses exists() rather than is.function() to test whether an object is a function. There must be a reason for this, but

Re: [R] Creat new column based on condition

2006-04-21 Thread Duncan Murdoch
On 4/21/2006 4:05 PM, Sachin J wrote: Hi, How can I accomplish this task in R? V1 10 20 30 10 10 20 Create a new column V2 such that: If V1 = 10 then V2 = 4 If V1 = 20 then V2 = 6 V1 = 30 then V2 = 10 Gabor's solution is fine;

Re: [R] Hmisc + summarize + quantile: Why only quantiles for first variable in data frame?

2006-04-21 Thread Frank E Harrell Jr
Kim Milferstedt wrote: Hi Frank Harrell, thanks for the response. I understand your comment but I wasn't able to find (or recognize) an answer on how to tell FUN explicitely to use matrix operations. Would you be so kind and give me an example? Thanks so much, Kim See

Re: [R] Creat new column based on condition

2006-04-21 Thread Peter Dalgaard
Duncan Murdoch [EMAIL PROTECTED] writes: On 4/21/2006 4:05 PM, Sachin J wrote: Hi, How can I accomplish this task in R? V1 10 20 30 10 10 20 Create a new column V2 such that: If V1 = 10 then V2 = 4 If V1 = 20 then

Re: [R] Creat new column based on condition

2006-04-21 Thread Frank E Harrell Jr
Duncan Murdoch wrote: On 4/21/2006 4:05 PM, Sachin J wrote: Hi, How can I accomplish this task in R? V1 10 20 30 10 10 20 Create a new column V2 such that: If V1 = 10 then V2 = 4 If V1 = 20 then V2 = 6 V1 = 30 then V2 = 10 Gabor's

Re: [R] Creat new column based on condition

2006-04-21 Thread Gabor Grothendieck
Here is a compact solution using approx: DF$V2 - approx(c(10, 20, 30), c(4,6,10), DF$V1)$y On 4/21/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: DF - data.frame(V1 = c(10, 20, 30, 10, 10, 20)) DF$V2 - with(DF, 4 * (V1 == 10) + 6 * (V1 == 20) + 10 * (V1 == 30)) DF$V3 - c(4, 6,

Re: [R] online tutorials

2006-04-21 Thread John Kane
For real newbies like myself , good tutorial are had to find, and much of the documentation is completelly opaque at first. :) However I would recommend http://www.math.ilstu.edu/dhkim/Rstuff/Rtutor.html as a good place to start with real basics. It is a bit like the Sample session in the

Re: [R] how to control the data type

2006-04-21 Thread John Kane
Have a look at ?round for one way. - Original Message From: zhongmiao wang [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Thursday, April 20, 2006 11:00:25 PM Subject: [R] how to control the data type Hello: I am generating a random number with rnorm(1). The generated number has

[R] Feeding a sequence to a function

2006-04-21 Thread Frank Black
Dear all, I have written a function that takes two arguments, and I would like to feed it all pairs of values from -10 to 10. The following code works for all pairs of values between 1 and 10, but given R's indexing, I can't extend it back to cover the zeros and the negative values. I'd

[R] plotting order in a barchart.: two problems

2006-04-21 Thread John Kane
I am new at R and have a simple problem, I think. I have a matrix: [,1] [,2] [,3] a.5 2.4 b4 3.44 c4 4 2 I want a barchart with the [,1] column plotted as the left-most group on a vertical bar chart or as the top group on a horizontal chart. However

Re: [R] how to control the data type

2006-04-21 Thread Berton Gunter
print(rnorm(1),digits=3) The key is understanding the difference between the value and what is printed automatically with the default number of digits given by the options() value currently in effect. ?options for digits -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA

Re: [R] a question on df of linear model

2006-04-21 Thread Spencer Graves
Short answer: 3=8-5. Longer answer: (1) mf4Orth.lm: The degrees of freedom for the output of lm is 5 = the 4 linear regression parameters + the estimated residual standard deviation. (2) fm2Orth.lme: The lme fit with 8 degrees of freedom adds to

[R] Minor documentation issue

2006-04-21 Thread Vivek Satsangi
I looked at ?seq -- -- Vivek Satsangi Rochester, NY USA __ 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.html

[R] Minor documentation issue

2006-04-21 Thread Vivek Satsangi
(Sorry about the last email which was incomplete. I hit 'send' accidentally). I looked at ?seq. One of the forms given under Usage is seq(from). This would be the form used if seq is called with only one argument. However, this should actually say seq(to). For example, seq(1) [1] 1 seq(3) [1] 1

Re: [R] Minor documentation issue

2006-04-21 Thread Gabor Grothendieck
It is matched by the first argument which is called from even though, as the documentation indicates under the explanation of the last form, it refers to the ending value. Note, for example, that seq(from = 3) gives 1:3 and not 3:1. Also the help file does say: The interpretation of the

Re: [R] Minor documentation issue

2006-04-21 Thread Duncan Murdoch
On 4/21/2006 9:26 PM, Vivek Satsangi wrote: (Sorry about the last email which was incomplete. I hit 'send' accidentally). I looked at ?seq. One of the forms given under Usage is seq(from). This would be the form used if seq is called with only one argument. However, this should actually say

[R] problems performing bootstrap

2006-04-21 Thread John Sorkin
R2.1.1 Windows XP I have defined a function: best-function (x) { xx-pmax(x[,1],x[,2]) pvalue-t.test(xx,mu=100) pvalue$p.value } and then I try to bootstrap best as follows: boot( array(rnorm(30,100,1),c(15,2)),best,R=100 ) and get the following message: Error in statistic(data, original,

Re: [R] Nonlinear Regression model: Diagnostics

2006-04-21 Thread Spencer Graves
I don't know how to get the error message you reported. The following modification of the first 'nls' example worked for me: DNase1 - subset(DNase, Run == 1) fm1DNase1 - nls( density ~ SSlogis(log(conc), Asym, xmid, scal), DNase1) profile(fm1DNase1) fm1DNase1.2 - nls( density ~

Re: [R] problems performing bootstrap

2006-04-21 Thread Andrew Robinson
John, boot requires that the function accept an index (or similar), which is used to communicate the permutation of x to the function. Try instead: best - function (x,i) { xx - pmax(x[i,1],x[i,2]) pvalue - t.test(xx,mu=100) pvalue$p.value } Cheers Andrew On Fri, Apr 21, 2006 at