Re: [R] Lag operator in R does not work

2007-03-18 Thread Prof Brian Ripley
On Sun, 18 Mar 2007, [EMAIL PROTECTED] wrote: Hi - I'm quite wondering what makes the lag operator does not work for my time series. I have a time series of length about 20 elements. I would like to have a lag 1 of this time series. I did the following: logprice = log(price,

[R] Error with get_all_vars()

2007-03-18 Thread ronggui
get_all_vars(dist ~ speed, data = cars) Error in `row.names-.data.frame`(`*tmp*`, value = c(NA, -50L)) : invalid 'row.names' length version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status Under

Re: [R] Error with get_all_vars()

2007-03-18 Thread Prof Brian Ripley
AFAIK there is no get_all_vars() in any released version of R, and this is NOT the place to report on unreleased ('Under development (unstable)') versions of R (and especially not on non-current versions). (Please use the R-devel list to comment on current development versions.) This was

Re: [R] italics letter in roman string

2007-03-18 Thread Gabor Grothendieck
Sorry, legend= was omitted: plot(1:10) legend(topleft, legend = This ~ study ~ italic(n) == 3293) On 3/18/07, Chabot Denis [EMAIL PROTECTED] wrote: Thank you Marc, Jim and Gabor, I like the solution with expression, nice and simple. Gabor, your solution did not work, probably just a matter

Re: [R] italics letter in roman string

2007-03-18 Thread Chabot Denis
Thank you Marc, Jim and Gabor, I like the solution with expression, nice and simple. Gabor, your solution did not work, probably just a matter of putting the text inside an expression? However it would be nice if the help system pointed to it. A search on italics brought me nothing, one on

Re: [R] italics letter in roman string

2007-03-18 Thread Chabot Denis
Wow, this works, Gabor, but I am mystified. I would have tought an expression needed the word expression, and/or a text string needed to be within quotes. What is happening here, exactly? Why the use of ~? I tried without and it no longer works. Thanks in advance, Denis Le 07-03-18 à

Re: [R] italics letter in roman string

2007-03-18 Thread Gabor Grothendieck
Its a formula, not an expression -- but it will coerce formulas. Without ~ its no longer a formula. On 3/18/07, Chabot Denis [EMAIL PROTECTED] wrote: Wow, this works, Gabor, but I am mystified. I would have tought an expression needed the word expression, and/or a text string needed to be

Re: [R] italics letter in roman string

2007-03-18 Thread Duncan Murdoch
On 3/18/2007 8:56 AM, Chabot Denis wrote: Thank you Marc, Jim and Gabor, I like the solution with expression, nice and simple. Gabor, your solution did not work, probably just a matter of putting the text inside an expression? However it would be nice if the help system pointed to it.

[R] Problem Loading rggobi package

2007-03-18 Thread Tom La Bone
After installing rggobi, I get the following error when I try to load it: local({pkg - select.list(sort(.packages(all.available = TRUE))) + if(nchar(pkg)) library(pkg, character.only=TRUE)}) Loading required package: RGtk2 Error in dyn.load(x, as.logical(local), as.logical(now)) :

[R] ticks labels and R

2007-03-18 Thread Eugene Semenko
Hi, I have plot a graphics by next way: par(mar=c(5,5,1,1), font.axis=3, ps=14, xaxs=i, yaxs=i, lab=c(18,18,7), font .lab=3); plot(l, b, type=n, xlim=c(0,360), ylim=c(-90,90), xlab=l, deg, ylab=b, deg); points(l, b, cex=vel/60, col=1, pch=21); On this plot I have axis x (denoted by l) ranged in

Re: [R] Problem Loading rggobi package

