Re: [R] Transfer Crosstable to Word-Document

2008-02-16 Thread Greg Snow
If your final goal is a word document, then you should look at the odfWeave package. From: [EMAIL PROTECTED] on behalf of [EMAIL PROTECTED] Sent: Fri 2/15/2008 8:30 AM To: r-help@r-project.org Subject: [R] Transfer Crosstable to Word-Document # Dear list, # I

Re: [R] Possible overfitting of a GAM

2008-02-16 Thread Bill.Venables
thomas L Jones asks: > The subject is a Generalized Additive Model. Experts caution us > against overfitting the data, which can cause inaccurate results. Inaccurate *predictions*, to be more precies. The main problem with overfitting is that your model will capture too much of the noise in the

Re: [R] Transfer Crosstable to Word-Document

2008-02-16 Thread Gabor Grothendieck
On Feb 16, 2008 5:28 PM, David Scott <[EMAIL PROTECTED]> wrote: > On Sat, 16 Feb 2008, Alan Zaslavsky wrote: > > > > > If you want to get nicely formatted tables in Word and are familiar with > > Office tools (I know it's the Evil Empire but some of us work there), I > > suggest that you use Excel

[R] filled.contour with log axis

2008-02-16 Thread Thomas Hoffmann
Dear all, I would like to generate a filled.contour plot with log x and y axis, however using: filled.contour(as.line,log="xy") results in a warning message. Does anybody knos what to do? Thanks Thomas __ R-help@r-project.org mailing list https://

[R] Possible overfitting of a GAM

2008-02-16 Thread Thomas L Jones, PhD
The subject is a Generalized Additive Model. Experts caution us against overfitting the data, which can cause inaccurate results. I am not a statistician (my background is in Computer Science). Perhaps some kind soul would take a look and vet the model for overfitting the data. The study estima

Re: [R] Transfer Crosstable to Word-Document

2008-02-16 Thread David Scott
On Sat, 16 Feb 2008, Alan Zaslavsky wrote: > > If you want to get nicely formatted tables in Word and are familiar with > Office tools (I know it's the Evil Empire but some of us work there), I > suggest that you use Excel for formatting and then insert the table into > your Word document. IMHO,

Re: [R] How to use a reserved word in italics in an expression

2008-02-16 Thread Duncan Murdoch
On 16/02/2008 4:51 PM, Michael Kubovy wrote: > Dear R-helpers, > > > label2 <- expression(paste(italic(attraction function:), 'slope')) > Error: unexpected 'function' in "label2 <- > expression(paste(italic(attraction function" > > How do I tell R that in this case I don't want 'function' to b

Re: [R] Evaluate function on a grid

2008-02-16 Thread David Winsemius
"Giu Mac" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > I have a function in R^2, say > > f <- function(x,y) { ...skipped } > > I want to plot this function using contour, persp. wireframe, etc. I > know that the function has a global > minimum at (x0, y0) > > The naive approach is to

[R] How to use a reserved word in italics in an expression

2008-02-16 Thread Michael Kubovy
Dear R-helpers, > label2 <- expression(paste(italic(attraction function:), 'slope')) Error: unexpected 'function' in "label2 <- expression(paste(italic(attraction function" How do I tell R that in this case I don't want 'function' to be treated as a reserved word but as a string in italics?

[R] Evaluate function on a grid

2008-02-16 Thread Giu Mac
I have a function in R^2, say f <- function(x,y) { ...skipped } I want to plot this function using contour, persp. wireframe, etc. I know that the function has a global minimum at (x0, y0) The naive approach is to evaluate the function on the outer product of two arrays, like this: sx <- c(seq(

Re: [R] Weird SEs with effect()

2008-02-16 Thread John Fox
Dear Gustaf, >From ?effect, "se: a vector of standard errors for the effect, on the scale of the linear predictor." Does that help? Regards, John John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario, Canada L8S 4M4 905-525-9140x23604

[R] Producing graphs and console output in postscript format

2008-02-16 Thread John Sorkin
R 2.6.1 Windows XP I would like to make a postscript document that contains my graphs and the output that I get from the R console. So far, all I have been able to do is produce my graphs in postscript form. I do this in a sub-optimal manner by MANUALLY saving each graph in postscript form. I h

Re: [R] Transfer Crosstable to Word-Document

2008-02-16 Thread ukoenig
Hi, thank you very much for your comments and examples, which are very helpful! [I saw that the summary.formula (lib. Hmisc) has an option "cross", which might be useful too...] Alan, I agree with you: at the workplace we have a Windows-XP network with MS-Office, so I have to cope with this; I wil

Re: [R] History of R

2008-02-16 Thread Kathy Gerber
Spencer, I believe this is the first mention of pricing that I've seen. The accommodation and consideration of contributed packages has been addressed to some degree. Several additional points have been made about the comparison of R to Octave, some off list. -- Matlab did not alienate devel

Re: [R] Adding elements to existing lists

2008-02-16 Thread David Winsemius
"Mag. Ferri Leberl" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Dear everybody! > Is there a command to add elements to an existing list, at best > excluding the addition of already included ones? > Thank you in advance. > Yours, > Mag. Ferri Leberl Don't know of one, but it's not tha

Re: [R] History of R

2008-02-16 Thread Spencer Graves
Hi, Kathy, John, et al.: Has there been an answer to the question of why R has been much more successful than Octave? In this regard, can anyone provide a price comparison of student versions for S-Plus and Matlab during R's gestation period, 10-15 years ago? I had the impressio

Re: [R] Adding elements to existing lists

2008-02-16 Thread jim holtman
To add new elements to a list, just add them: yourList[["newElement"]] <- yourObject Is this what you were asking about? On Feb 16, 2008 10:20 AM, Mag. Ferri Leberl <[EMAIL PROTECTED]> wrote: > Dear everybody! > Is there a command to add elements to an existing list, at best > excluding the addi

Re: [R] how to specify the location of tick mark on x axies

2008-02-16 Thread jim holtman
I think what you want for your last statement is: lines(pts, y2) This uses the value of the tick marks to plot your line. On Feb 16, 2008 6:53 AM, Xin <[EMAIL PROTECTED]> wrote: > hi, > > I did barplot. My data are: > > >y1<-c(13, 20, 22, 19, 10, 16, 8, 4, 3, 5, 7, 4, 0, 4, 4, 2, 4, 2, 2, 5,

Re: [R] Extract from matrix

2008-02-16 Thread _Fede_
Thank you all for your help. Fede _Fede_ wrote: > > Hi all. > > I have certain problem with the extraction of data from matrices. I know > how extract elements from a matrix, but what I would like to do is to > extract a concrete number, not an element. For example if I have this > matrix X:

Re: [R] How to estimate weekly Variance

2008-02-16 Thread jim holtman
Here is one way of doing it: > x <- read.table(textConnection("WK TDVARTD PD > DailyVarPD + 28 0.0147350.449 0 0 + 28 0.0124210.449 0 0 + 28 0.0143960.449 71 7005 + 28 0.014898

[R] Transfer Crosstable to Word-Document

2008-02-16 Thread Alan Zaslavsky
If you want to get nicely formatted tables in Word and are familiar with Office tools (I know it's the Evil Empire but some of us work there), I suggest that you use Excel for formatting and then insert the table into your Word document. IMHO, Excel is much superior to Word for table formatti

[R] Weird SEs with effect()

2008-02-16 Thread Gustaf Granath
Hi all, Im a little bit confused concerning the effect() command, effects package. I have done several glm models with family=quasipoisson: model <-glm(Y~X+Q+Z,family=quasipoisson) and then used results.effects <-effect("X",model,se=TRUE) to get the "adjusted means". I am aware about the debat

Re: [R] ggplot2 & ribbon

2008-02-16 Thread hadley wickham
> p<-ggplot(reading.melt,aes(x=Date,y=value)) > p+geom_path(aes(colour=Type),size=2)+facet_grid(variable~.) > > but can't figure out > (1) How to add a transparent shade between the Paid & Total lines. I've > tried the ribbon function, but cant seem to get it to shade between the > lines To do th

Re: [R] plotEst

2008-02-16 Thread hadley wickham
On Feb 16, 2008 9:11 AM, sigalit mangut-leiba <[EMAIL PROTECTED]> wrote: > Hello, > This is the first time i'm trying to plot in R. I want to plot estimates of > OR and their confidence limits, like a scatter plot: > the vertical axis should be the estimated OR (with upper and lower conf. > limits)

[R] Adding elements to existing lists

2008-02-16 Thread Mag. Ferri Leberl
Dear everybody! Is there a command to add elements to an existing list, at best excluding the addition of already included ones? Thank you in advance. Yours, Mag. Ferri Leberl __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-h

Re: [R] How to estimate weekly Variance

2008-02-16 Thread David Winsemius
Felipe Carrillo <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Dear All: > Using the Excel formula below I am able to estimate > daily variance(Daily VarPD)for PD,but I can't figure > out how to estimate the Weekly variance for PD. Any > hints? > > Daily VarPD = (PD * (1 - TD))/TD + VarT

Re: [R] help on using try() to catch an error

2008-02-16 Thread Juliet Hannah
Dear R Users, I incorporated the suggestions given to me, which solved the problem of the program ending. However, once an error occurs, and the value NA is assigned, the program does not run correctly after this point. All values assigned after this point are NA. Here is my function. getLRTp <-

[R] plotEst

2008-02-16 Thread sigalit mangut-leiba
Hello, This is the first time i'm trying to plot in R. I want to plot estimates of OR and their confidence limits, like a scatter plot: the vertical axis should be the estimated OR (with upper and lower conf. limits), and the horizontal exis should be fixed values: (1,0.8,0.7,0.6,0.5,0.4) Here is

Re: [R] Transfer Crosstable to Word-Document

2008-02-16 Thread Gabor Grothendieck
Here is a partial solution. It still requires some manual intervention. # run this in R data(infert); attach(infert) Lines <- capture.output(CrossTable(education, induced)) ix <- grep(" | ", Lines, fixed = TRUE) writeLines(Lines[ix], "clipboard") Now paste the clipboard into Word, select the tab

Re: [R] Error 'singular gradient' in nonlinear model fitting

2008-02-16 Thread Douglas Bates
On Feb 15, 2008 11:50 AM, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > Try fitting regressing log(WEIGHT) against log(TOTAL) using lm > and then transform the results into starting values for nls (or > possibly that is sufficient and you don't need the nls results). Also, set the trace argument

Re: [R] how to specify the location of tick mark on x axies

2008-02-16 Thread Duncan Murdoch
Xin wrote: > Dear: > > I want to plot barplot and let bar be in the middle of each x axis > category. > >Do you have this experience? > >Many Thanks! > >Xin > [[alternative HTML version deleted]] > > __ > R-help@r-project.org ma

[R] ggplot2 & ribbon

2008-02-16 Thread simeon duckworth
I would like to be able to shade between two lines using ggplot2 (with faceting too). But, despite reading all the documentation on the website, cant figure out how to do it (either because i am a novice or idiot - or, of course, possibly both) My data looks is readership of paid & free newspape

Re: [R] ggplot2 used in a function - variable scope/environment

2008-02-16 Thread Martin Rittner
Hi Hadley, that helps perfectly! The actual solution, given my former example, would be mapping=aes(x=names(da)[1],y=c) I read about aes_string() sometime, but I didn't realize it was the solution to this problem... As often, PEBKAC! Many Thanks! Martin hadley wickham wrote: > Hi Martin, > >

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

2008-02-16 Thread [Ricardo Rodriguez] Your XEN ICT Team
Phil Spector wrote: > Ricardo - >If you use cat to look at the variable "request" in the getauth > function that I sent you previously, you'll see exactly what I'm > saying to the server. It's something like this: > > GET /myfile.txt HTTP/1.1 > Host: mycomputer.com > Authorization: Basic dXNl

[R] how to specify the location of tick mark on x axies

2008-02-16 Thread Xin
Dear: I want to plot barplot and let bar be in the middle of each x axis category. Do you have this experience? Many Thanks! Xin [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mai

Re: [R] R on a computer cluster

2008-02-16 Thread Markus Schmidberger
Hi, your required performance is strongly depending on your application. If you talk about a cluster, you should think about several computers. Not only one computer with several processors. If you have several computers. First of all you have to decide for a communication protocol for parallel

Re: [R] predict.lm with matrix as newdata

2008-02-16 Thread Uwe Ligges
Marlin Keith Cox wrote: > Z is a matrix and when I run the following line, it creates a prediction > estimate using each column, how can I get it an estimate for each individual > number. I have tried changing Z to a data.frame, but this does not do it > either. > > model.lm<-lm(w~x) > > pred.

Re: [R] Transfer Crosstable to Word-Document

2008-02-16 Thread Jim Lemon
[EMAIL PROTECTED] wrote: > # Dear list, > # I am an R-beginner and > # spent the last days looking for a method to insert tables produced > # with R into a word document. I thought about SPPS: copy a table from > # an SPO-file and paste it into a word document > # (if needed do some formatting wit

Re: [R] Re storing a UPDATES on a data.frame

2008-02-16 Thread Prof Brian Ripley
Well - MASS is a package and not a library - it is not 'base' but 'contributed', and as library(help=MASS) says, support software for a book. It is on CRAN. - Packages with namespaces are read-only, so you have not changed the data frame in MASS, and even for other packages you can only change

[R] R on a computer cluster

2008-02-16 Thread [EMAIL PROTECTED]
Dear all, I usually run R on my laptop with Windows XP Professional. Now I really want to run R on a computer cluster (4 processors) with Suse Linux Enterprise ver. 10. But I am new with computer cluster. Should I modify my functions in order to use the greater performance and availabili

[R] Re storing a UPDATES on a data.frame

2008-02-16 Thread savanna3000
Hello everyone, Can anyone tell me how do I restore data in a data.frame provided by base R libraries (MASS) ? I uninstalled R then installed it again and I still see the new changes I made!!!??? (eg. whiteside$Temp=1 ==> 1 overwrote all the rows, I want the old values :( !! Please HELP! --

[R] Normality Testing

2008-02-16 Thread Peter Wickham
I have compiled a package in R which performs the Doornik-Hansen (1994) version of the omnibus normality test (a finite sample version of the Jarque-Bera test), including a variation which allows for weak dependence rather than independence of the variable(s) in question. I have tried to contact t

Re: [R] lineplot.CI problem

2008-02-16 Thread Manuel Morales
Here's an updated version of lineplot.CI that will succeed even for cases where data are not present in all factor combinations. Also, this version has the option x.cont to specify that the x axis represents a continuous variable with proportional spacing. A new version of sciplot with these change