Re: [R] specifying model terms when using predict

2009-01-16 Thread Marc Schwartz
on 01/16/2009 02:20 PM VanHezewijk, Brian wrote: I've recently encountered an issue when trying to use the predict.glm function. I've gotten into the habit of using the dataframe$variablename method of specifying terms in my model statements. I thought this unambiguous notation would

Re: [R] specifying model terms when using predict

2009-01-16 Thread David Winsemius
On Jan 16, 2009, at 4:30 PM, Marc Schwartz wrote: on 01/16/2009 02:20 PM VanHezewijk, Brian wrote: I've recently encountered an issue when trying to use the predict.glm function. I've gotten into the habit of using the dataframe$variablename method of specifying terms in my model

[R] storing several arima models

2009-01-16 Thread diego Diego
Hello everyone! I'm kind of a new R user and I'm trying to store several arima models (as arima models not as lists) in something (vector, matrix, whatever)... i've tried several things but nothing seems to work the way I need. Ideally I need a vector (or something) whose entries are Arima

Re: [R] specifying model terms when using predict

2009-01-16 Thread Marc Schwartz
on 01/16/2009 03:44 PM David Winsemius wrote: On Jan 16, 2009, at 4:30 PM, Marc Schwartz wrote: on 01/16/2009 02:20 PM VanHezewijk, Brian wrote: I've recently encountered an issue when trying to use the predict.glm function. I've gotten into the habit of using the

Re: [R] storing several arima models

2009-01-16 Thread Stephan Kolassa
Does a list of arima models help? foo - list() foo[[1]] - arima(...) foo[[2]] - arima(...) HTH, Stephan diego Diego schrieb: Hello everyone! I'm kind of a new R user and I'm trying to store several arima models (as arima models not as lists) in something (vector, matrix, whatever)... i've

Re: [R] Fitting of lognormal distribution to lower tail experimental data

2009-01-16 Thread Göran Broström
On Fri, Jan 16, 2009 at 3:31 PM, Mattias Brännström mattias.brannst...@tt.luth.se wrote: Thank you, David! I agree and apprechiate your analysis, which definitely will influence my analysis of this data, but still I would like you to disregard from it(!) The standard routine in the field is,

Re: [R] Fitting of lognormal distribution to lower tail experimental data

2009-01-16 Thread Göran Broström
On Sat, Jan 17, 2009 at 12:27 AM, Göran Broström goran.brost...@gmail.com wrote: On Fri, Jan 16, 2009 at 3:31 PM, Mattias Brännström mattias.brannst...@tt.luth.se wrote: Thank you, David! I agree and apprechiate your analysis, which definitely will influence my analysis of this data, but

Re: [R] Winsorizing Multiple Variables

2009-01-16 Thread William Revelle
Thanks to Michael for giving a nice solution to Karl's question . This identified a bug in the psych package winsor function which has now been fixed in version 1.0.63. (The current development version). Although my winsor.means function in 1.0..62 (and ealier) worked correctly, my winsor

[R] data.frame: how to extract parts

2009-01-16 Thread Jörg Groß
Hi, I have a problem with the R syntax. It's perhaps pretty simple, but I don't understand it ... I can extract a column from a data.frame with the following code for example ... b$row1[b$row1 == male] so I see all male-entries. But I cannot extract all lines of a data.frame depending

Re: [R] data.frame: how to extract parts

2009-01-16 Thread jim holtman
You are missing a comma. You are addressing the dataframe as if it were a matrix and you want to extract all the rows that match: only.male - b[b$row1 == male,] On Fri, Jan 16, 2009 at 9:57 PM, Jörg Groß jo...@licht-malerei.de wrote: Hi, I have a problem with the R syntax. It's perhaps

[R] splitting a string / finding a numeric value within a string

2009-01-16 Thread Jörg Groß
Hi, I have this variable; x - c(test_01.log) and I want to extract the number (01) out of the variable. So that I get; x [1] 1 I tried strsplit, but I don't know how to refer to the result. Can someone help me with that? [[alternative HTML version deleted]]

Re: [R] splitting a string / finding a numeric value within a string

2009-01-16 Thread Jorge Ivan Velez
Dear Jörg, Try this: gsub(^.*['_']|[.].*$, , test_01.log) [1] 01 as.numeric(gsub(^.*['_']|[.].*$, , test_01.log)) [1] 1 HTH, Jorge On Fri, Jan 16, 2009 at 11:00 PM, Jörg Groß jo...@licht-malerei.de wrote: Hi, I have this variable; x - c(test_01.log) and I want to extract the

Re: [R] splitting a string / finding a numeric value within a string

2009-01-16 Thread Gabor Grothendieck
The first one replaces non-numerics with the empty string and the second one returns numerics directly: gsub([^0-9], , test_01.log) # or library(gsubfn) strapply(test_01.log, [0-9]+)[[1]] On Fri, Jan 16, 2009 at 11:00 PM, Jörg Groß jo...@licht-malerei.de wrote: Hi, I have this variable; x

[R] Where to find the source codes for the internal function in stats package

2009-01-16 Thread zhijie zhang
Dear all, I want to see the source codes for dchisq(x, df, ncp=0, log = FALSE), but cannot find it. I input dchisq in the R interface, and then enter, the following message return: dchisq /*/ function (x, df, ncp = 0, log = FALSE) { if

<    1   2