Re: [R] linear model: Test difference between coefficients and given values (t.test?)

2009-08-08 Thread Katharina May
Thanks to somebody I got the hint to use offset for the purpose of validating if there's a difference between the intercept and slope of a model and some provided values for the coefficients intercept and slope. I read ?model.offset and I'm still struggling to use it for my purpose. If I understoo

Re: [R] generalized linear models

2009-08-08 Thread annie Zhang
I think I need to restate the problem. If the test data is only a vector, then I am predicting one test sample. But the output from the predict result has the same length as the training set. And there is a warning message about this. Annie On Sat, Aug 8, 2009 at 2:52 PM, annie Zhang wrote: > Hi

Re: [R] generalized linear models

2009-08-08 Thread annie Zhang
Hi, Milton, Thank you for the reply. I tried, but it seems the problem is the column name of the test data is not the same as the column name of the training data. I didn't give the column name, the system seemed do. How to chang here? Annie On Fri, Aug 7, 2009 at 7:52 PM, milton ruser wrote:

[R] How to show both the commands and the output on the screen?

2009-08-08 Thread Peng Yu
Hi, Rscript does not print the commands in the script. I am wondering what command can print both the commands as well as the output on the screen. Regards, Peng __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE d

Re: [R] dienice for R

2009-08-08 Thread Don MacQueen
In which case, what's wrong with if ( !someTestResult ) q('no') (or 'yes' if one prefers) -Don At 7:58 PM +0100 8/8/09, Patrick Burns wrote: Dirk Eddelbuettel wrote: On 8 August 2009 at 09:12, ferreirafm wrote: | hi, | Does anybody know if there is a dienice python equivalent command in R

Re: [R] multiple lty on same panel in xyplot

2009-08-08 Thread Duncan Mackay
Hi Jake the pset is the same as that of Deepayan Sarkar's. I must not have copied all the code as I thought and did not see that there was no pset Basically I am trying to keep everything contained within the xyplot and avoid changing the device settings. I frequently use par.settings = list( .

Re: [R] Seeing negative numbers to zero

2009-08-08 Thread Don MacQueen
You probably have a working solution by now, from the other responses, but s ince you're new to R I'd like to point out a few things. (1) Using subset() to pull out just one column is overkill. Two simpler ways are KN1 <- KN[ , 5]## note the comma KN1 <- KN[[5]] And learning how to do

Re: [R] lattice: control size of axis title and axis labels

2009-08-08 Thread Duncan Mackay
Hi Jake lattice has far more options to change and is more "powerful" so that you can customize different parts of the graph. It calls grid so some of the more complicated things you may want to do could find you getting into grid which can be seen in names(trellis.par.get()) [1] "grid.pars"

Re: [R] dienice for R

2009-08-08 Thread Dirk Eddelbuettel
Hi Pat, On 8 August 2009 at 19:58, Patrick Burns wrote: | Dirk Eddelbuettel wrote: | > On 8 August 2009 at 09:12, ferreirafm wrote: | > | hi, | > | Does anybody know if there is a dienice python equivalent command in R?? | > | The python dienice command just finishes the program when issued. | >

Re: [R] configure issue

2009-08-08 Thread Dirk Eddelbuettel
Erin, On 8 August 2009 at 13:25, Erin Hodgess wrote: | Dear R People: | | I am installing R from source into Ubuntu Jaunty Jackalope. (R-2.9.1) | | When I do the configure, I get the following: We need _reproducible examples_. Unless you show us how you called configure, we cannot really hel

Re: [R] configure issue

2009-08-08 Thread Erin Hodgess
That was it. thanks so much Sincerely, erin On Sat, Aug 8, 2009 at 2:21 PM, Phil Spector wrote: > Erin - >    Packages like tk8.4 are basically runtime packages.  They > don't provide the necessary header files that are required to > compile programs which will use those runtime packages.  I > s

Re: [R] configure issue

2009-08-08 Thread Phil Spector
Erin - Packages like tk8.4 are basically runtime packages. They don't provide the necessary header files that are required to compile programs which will use those runtime packages. I suspect you'll need to install tcl8.4-dev and tk8.4-dev in order to build those capabilities into R. I thi

Re: [R] dienice for R

2009-08-08 Thread Patrick Burns
Dirk Eddelbuettel wrote: On 8 August 2009 at 09:12, ferreirafm wrote: | hi, | Does anybody know if there is a dienice python equivalent command in R?? | The python dienice command just finishes the program when issued. | I want do something like: if (test) fails so dienice. Try dienic

[R] linear model: Test difference between coefficients and given values (t.test?)

2009-08-08 Thread Katharina May
Hi there, I've got a question which is really trivial for sure but still I have to ask as I'm not making any progress solving it by myself (please be patient with an undergraduate student): I've got a linear model (lm and lmer fitted with method="ML"). Now I want to compare the coefficients (slop