2007-03-18 Thread hadley wickham
Hi Tom, Did you install ggobi first? And the RGtk2 package as well? Hadley On 3/18/07, Tom La Bone [EMAIL PROTECTED] wrote: After installing rggobi, I get the following error when I try to load it: local({pkg - select.list(sort(.packages(all.available = TRUE))) + if(nchar(pkg))

Re: [R] Problem Loading rggobi package

2007-03-18 Thread Prof Brian Ripley
This is really a GGobi issue not an R issue, but I believe their mailing lists are down. I think you are assuming that it is rggobi.dll that cannot be found, but that is not what the message says. I would have expected Windows to give you a dialog box telling you the exact problem, and I

Re: [R] Problem Loading rggobi package

2007-03-18 Thread Tom La Bone
No, I did not install ggobi at all (looks like I missed that step). I went back and installed it and then reinstalled the R package and now everything appears to be working as advertised. Thanks. Tom -Original Message- From: hadley wickham [mailto:[EMAIL PROTECTED] Sent: Sunday, March

Re: [R] ticks labels and R

2007-03-18 Thread Marc Schwartz
On Sun, 2007-03-18 at 19:36 +0300, Eugene Semenko wrote: Hi, I have plot a graphics by next way: par(mar=c(5,5,1,1), font.axis=3, ps=14, xaxs=i, yaxs=i, lab=c(18,18,7), font .lab=3); plot(l, b, type=n, xlim=c(0,360), ylim=c(-90,90), xlab=l, deg, ylab=b, deg); points(l, b, cex=vel/60,

[R] Read a .sas7bdat file

2007-03-18 Thread David Hajage
Hello useRs, I would like to import a data frame in a sas format (.sas7bdat). I have installed foreign library, and tryed to use read.ssd function : read.ssd(these, fus9706.sas7bdat) sh: sas: not found SAS failed. SAS program at /tmp/RtmpPdVSST/file2ae8944a.sas a log and other error products

Re: [R] Read a .sas7bdat file

2007-03-18 Thread Marc Schwartz
On Sun, 2007-03-18 at 18:42 +0100, David Hajage wrote: Hello useRs, I would like to import a data frame in a sas format (.sas7bdat). I have installed foreign library, and tryed to use read.ssd function : read.ssd(these, fus9706.sas7bdat) sh: sas: not found SAS failed. SAS program at

Re: [R] Read a .sas7bdat file

2007-03-18 Thread Peter Dalgaard
David Hajage wrote: Hello useRs, I would like to import a data frame in a sas format (.sas7bdat). I have installed foreign library, and tryed to use read.ssd function : read.ssd(these, fus9706.sas7bdat) sh: sas: not found SAS failed. SAS program at

Re: [R] Read a .sas7bdat file

2007-03-18 Thread David Hajage
Thank you for your answer. The big problems are : - I don't have SAS - I work on a linux system But, I've just found a solution : - I have downloaded SAS viewer (free) : http://www.sas.com/apps/demosdownloads/sassysview_PROD_8.2_sysdep.jsp?packageID=000176 - I have installed it with Wine. -

[R] multcomp

2007-03-18 Thread Nair, Murlidharan T
I used the multcomp package sometime back for doing multiple comparisons. I see that it has been updated and the methods like simint are no longer supported. When I run the program it prompts to me to use glht. How do I get the lower and upper conf int and the pValues using glht? Does anyone have

[R] subset by multiple columns satisfying the same condition

2007-03-18 Thread Frank Duan
Hi All, I have a very simple question. Suppose I had a data frame with 100 columns, now I wanted to select rows with the values of some columns satisfying the same condition, like all equal to Tom. I know I can use the 'and' operator , but it's painful if there were many columns. Can anyone

[R] simple multivariate linear model plot

2007-03-18 Thread AA
Dear R-users, I am trying to get a simple plot for a linear model. The following function does the job of getting all the plots of the lm function but the main plot. multivarplot - function(...){ x1 - rnorm(10); x2 - rnorm(10); x3 - rnorm(10) y - rnorm(10) multivarfit - lm(y ~

Re: [R] subset by multiple columns satisfying the same condition

2007-03-18 Thread Peter McMahan
say x is you rdata frame and y is the vector of column indices you want to match to a condition: x[apply(x[y]==Tom,1,all),] still, i feel like there's probably a better way... On Mar 18, 2007, at 1:36 PM, Frank Duan wrote: Hi All, I have a very simple question. Suppose I had a data frame

Re: [R] subset by multiple columns satisfying the same condition

2007-03-18 Thread Peter Dalgaard
Frank Duan wrote: Hi All, I have a very simple question. Suppose I had a data frame with 100 columns, now I wanted to select rows with the values of some columns satisfying the same condition, like all equal to Tom. I know I can use the 'and' operator , but it's painful if there were many

Re: [R] simple multivariate linear model plot

2007-03-18 Thread AA
I think I found the answer to my own question. One can use fittedvalue - fitted(multivarfit) plot(fittedvalue, y) in the below function. Thanks to Verzani's simple R manual for leading me to this. - Original Message - From: AA To: R-Help Sent: Sunday, March 18, 2007 2:42 PM

[R] Setting site-wide default CRAN repository?

2007-03-18 Thread Tim Keitt
I can't seem to find this anywhere. How do I set the default CRAN repository _site wide_ on a linux box? What I want to do is eliminate the pop-up list of repository locations when using 'install.packages()'. I know how to do this for a single account. Modifying files in /etc/R does not seem to

[R] HELP...Running data

2007-03-18 Thread pasarah
We are two french students and we have a problem concerning an exercize. We don't know how to resolve it. It would be fantastic if someone can help us. Thanks. Description: This study examined how the metabolic cost of locomotion varied with speed, stride frequency and body mass. Cost was

Re: [R] HELP...Running data

2007-03-18 Thread Kubovy Michael
Your question is much too broad for this list. It is not clear from your question how much statistics you know and what you have already done. (It also raises the concern that this may be a homework assignment.) Have you tried ox.lm - lm(vo2 ~ speed * stride * mass, data = DATA) But you

Re: [R] RODBC Excel sqlQuery insert into

2007-03-18 Thread Jens Scheidtmann
[EMAIL PROTECTED] writes: I have searched the archives for using insert into to update spreadsheets using RODBC and have come up short. So, first off, is it possible? I have put together a dummy xls table (c:\foo.xls)for exploring possibilities of RODBC. Ultimately, I am interested in

[R] any simple way to put comment with multiple lines

2007-03-18 Thread Wensui Liu
Dear Lister, I understand I can put '#' to put comment line by line. But is there a way to put comment with multiple lines without having to put '#' on the every line? Thanks. __ R-help@stat.math.ethz.ch mailing list

Re: [R] training svm

2007-03-18 Thread Oldrich Kruza
Hello. I managed to solve the problem, here's what I learned: The columns in data passed to svm need to contain only numeral values. I simply assigned a number to each category of each feature. However, there must not be a column where all the numbers are equal (there mustn't be a feature with

Re: [R] any simple way to put comment with multiple lines

2007-03-18 Thread Gabor Grothendieck
You could do this: f - function(x) { This is some text that I would like to have here. x + 1 } f(2) # 3 On 3/18/07, Wensui Liu [EMAIL PROTECTED] wrote: Dear Lister, I understand I can put '#' to put comment line by line. But is there a way to put comment with multiple lines without having to

Re: [R] expm() within the Matrix package

2007-03-18 Thread Gad Abraham
Gad If you convert to numeric, you can then assign it to Loglik: Loglik[1] - as.numeric(log(p %*% expm(Q * y[i]) %*% q)) Loglik[1] Gad [1] 134.5565 Hmm, I don't think that's Laura's problem (and actually I don't know what her problem is) : Assignment of a 1 x 1

Re: [R] training svm

2007-03-18 Thread David Meyer
Oldrich: The columns in data passed to svm need to contain only numeral values. This is not correct, svm() of course also accepts factors and then builds a model matrix similar to lm(). But it won't accept, e.g., character vectors. I simply assigned a number to each category of each

Re: [R] multcomp

2007-03-18 Thread talepanda
?glht says with 'print', 'summary', 'confint', 'coef' and 'vcov' methods being available. try: example(glht) summary(glht(amod, linfct = mcp(tension = Tukey))) confint(glht(amod, linfct = mcp(tension = Tukey))) On 3/19/07, Nair, Murlidharan T [EMAIL PROTECTED] wrote: I used the multcomp

[R] How to specify Variance Covariance matrix of residuals?

2007-03-18 Thread dan metes
Hi guys! I have a problem regarding a binary logistic hierarchical model I am trying to use. The model contains various covariates that depend on the location the response was measured at but do not depend on time (year). I also have a spatial covariate that depends both on location and