[R] How to pack my stuff into a package (library, collection)?

2008-04-07 Thread Tribo Laboy
Hello, I am new useR, I have written some functions, which I currently use by source-ing them from the files. That's OK, but when I my functions start counting in the tens and hundreds I'd be glad to be able to type help.search(my_obscure_fun) and get a sensible reply. I also want to be able to

Re: [R] function for between-groups covariance matrix?

2008-04-07 Thread Prof Brian Ripley
If this is a large dataset, you probably do not want the covariance matrix but some decomposition of it. What are you intending to do with it? If you look at the code for MASS:::lda.default you will see how discriminant analysis can be done more stably without ever computing the covarinace

Re: [R] How to pack my stuff into a package (library, collection)?

2008-04-07 Thread talepanda
Though R is indeed cross-platform language, how to build depends on the environment. This is case for most cross-platform software, library, etc. Basically cross-platform means cross-platform for users. When you build packages, you are not user but developer. Rtools will help you.

[R] tweedie model

2008-04-07 Thread Roslina Zakaria
Hi R-users, I have this code below for tweedie inverse, but I don’t understand why it doesn’t give zero for some of r1 values?   r1 - runif(31,0,1) p0 - 0.72 ; p - 1.63; mu - 1.48; phi - 9.61   tweedie.inv - function(rand,p0,p,mu,phi) {  y - rand    ind - rand p0    y[ind] - 0    y[!ind] -

Re: [R] How to pack my stuff into a package (library, collection)?

2008-04-07 Thread Simon Blomberg
On Mon, 2008-04-07 at 15:13 +0900, Tribo Laboy wrote: Hello, I am new useR, I have written some functions, which I currently use by source-ing them from the files. That's OK, but when I my functions start counting in the tens and hundreds I'd be glad to be able to type

Re: [R] How to pack my stuff into a package (library, collection)?

2008-04-07 Thread Hans W. Borchers
Tribo Laboy tribolaboy at gmail.com writes: [...] These seem to include among others Perl and compiler. But R is an interpreted and cross-platform language, I don't understand the need for additional platform specific tools just to call a user collection of R-files. Anyone knows of a smooth

[R] plot with standar deviation (use abline and mad())

2008-04-07 Thread jarod_v6
Hi list Maybe someone can help with the following problem (thanks in advance): I need to analisy a long list of data time \fluoscence I want to make one plot with standard deviation and the average data... Could you suggest me how to make that.. The data have this distribution: How can read and

Re: [R] Builind C code for R with cygwin [C1]

2008-04-07 Thread Prof Brian Ripley
And I guess you installed R for Windows and then tried to do this? You must either 1) Build R under cygwin as a Unix-alike or 2) Use the Rtools make if building R for Windows. R for Windows is a Windows program, and cygwin's make does not accept Windows' file paths any more (it used to). On

Re: [R] Builind C code for R with cygwin [NC]

2008-04-07 Thread sylvain . archenault
Ok thanks, I understand what's wrong. [EMAIL PROTECTED] 07/04/08 10:26 AM To Sylvain ARCHENAULT/fr/[EMAIL PROTECTED] cc r-help@r-project.org Subject Re: [R] Builind C code for R with cygwin [C1] And I guess you installed R for Windows and then tried to do this? You must either 1)

Re: [R] How to pack my stuff into a package (library, collection)?

2008-04-07 Thread Tribo Laboy
Hi Simon, I did the example given in package.skeleton f - function(x,y) x+y g - function(x,y) x-y d - data.frame(a=1, b=2) e - rnorm(1000) package.skeleton(list=c(f,g,d,e), name=mypkg) then tried: library(mypkg) Error in library(mypkg) : there is no package called 'mypkg' After checking

Re: [R] Loop for in R to generate several variables