[R] configure issue

2009-08-08 Thread Erin Hodgess
Dear R People: I am installing R from source into Ubuntu Jaunty Jackalope. (R-2.9.1) When I do the configure, I get the following: R is now configured for i686-pc-linux-gnu Source directory: . Installation directory:/usr/local C compiler:gcc -std=gnu99 -g -O2

Re: [R] polygon centroids

2009-08-08 Thread Roger Bivand
I think that Daniel is correct, and that you are mistaking the console representation from the internal one - try ?print and look at the digits= option. In general, note that get.Pcent() is not currently used, and coordinates() of a SpatialPolygonsDataFrame object read in using, for example, readS

Re: [R] How do I plot a line followed by two forecast points?

2009-08-08 Thread Felipe Carrillo
Try this, it plots two points ahead based on the existing data of a month apart. # Sample dates xValues <- seq.Date(as.Date("1990-01-31"), to=as.Date("1992-12-31"), by="month") # Sample y value yValues <- seq(0.1, length=length(xValues)) mydf <- data.frame(xValues,yValues);mydf mydf[,1] li

Re: [R] Which parts of the book "Programming with Data: A Guide to the S Language" are still relevant now?

2009-08-08 Thread Dirk Eddelbuettel
On 8 August 2009 at 11:14, Peng Yu wrote: | The book "Programming with Data: A Guide to the S Language" was | published over 10 years ago. I know that to understand object oriented | programming. I should read the associated section in this book. But I | am wondering if other chapters, in particul

Re: [R] dienice for R

2009-08-08 Thread Dirk Eddelbuettel
On 8 August 2009 at 09:12, ferreirafm wrote: | hi, | Does anybody know if there is a dienice python equivalent command in R?? | The python dienice command just finishes the program when issued. | I want do something like: if (test) fails so dienice. Try dienice <- function() q("no") al

[R] dienice for R

2009-08-08 Thread ferreirafm
hi, Does anybody know if there is a dienice python equivalent command in R?? The python dienice command just finishes the program when issued. I want do something like: if (test) fails so dienice. Thanks in advance, Fred -- View this message in context: http://www.nabble.com/dienice-for-

[R] lattice: control size of axis title and axis labels

2009-08-08 Thread Jacob Wegelin
Was: Re: Adjusting x/y text labels for a bwplot using cex.lab The purpose of this email is merely to explain how to control, separately, two different text sizes on the axes in an R plot, in traditional or lattice graphics. I did not find an explicit exposition of this, with examples, in a quick

[R] Which parts of the book "Programming with Data: A Guide to the S Language" are still relevant now?

2009-08-08 Thread Peng Yu
Hi, The book "Programming with Data: A Guide to the S Language" was published over 10 years ago. I know that to understand object oriented programming. I should read the associated section in this book. But I am wondering if other chapters, in particular "Chapter 3. Quick Reference", are still rel

Re: [R] Factor Analysis in R

2009-08-08 Thread Gavin Simpson
On Sat, 2009-08-08 at 17:38 +0530, Arup Pramanik wrote: > hi, > > Thanks for your reply but now it is giving me a message that Error in > factanal(~., data = sony_factor, factors = 10, na.action = na.omit) : > factor analysis applies only to numerical variables. All the > variable which I am ha

Re: [R] Factor Analysis in R

2009-08-08 Thread Gavin Simpson
On Fri, 2009-08-07 at 19:07 -0700, Arup wrote: > Hi I am trying to run Factor Analysis using R...I am using the syntax > factanal(m1, factors=3) but it's giving me an message Error in cov.wt(z) : > 'x' must contain finite values only > ...I am using a data set which is having only numeric variabl

Re: [R] create separate plots by factors

2009-08-08 Thread Henrique Dallazuanna
Try this: foo <- function(x, dir = getwd(), ...){ png(file.path(dir, sprintf("%s.png", x))) plot(DF.split[[x]], ...) dev.off() } DF.split <- split(DF[, c("year", "peak")], DF$site) sapply(DF.split, foo) On Fri, Aug 7, 2009 at 4:05 PM, Ingrid Tohver wrote: > Hello, > I am attemptin

Re: [R] A question regarding R scoping

2009-08-08 Thread Vitalie S.
You have to understand the difference between the lexical scope of a function (which gives the search path for variables) and call stack (which is a path of function calls). This gives an enormous flexibility in programming, perhaps at the cost of confusing some people. See http://cran.r-pr

Re: [R] frequency of numbers in a list

2009-08-08 Thread Phil Spector
Julius - Both mag and i are vectors, but of different lengths. R interprets the statement mag>=i as "return a vector the same length as mag and i whose elements compare the corresponding elements of the two vectors." The error message is due to the fact that mag and i are of different lengt