2008-04-07 Thread Gustaf Rydevik
On Mon, Apr 7, 2008 at 11:31 AM, arpino [EMAIL PROTECTED] wrote: Hi everybody, I have to create several variables of this form: Yind = L0 + L1*X1 + L2*X2 + L3*X3 + K*Cind + n where ind varires in {1,...,10} I thought to this loop for but it does not work: for (ind in 1:10) {

[R] Loop for in R to generate several variables

2008-04-07 Thread arpino
Hi everybody, I have to create several variables of this form: Yind = L0 + L1*X1 + L2*X2 + L3*X3 + K*Cind + n where ind varires in {1,...,10} I thought to this loop for but it does not work: for (ind in 1:10) { Yind = L0 + L1*X1 + L2*X2 + L3*X3 + K*Cind + n } Any suggestions?

Re: [R] How to pack my stuff into a package (library, collection)?

2008-04-07 Thread Duncan Murdoch
Tribo Laboy wrote: Hi Simon, I did the example given in package.skeleton f - function(x,y) x+y g - function(x,y) x-y d - data.frame(a=1, b=2) e - rnorm(1000) package.skeleton(list=c(f,g,d,e), name=mypkg) then tried: library(mypkg) Error in library(mypkg) : there is no package

Re: [R] Executing a telnet session from R

2008-04-07 Thread Ted Harding
On 06-Apr-08 23:14:18, Dennis Fisher wrote: Colleagues I am working in a Linux OS with R 2.6.2. I need to execute a telnet session to another Linux machine from R, perform some operations, then return to the original computer. When I am in an R session, this is easy to accomplish by

Re: [R] Loop for in R to generate several variables

2008-04-07 Thread Barry Rowlingson
Gustaf Rydevik wrote: On Mon, Apr 7, 2008 at 11:31 AM, arpino [EMAIL PROTECTED] wrote: Hi everybody, I have to create several variables of this form: Yind = L0 + L1*X1 + L2*X2 + L3*X3 + K*Cind + n where ind varires in {1,...,10} look up ?assign and ?get, i.e: for (ind in 1:10) {

Re: [R] getting numeric arrays from data frame

2008-04-07 Thread John Fox
Dear Mark, A data frame is a list, and thus foo[5] returns a one-element list, while foo[[5]] returns a vector. One can also subscript a data frame as a matrix, so foo[1, 5] returns the element in the 1st row, 5th column, foo[,5] returns the 5th column as a vector, and foo[,c(3, 5)] returns a

Re: [R] Thinking about using two y-scales on your plot?

2008-04-07 Thread Richard Cotton
thegeologician wrote: A plot of the actual temperature during a year (or thousands of years, as people in palaeoclimate-studies are rather used to) is just so much more intuitive, than some correlation-coefficients or such. I know I'm largely speaking to statisticians in this forum, but

Re: [R] sorting matrix for rownames

2008-04-07 Thread talepanda
Did you mean: x-matrix(runif(16),4,4,dimnames=list(sample(letters[1:4]),NULL)) x [,1] [,2] [,3] [,4] a 0.5132191 0.09121766 0.9470733 0.6311042 d 0.3621340 0.43193846 0.8536142 0.9286477 c 0.8597558 0.48168800 0.2845544 0.4108180 b 0.4767520 0.72526768 0.2105142

[R] sorting matrix for rownames

2008-04-07 Thread Paul Hammer
hi members, i tried to sort my whole matrix X for its rownames. the rownames are unsorted id numbers: i tried it with sort(rownames(X)) or order(rownames(X)) but then i get only a vector of the rownames:(... any suggestions? thanks paul __

Re: [R] sorting matrix for rownames

2008-04-07 Thread ONKELINX, Thierry
X[order(rownames(X)), ] ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest Cel biometrie, methodologie en kwaliteitszorg / Section biometrics, methodology and

Re: [R] plot with standar deviation (use abline and mad())

2008-04-07 Thread Henrique Dallazuanna
Perhaps: plot(ps) with(ps, abline(v=mean(time), h=mean(fluorescence), col=red, lty=dashed)) On Mon, Apr 7, 2008 at 5:19 AM, jarod_v6 [EMAIL PROTECTED] wrote: Hi list Maybe someone can help with the following problem (thanks in advance): I need to analisy a long list of data time

[R] pie graphic

2008-04-07 Thread Marco Chiapello
Hi, My problem is: I have many data to plot as pie-chart, so the labels are not readable! Is there a way to solve my problem? For example is it possible move the labels more far to the graphic? Thanks in advance Marco __ R-help@r-project.org mailing

Re: [R] pie graphic

2008-04-07 Thread Julien Barnier
Hi, I have many data to plot as pie-chart, so the labels are not readable! Is there a way to solve my problem? For example is it possible move the labels more far to the graphic? I'm afraid I can't really answer your question. But in the pie function documentation, you can read the following

[R] Published or in-press work using nlme or lme4

2008-04-07 Thread Shravan Vasishth
Dear R users, Many of you are aware of the statistical package lme4 used in R for carrying out mixed-effects modeling. The lme4 R-Forge website [ https://r-forge.r-project.org/projects/lme4/] is going to maintain a list of all dissertations and articles (accepted for publication, in press, or

[R] Problem with garchFit [C1]

2008-04-07 Thread sylvain . archenault
Hello, I have problems with garchFit. When trying to fit a time series, I got the following error : garchFit(~garch(1,1),data=x,trace=F) Error in solve.default(fit$hessian) : Lapack routine dgesv: system is exactly singular The method works fine on series generating by garchSim. What

Re: [R] pairwise.t.test for paired data

2008-04-07 Thread Michael A. Miller
Peter == Peter Dalgaard [EMAIL PROTECTED] writes: (Oddly enough, this issue hasn't come up in the 6+ years that the function has existed, and then it pops up twice with little over a week between, see the thread started by James Root on March 26.) Odd indeed - this issue

Re: [R] pairwise.t.test for paired data

2008-04-07 Thread Peter Dalgaard
Michael A. Miller wrote: Peter == Peter Dalgaard [EMAIL PROTECTED] writes: (Oddly enough, this issue hasn't come up in the 6+ years that the function has existed, and then it pops up twice with little over a week between, see the thread started by James Root

Re: [R] How to pack my stuff into a package (library, collection)?

2008-04-07 Thread Tribo Laboy
On Mon, Apr 7, 2008 at 8:02 PM, Duncan Murdoch [EMAIL PROTECTED] wrote: Tribo Laboy wrote: Hi Simon, I did the example given in package.skeleton f - function(x,y) x+y g - function(x,y) x-y d - data.frame(a=1, b=2) e - rnorm(1000) package.skeleton(list=c(f,g,d,e), name=mypkg)

[R] rgl_0.70.553.tar.gz install

2008-04-07 Thread Matthew . Cook
Hi, I am an R beginner and wish to create some 3d plots. I have managed to install the rgl library and save 3d plots, but only as an R file. I wish to use rgl.snapshot so I can create a .png file and the plot can be used in LaTex. The function rgl.snapshot does not work (i get an error failed

Re: [R] How to pack my stuff into a package (library, collection)?

2008-04-07 Thread Duncan Murdoch
On 4/7/2008 9:33 AM, Tribo Laboy wrote: ... Hi Duncan, Thanks for your reply. I checked the Rtools and the other relevant tools. I will most probably install them, although unwillingly. Unwillingly, because I like my current setup very much, which is a portable installation of R. I run

[R] test for the variance of a normal population

2008-04-07 Thread Alexandra Ramos
Hi, Does anyone know an instruction to perform a test (or to construct a confidence interval) for the variance of a normal population (distribution). The test statistic is (n-1)*S´^2/sigma^2 and has chi square (n-1) distribution. Thank you, Alexandra [[alternative HTML

[R] tcltk issue remains

2008-04-07 Thread Ingmar Visser
Dear R-help, I'm trying to load the fGarch package and keep running into problems with tcltk: After succesfully instaling fGarch (and dependencies) I get: library(fGarch) Loading required package: fBasics Loading required package: fImport Loading required package: fSeries Loading required

[R] ggplot: Axis lines

2008-04-07 Thread Pedro de Barros
Dear All, I am trying to print some simple ggplot plots, but I would like to have no gridlines, and no border. I have achieved this using ggopt(grid.lines='NA', border.lines='NA'). However, this also clears the axis lines, and reading the help, it looks like the axis objects have only two

Re: [R] tcltk issue remains

2008-04-07 Thread Pablo G Goicoechea
Hi Ingmar Have you opened X11? hope it helps Pablo Ingmar Visser escribió: Dear R-help, I'm trying to load the fGarch package and keep running into problems with tcltk: After succesfully instaling fGarch (and dependencies) I get: library(fGarch) Loading required package: fBasics

[R] Matching pairs from two data frame

2008-04-07 Thread solea
I am looking for a solution to match 2 dataframes from pairs of values (x and y) as indicated thereafter : First dataframe : DATA1 xy a 1 30 400.2 2 21 130 0.3 Second dataframe DATA2 xy b 1 30 401 2 40 303 3 20 407 4 1130 2 5

[R] problem- Unable To Locate DLL

2008-04-07 Thread Anaid Diaz
Hi I am trying to install lme4 package, but have problems intalling matrix package. I get the following error: RGui: Rgui.exe -Unable To Locate DLL the dynamic link library Rblas could not found in the specified path C:\Program

[R] problem with normality tests using fBasics

2008-04-07 Thread Ricardo Avelino
Dear members, I'm having some problems using the normality tests in fBasics (adTest, jarqueberaTest, ksnormTest). I'm using a Debian system and I updated my R version recently to 2.6.2 (2008-02-08) and all the R packages using apt-get. The code is here (in Portuguese) with the error message:

[R] basehaz and newdata

2008-04-07 Thread mah
I am unable to get the basehaz function to apply a proportional hazards model to a new data frame. I replicated my specific situation with the example for coxph in the help, where I changed the x value of the first record from 0 to 1. Is there something incorrect in the syntax that I am using?

Re: [R] How to pack my stuff into a package (library, collection)?

2008-04-07 Thread Tribo Laboy
On Mon, Apr 7, 2008 at 11:09 PM, Duncan Murdoch [EMAIL PROTECTED] wrote: On 4/7/2008 9:33 AM, Tribo Laboy wrote: ... Hi Duncan, Thanks for your reply. I checked the Rtools and the other relevant tools. I will most probably install them, although unwillingly. Unwillingly, because

Re: [R] pairwise.t.test for paired data

2008-04-07 Thread Peter Dalgaard
Peter Dalgaard wrote: Michael A. Miller wrote: Peter == Peter Dalgaard [EMAIL PROTECTED] writes: (Oddly enough, this issue hasn't come up in the 6+ years that the function has existed, and then it pops up twice with little over a week between,

[R] Translating NLMIXED in nlme

2008-04-07 Thread giovanni parrinello
Dear All, reading an article by Rodolphe Thiebaut and Helene Jacqmin-Gadda (Mixed models for longitudinal left-censored repeated measures) I have found this program in SAS proc nlmixed data=TEST QTOL=1E-6; parms sigsq1=0.44 ro=0.09 sigsq2=0.07 sigsqe=0.18 alpha=3.08 beta=0.43; bounds $B!](B1 ro

Re: [R] Thinking about using two y-scales on your plot?

2008-04-07 Thread Johannes Hüsing
Am 07.04.2008 um 12:24 schrieb Richard Cotton: thegeologician wrote: Of course, these plots could be plotted separately with a common x-axis, it's just a matter of saving space and of being used to that kind of graph. I can't imagine anyone being falsely lead to a thought like oh gosh,

[R] java applets

2008-04-07 Thread lamack lamack
Dear all, is it possible to implement some statistics data analysis based on R and javascript? I would like to construct java applets using R functions. Is it possible? Where can I find examples? Best regards. LL _

[R] Extract values from a named array

2008-04-07 Thread Gang Chen
Sorry for this dumb question. Suppose I have a named array ww defined as ww - 1:5 names(ww) - c(a, b, c, d, e) How can I extract the whole array of numbers without the names? ww[1:5] does not work while ww[[1]] can only extract one number at a time. Thanks, Gang

Re: [R] Matching pairs from two data frame

2008-04-07 Thread Henrique Dallazuanna
Try: merge(DATA1, DATA2) On Mon, Apr 7, 2008 at 11:20 AM, solea [EMAIL PROTECTED] wrote: I am looking for a solution to match 2 dataframes from pairs of values (x and y) as indicated thereafter : First dataframe : DATA1 xy a 1 30 400.2 2 21 130 0.3 Second

Re: [R] rgl_0.70.553.tar.gz install

2008-04-07 Thread Duncan Murdoch
On 4/7/2008 11:29 AM, [EMAIL PROTECTED] wrote: Thanks Duncan, I only installed R this morning so it has taken me a while to get used to the coding. Having found and installed the rjl_0.77 zipped file into R, the problem still occurs. The plot is being used in correspondence analysis. The

Re: [R] basehaz and newdata

2008-04-07 Thread Roland Rau
Hi, just looked at it briefly and I don't know if it is the real cause for your problems. But 'data' as well as 'newdata' require a data.frame and not a list as input. Does this help? Best, Roland mah wrote: I am unable to get the basehaz function to apply a proportional hazards model to

Re: [R] [OT] Typesetting / highlighting R code in Latex

2008-04-07 Thread Romain Francois
Hi, highlight is pretty good, http://www.andre-simon.de/ this is what I have used to build this website: http://addictedtor.free.fr/graphiques/. It generates latex code too. See this page as well to get it to work with R. http://www.yihui.name/en/read.php/6.htm With a bit a processing, it

Re: [R] R-Logo in \LaTeX

2008-04-07 Thread Jean lobry
Hmmm, i've downloaded your pdf, and it is clearly ugly at 400%. I'm talking about the Rlogo.pdf file. E.g. i'm not sure that it would look good on an A0 poster. Gabor, you're right, I didn't think about the A0 poster case. You will find here a vectorized version of the Rlogo in eps, pdf and svg

Re: [R] Extract values from a named array

2008-04-07 Thread Henrique Dallazuanna
Try: as.numeric(ww) On Mon, Apr 7, 2008 at 1:33 PM, Gang Chen [EMAIL PROTECTED] wrote: Sorry for this dumb question. Suppose I have a named array ww defined as ww - 1:5 names(ww) - c(a, b, c, d, e) How can I extract the whole array of numbers without the names? ww[1:5] does not work

Re: [R] problem- Unable To Locate DLL

2008-04-07 Thread Uwe Ligges
Anaid Diaz wrote: Hi I am trying to install lme4 package, but have problems intalling matrix package. I get the following error: RGui: Rgui.exe -Unable To Locate DLL the dynamic link library Rblas could not found in the specified path C:\Program

Re: [R] Extract values from a named array

2008-04-07 Thread Uwe Ligges
Gang Chen wrote: Sorry for this dumb question. Suppose I have a named array ww defined as ww - 1:5 names(ww) - c(a, b, c, d, e) How can I extract the whole array of numbers without the names? ww[1:5] does not work while ww[[1]] can only extract one number at a time. Use as.vector to

[R] Naming rows oe columns in a data frame.

2008-04-07 Thread filip rendel
Hello there! I have a really basic question. I have extracted some data from a big database. I have ordered the data in to different agegroups in the rows. Now I want to to have labels of the columns which is going to be divided into men , women and totals. How do I give names to a column? My

Re: [R] Extract values from a named array

2008-04-07 Thread Gang Chen
Thanks a lot for the suggestions! Gang On 4/7/08, Uwe Ligges [EMAIL PROTECTED] wrote: Gang Chen wrote: Sorry for this dumb question. Suppose I have a named array ww defined as ww - 1:5 names(ww) - c(a, b, c, d, e) How can I extract the whole array of numbers without the names?

Re: [R] basehaz and newdata

2008-04-07 Thread mah
Thanks Roland, but using data frames does not resolve the issue. See revised code and output below: test1 - data.frame( + time= c(4, 3,1,1,2,2,3), + status=c(1,NA,1,0,1,1,0), + x= c(0, 2,1,1,1,0,0), + sex= c(0, 0,0,0,1,1,1)

Re: [R] Quick fix formatting

2008-04-07 Thread jim holtman
I would guess that your first column is factors. So an 'str' on the dataframe to see what it is made of. You can convert them to numeric: df[[1]] - as.numeric(as.character(df[[1]])) See if you get any NAs for non-numerics that may be in that column On 4/7/08, Jamie Ledingham [EMAIL PROTECTED]

Re: [R] Quick fix formatting

2008-04-07 Thread Richard . Cotton
I have two data frames and am running a loop to match similar rows. However the matching is not working well, and I suspect it is because of the different formats of columns. For example, in col. 1 of dataframe 1 the nummbers are formatted as 1,2,3,4,5,6,7,8,9...31 However in col. 1

Re: [R] basehaz and newdata

2008-04-07 Thread Austin, Matt
I don't believe basehaz takes a newdata argument. args(basehaz) function (fit, centered = TRUE) NULL It simply extracts info from the fitted object. I think you want to use survfit method for coxph objects and then derive/extract what you need. --Matt Matt Austin Global Statistical Leader,

Re: [R] Naming rows oe columns in a data frame.

2008-04-07 Thread jim holtman
colnames(xx) - c('men', 'womem', 'total') On 4/7/08, filip rendel [EMAIL PROTECTED] wrote: Hello there! I have a really basic question. I have extracted some data from a big database. I have ordered the data in to different agegroups in the rows. Now I want to to have labels of the columns

[R] read.table with multiple header lines

2008-04-07 Thread Deborah Kronenberg
Hello, I have difficulties in reading in a text file with multiple (=2) header lines. My table looks like this: id codegr grcode AA AB AC AD time30 40 50 60 1 12341 c 0 1 0 0 2

[R] Width of text displayed in R

2008-04-07 Thread Kalish, Josh
All, I think this is pretty basic but I couldn't find the answer in any source. I have just built my own R for Linux (amd 64). It runs well, but R thinks that it only has 80 characters or so of screen width. I log on with Putty to the box and can stretch it as large as I want. Is there a

[R] re garding Garch prediction mechanism

2008-04-07 Thread rocky787
Hi, I am having some confusion.It has been said that we can only estimate the future values using meanForecast +/- 2*standardDeviation. with 95% confidence.This means using this garch model we can only have a upper and lower limit of the values within which the next actual value is expected to

Re: [R] Width of text displayed in R

2008-04-07 Thread Philipp Pagel
Is there a simple way to tell R to use more screen width when displaying? Yes, there is. E.g.: options(width=110) cu Philipp -- Dr. Philipp Pagel Tel. +49-8161-71 2131 Lehrstuhl für Genomorientierte Bioinformatik Fax. +49-8161-71 2186 Technische

[R] Anova function and glm.nb

2008-04-07 Thread Nelson, Gary (FWE)
Hi All, I am using the glm.nb function from the MASS package (current version) to fit and compare GLMs with negative binomial error distributions. My question is: what is the appropriate method to use in the anova function to compare models? If only one fitted object like

Re: [R] read.table with multiple header lines

2008-04-07 Thread Philipp Pagel
On Mon, Apr 07, 2008 at 07:47:41PM +0200, Deborah Kronenberg wrote: I have difficulties in reading in a text file with multiple (=2) header lines. My table looks like this: idcodegr grcode AA AB AC AD time30 40 50 60

Re: [R] basehaz and newdata

2008-04-07 Thread mah
Yes, Thank you. I did not separate the arguments for basehaz from those for survfit in the documentation. I had been hoping the tedious alignment of the baseline curve with the value of the variables in the new data set would be [somehow] handled for me. On Apr 7, 12:27 pm, Austin, Matt [EMAIL

[R] How to add background color of a 2D chart by quadrant

2008-04-07 Thread tom soyer
Hi, I have a 2D chart that is divided into four quadrants, I, II, III, IV: plot(1:10,ylim=c(0,10),xlim=c(0,10),type=n) abline(v=5,h=5) text(x=c(7.5,7.5,2.5,2.5),y=c(2.5,7.5,7.5,2.5),labels=c(I,II,III,IV)) I would like to fill each quadrant with a background color unique to the quadrant. Does

Re: [R] How to access the attributes of a ggplot?

2008-04-07 Thread hadley wickham
Hi Tribo, I found 'ggopts', but it only returns some of the properties. Say I want to get the x- and y-axis limits, the tickmark locations, legend current position, the legend box and background color and set them to new values. Are these properties easily accessible (and modifiable)

Re: [R] How to add background color of a 2D chart by quadrant

2008-04-07 Thread Greg Snow
The basic approach is: 1. call plot (sets up the main plotting) 2. call rect for each quadrant (or polygon if you prefer) 3. add the points with the points function (replotting any points covered by the rectangles) 4. add any additional notation (calling functions such as text, axis, etc.). If

Re: [R] read.table with multiple header lines

2008-04-07 Thread Gabor Grothendieck
If there are no t's in your file other than in the second line then: read.table(myfile.dat, comment = t, header = TRUE) On Mon, Apr 7, 2008 at 1:47 PM, Deborah Kronenberg [EMAIL PROTECTED] wrote: Hello, I have difficulties in reading in a text file with multiple (=2) header lines. My table

Re: [R] Anova function and glm.nb

2008-04-07 Thread Prof Brian Ripley
The re-estimated version is the principled one -- the other is a computational shortcut. However, what you model might choose depends on why you are doing model selection, and also if there is a subject-specific reason to consider the terms in this order. And if you look in MASS (the book)

[R] predict.lm() question

2008-04-07 Thread Chip Barnaby
Dear R-people ... I'm a new user. I can't get predict.lm() to produce predictions for new independent data. There are some messages in archived help about this problem, but I still don't see my error after reviewing those. I understand that the new independent data must have the same

Re: [R] predict.lm() question

2008-04-07 Thread Duncan Murdoch
On 07/04/2008 5:57 PM, Chip Barnaby wrote: Dear R-people ... I'm a new user. I can't get predict.lm() to produce predictions for new independent data. There are some messages in archived help about this problem, but I still don't see my error after reviewing those. I understand that

Re: [R] predict.lm() question

2008-04-07 Thread Rolf Turner
You called lm() with a predictor named ``D$X'' and called predict.lm() with a predictor name ``X''. Simplest remedy: Use fit - lm(Y ~ X, data = D) Remark: Not a good idea to use ``D'' as the name of your data frame (``D'' is the name of a function --- derivative). Likewise don't

[R] findGlobals on apply

2008-04-07 Thread Christophe Genolini
Hi the list, Considere the following: f - function(x){apply(x,2,mean)} findGlobals(f) findGlobals consideres mean as a global variable, which it is not. Is there a way to tell to findGlobals that mean is a function ? Thanks Christophe __

Re: [R] findGlobals on apply

2008-04-07 Thread Duncan Murdoch
On 07/04/2008 6:24 PM, Christophe Genolini wrote: Hi the list, Considere the following: f - function(x){apply(x,2,mean)} findGlobals(f) findGlobals consideres mean as a global variable, which it is not. Is there a way to tell to findGlobals that mean is a function ? mean is a global

Re: [R] Arbitrary Precision Numbers

2008-04-07 Thread Charles Geyer
Probably not helpful for your particular problem, but the package rcdd also has a fairly limited interface to the GNU MP Bignum library. It does arithmetic on arbitrary precision rationals. Also exact linear programming and computational geometry using arbitrary precision rationals.

Re: [R] Matching pairs from two data frame

2008-04-07 Thread Bill.Venables
Try ?merge d1 - read.table(textConnection( xy a 1 30 400.2 2 21 130 0.3 )) d2 - read.table(textConnection( xy b 1 30 401 2 40 303 3 20 407 4 1130 2 5 130 250 15 6 21130 17 ))

[R] Installation issue R 2.6.1

2008-04-07 Thread jefe goode
I am seeing a peculiar installation problem with the R installation files for Windows: R2.6.1 fails to install on MS-Vista with a file corruption issue. But, the same R2.6.1 exe does install OK on Windows ME. The same problem exists with R2.3.1: Fails to install on Windows Vista Succeeds

[R] Question Regarding 'pipe'

2008-04-07 Thread born . to . b . wyld
Can anyone point out why this is not working? y-read.table(pipe(' awk '{ n = $1; sub( .* $1 ,) ; while ( n-- ) print }' temp.txt ')) [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] lme and confidence intervals

2008-04-07 Thread Cristian Carranza
Hi all! After fitting a mixed effects model to repeated measurements data set, and after several unsuccessful atempts to make a simple plot of the confidence interval for the fitted model, I gave up and now I am asking for help in this useful list. Could anyone be so kind to give me some

[R] error using method ls.ranking.capa.ident

2008-04-07 Thread Hazura Zulzalil
I'm trying to run the generalized least square approach for my 2-additive problem, unfortunately this error appeared. I have tried to figure out the error from the mailing list but couldn't find the solution. Any help is highly appreciated. This is my source code: a1 - c(76.18, 61.84, 60.4,

Re: [R] ggplot: Axis lines

2008-04-07 Thread hadley wickham
Hi Pedro, I am trying to print some simple ggplot plots, but I would like to have no gridlines, and no border. I have achieved this using ggopt(grid.lines='NA', border.lines='NA'). However, this also clears the axis lines, and reading the help, it looks like the axis objects have only

[R] Error: expected the collection operator c error pos 98 (error on line 1)

2008-04-07 Thread Blanchard, Suzette
Greetings, I implemented BRugs to run the EWOC model with a cohort size N=1. I output the simulation data using bugsdata(data), where data is the following list. data $Dose [1] 140 $Y [1] 0 bugsdata(data) puts out the file data.txt as follows.

Re: [R] findGlobals on apply

2008-04-07 Thread Christophe Genolini
f - function(x){apply(x,2,mean)} findGlobals(f) mean is a global variable, so findGlobals gets it right. That sound strange to me: a variable is something that vary... mean does not vary. maen will ge an argument that is a line of x and will make some calculous on it, that is the

Re: [R] Installation issue R 2.6.1

2008-04-07 Thread Prof Brian Ripley
On Tue, 8 Apr 2008, jefe goode wrote: I am seeing a peculiar installation problem with the R installation files for Windows: R2.6.1 fails to install on MS-Vista with a file corruption issue. But, the same R2.6.1 exe does install OK on Windows ME. The same problem exists with R2.3.1: