Re: [R] variable selection when categorical variables are available

2006-04-12 Thread Prof Brian Ripley
On Tue, 11 Apr 2006, Mike Wolfgang wrote: Probably it is not highly relevant question: Why do stepwise regression functions in R (step() or stepAIC()) add/delete categorical variables as a set? Yes, those two do. Others (e.g. in package leaps) may not. For example, I have a four-level

Re: [R] long captions -- new issue

2006-04-12 Thread Prof Brian Ripley
On Wed, 12 Apr 2006, Brian Quinif wrote: I have found out that the way to have a break apart a long caption in the way that one desires is to have a short caption for use in the list of tables that is not broken with \\ I can manually adjust the LaTeX output from the Hmisc function latex()

[R] Time Series information in formulae

2006-04-12 Thread Claus Dethlefsen
Dear List The UKgas data is stored as an object of class 'ts'. I am trying to use UKgas in a formula as argument to a function. However, I do not know how to access the 'time series' information in the response (such as start() end() etc.). Here is a boiled down example. ssm -

[R] useR! 2006: April 15 regular registration deadline

2006-04-12 Thread Torsten Hothorn
Dear useRs, we would like to inform you that we are approaching the regular registration deadline (2006-04-15) of useR! 2006, the second R user conference taking place in Vienna on June 15-17. So if you plan to join the conference, this is the perfect time to register! The pre-conference

Re: [R] long captions -- new issue

2006-04-12 Thread Brian Quinif
I just found that out thanks to Frank Harrell. Thanks, though. 2006/4/12, Prof Brian Ripley [EMAIL PROTECTED]: On Wed, 12 Apr 2006, Brian Quinif wrote: I have found out that the way to have a break apart a long caption in the way that one desires is to have a short caption for use in the

Re: [R] Time Series information in formulae

2006-04-12 Thread Prof Brian Ripley
The problem here is that you called model.frame() with (I presume, the 'factory-fresh' default) na.action=na.omit, and model.frame is documented to remove tsp attributes in that case. Use model.frame(..., na.action = NULL), e.g. model.frame(~UKgas, na.action=NULL)[[1]] is a time

[R] Kriging

2006-04-12 Thread Guillaume Blanchet
Hi, Is there a function in R which can do kriging based on more than one semi-variogram ? Thanks in advance !! Guillaume __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

[R] Variable Scope

2006-04-12 Thread James Kirkby
Hi, I was wondering if there is a way to stop R looking outside the scope of a function, if it can't find the variable inside the function. I seem to waste hours debugging functions only to find I've used a wrong variable name somewhere, but the function still works because the variable

Re: [R] Variable Scope

2006-04-12 Thread Gabor Grothendieck
Use local or codetools package as in: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/69694.html http://finzi.psych.upenn.edu/R/Rhelp02a/archive/69695.html On 4/12/06, James Kirkby [EMAIL PROTECTED] wrote: Hi, I was wondering if there is a way to stop R looking outside the scope of a

Re: [R] Variable Scope

2006-04-12 Thread Prof Brian Ripley
On Wed, 12 Apr 2006, James Kirkby wrote: Hi, I was wondering if there is a way to stop R looking outside the scope of a function, if it can't find the variable inside the function. I seem to waste hours debugging functions only to find I've used a wrong variable name somewhere, but the

Re: [R] Time Series information in formulae

2006-04-12 Thread Gabor Grothendieck
You might want to look at the dyn package. It allows time series in model formulae, e.g. this aligns UKgas and diff(UKgas) properly: dyn$lm(UKgas ~ diff(UKgas)) dyn$ transforms the above to dyn(lm(dyn(UKgas ~ diff(UKgas and the inner dyn adds class dyn to the formula's class vector

Re: [R] Variable Scope

2006-04-12 Thread Duncan Murdoch
On 4/12/2006 5:49 AM, James Kirkby wrote: Hi, I was wondering if there is a way to stop R looking outside the scope of a function, if it can't find the variable inside the function. I seem to waste hours debugging functions only to find I've used a wrong variable name somewhere, but the

[R] Error with 'var' in JGR

2006-04-12 Thread Bret Collier
R-Users, I had a strange occurrence this AM I could use some help with. 'var' seems to have ceased to work for me when I used JGR 1.3 interface. So, I ran a quick test (following pg 57 of Dalgaard) in both the basic RGui and JGR interface (see below). I have re-installed R 2.2.1 and JGR 1.3

[R] factor analysis backwards

2006-04-12 Thread Stefan Premke
Hello! How can I do a factor analysis backwards to get an arbitrary covarianz matrix out of an arbitrary number of generated random variables that have a correlation near zero. Or the same question shorter: How to generate random variables that have a spezial correlation pattern. I would like

Re: [R] factor analysis backwards

2006-04-12 Thread Berton Gunter
RSiteSearch(simulate specified covariance) will bring you to mvrnorm() in MASS. Please try to use R's built-in search capabilities first before posting. I realize that keywords can be hard to guess, but you may find that when the hits are **not** what you want, you need to refine your question

Re: [R] factor analysis backwards

2006-04-12 Thread Chuck Cleland
Stefan Premke wrote: Hello! How can I do a factor analysis backwards to get an arbitrary covarianz matrix out of an arbitrary number of generated random variables that have a correlation near zero. Or the same question shorter: How to generate random variables that have a spezial

Re: [R] Error with 'var' in JGR

2006-04-12 Thread ronggui
It works well for me. x-rnorm(50) var(x) [1] 0.6998658 version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major2 minor2.1 year 2005 month12 day 20 svn rev 36812 language R JRG:1.3 version 2006/4/12, Bret Collier

[R] subset a matrix

2006-04-12 Thread zhijie zhang
Dear friends, I have a (20*30) matrix,and want to get a subset of it like the following: The original matrix: rows:1,2,3,20; columns:1,2,3,30 I want to get my subset of The original matrix and delete others: rows:1,3,5,7,...19; columns:1,3,5.29 -- Kind Regards,Zhi Jie,Zhang

Re: [R] subset a matrix

2006-04-12 Thread Peter Ehlers
Assuming that you want odd-numbered rows/cols, the seq() function is handy, as in: mat - matrix(1:(20*30), nr = 20) mat1 - mat[seq(1, 19, by = 2), seq(1, 29, by = 2)] Peter Ehlers zhijie zhang wrote: Dear friends, I have a (20*30) matrix,and want to get a subset of it like the following:

Re: [R] subset a matrix

2006-04-12 Thread ronggui
x=matrix(rnorm(20*30),20) y=x[seq(1,20,by=2),seq(1,30,by=2)] 2006/4/12, zhijie zhang [EMAIL PROTECTED]: Dear friends, I have a (20*30) matrix,and want to get a subset of it like the following: The original matrix: rows:1,2,3,20; columns:1,2,3,30 I want to get my subset of The

[R] S4 method dispatch matrixOrArray

2006-04-12 Thread Paul Roebuck
I have some code where the primary dispatching is on other parameters so I'd like not to have to create a set of functions for matrix and another duplicate set for array. But the class union technique isn't working as implemented below and I don't have my Green book with me. How do I fix my

[R] memory limit on windows 64 edition

2006-04-12 Thread Francois Pepin
Hi everyone, Does anyone know if the 2Gb limit for R processes in windows is still present using a 64 bit edition of windows? From what I read, compiling a 64bit version of R on windows isn't possible yet, but that limitation was more OS-related. We have large datasets which generally use over

[R] how to interpret the results of a simint call

2006-04-12 Thread Colm Connolly
Hi all, I've done some anovas, found some significance and proceeded to do the post hoc tests to determine the source of the significance. I used the multcmp package as suggested by Andy Liaw (thank you). I am, however, unsure how to interpret the results of the call to simint. Could someone

[R] unable to open connection

2006-04-12 Thread Fred J.
Dear R users I am having a problem unable to open connection and don't know why. using debian testing, R Version 2.2.1 [EMAIL PROTECTED]:~/R$ ls -l -rwxr-xr-x 1 fred fred 11599 2006-04-13 02:12 r.R getwd() [1]

[R] Lattice, panel.grid and groups

2006-04-12 Thread TEMPL Matthias
Hello, Given the following plot, which shows following data: a - c(8.976000, 8.976000, 8.856000, 8.856000, 8.756000, 8.756000, 8.771000, 8.751000, 8.856000, 8.856000, 16.812000, 16.80, 8.845000, 9.032000, 8.706000, 9.636000, 9.032000, 16.802000, 8.726000, 8.779000, 8.779000, 8.856000,

Re: [R] Lattice, panel.grid and groups

2006-04-12 Thread Deepayan Sarkar
On 4/12/06, TEMPL Matthias [EMAIL PROTECTED] wrote: Hello, Given the following plot, which shows following data: a - c(8.976000, 8.976000, 8.856000, 8.856000, 8.756000, 8.756000, 8.771000, 8.751000, 8.856000, 8.856000, 16.812000, 16.80, 8.845000, 9.032000, 8.706000, 9.636000,

Re: [R] Lattice, panel.grid and groups

2006-04-12 Thread TEMPL Matthias
Yes, now it works perfect. Sorry, I was really blind for a couple of hours. Thank you! Matthias On 4/12/06, TEMPL Matthias [EMAIL PROTECTED] wrote: Hello, Given the following plot, which shows following data: a - c(8.976000, 8.976000, 8.856000, 8.856000, 8.756000, 8.756000, 8.771000,

Re: [R] S4 method dispatch matrixOrArray

2006-04-12 Thread Gabor Grothendieck
I think its good enough to just define an array method, i.e. you don't need the matrix method or the matrixOrArray class, and the vector method can call foo(matrix(A,1), ...) so: setGeneric(foo, function(A, ...) { cat(generic, match.call()[[1]], \n)

Re: [R] logistic regression model with non-integer weights

2006-04-12 Thread Michael Dewey
At 17:12 09/04/06, Ramón Casero Cañas wrote: I have not seen a reply to this so far apologies if I missed something. When fitting a logistic regression model using weights I get the following warning data.model.w - glm(ABN ~ TR, family=binomial(logit), weights=WEIGHT) Warning message:

[R] using GDD fonts

2006-04-12 Thread Luiz Rodrigo Tozzi
Hi I was searching for some X replacement for my job in R and i found the GDD I installed it and I match all the system requirements. My problem (maybe a dumb one) is that every plot comes with no font and i cant find a simgle example of a plot WITH FONT DETAIL in the list can anybody help me?

[R] Solution: Making RNetCDF work on Fedora Linux

2006-04-12 Thread Paul Johnson
Dear R users who might like to use the package RNetCDF on Fedora Linux: Fedora (versions 4 and 5) users might have noticed that the default install of the netcdf and netcdf-devel packages from the Fedora Extra archive is inconsistent with the R package RNetCDF. The attempt to install RNetCDF

Re: [R] unable to open connection

2006-04-12 Thread Duncan Murdoch
On 4/12/2006 12:40 PM, Fred J. wrote: Dear R users I am having a problem unable to open connection and don't know why. using debian testing, R Version 2.2.1 [EMAIL PROTECTED]:~/R$ ls -l -rwxr-xr-x 1 fred fred 11599 2006-04-13 02:12 r.R

Re: [R] S4 method dispatch matrixOrArray

2006-04-12 Thread Paul Roebuck
On Wed, 12 Apr 2006, Gabor Grothendieck wrote: On 4/12/06, Paul Roebuck [EMAIL PROTECTED] wrote: I have some code where the primary dispatching is on other parameters so I'd like not to have to create a set of functions for matrix and another duplicate set for array. But the class union

[R] [Q] Bayeisan Network with the deal package

2006-04-12 Thread Young-Jin Lee
Dear R-users I am looking for a help in using the deal package. I followed the manual and paper from the author's web site to learn it, as shown below, but I could not figure out how to access the local and posterior probability of the nodes in the constructed network. library(deal) data(ksl)

Re: [R] using GDD fonts

2006-04-12 Thread Tim Churches
Luiz Rodrigo Tozzi wrote: Hi I was searching for some X replacement for my job in R and i found the GDD I installed it and I match all the system requirements. My problem (maybe a dumb one) is that every plot comes with no font and i cant find a simgle example of a plot WITH FONT DETAIL

Re: [R] help on ARIMA

2006-04-12 Thread Paul Gilbert
Pradeep Gunda wrote: I am using R for prediction. I want to use VARIMA. I could not not find any package which would provide multivariate ARIMA that is VARIMA. I looked at the list of CRAN packages and found DSE package and also fracdiff package but they do not contain VARIMA modeling

[R] ARS

2006-04-12 Thread Antonio_Paredes
Hello everyone. I would like to know if there is any R library to perform adaptive rejection sampling. Thanks in advance. *** Antonio Paredes USDA- Center for Veterinary Biologics Biometrics Unit 510 South 17th Street, Suite 104 Ames, IA 50010 (515)

[R] Newbie question: setting rgl.surface plot attributes

2006-04-12 Thread Joseph Retzer
I don't seem to be able to label the x, y or z axis when creating a 3d chart using rgl.surface. I'd like to have them parallel to the axis line and move with the graph when rotated. Can this be done? Many thanks, J. Retzer [[alternative HTML version deleted]]

[R] extremely simple for loop question

2006-04-12 Thread Brian Quinif
I am sorry to ask such a simple question, but my knowledge of programming language is extremely limited, and I couldn't find the answer in any of the normal resources. I want to do a for loop in which m takes on the values 1, 5, 10, 15, 20. What is the syntax for doing that? I had been doing a

Re: [R] extremely simple for loop question

2006-04-12 Thread Paul Roebuck
On Wed, 12 Apr 2006, Brian Quinif wrote: I want to do a for loop in which m takes on the values 1, 5, 10, 15, 20. What is the syntax for doing that? I had been doing a loop for m in 1:20, but I only want those values above. ?seq --

Re: [R] ARS

2006-04-12 Thread Giovanni Petris
In package HI there is a function to perform arms (adaptive rejection Metropolis sampling). Giovanni Date: Wed, 12 Apr 2006 15:49:18 -0500 From: [EMAIL PROTECTED] Sender: [EMAIL PROTECTED] Precedence: list Hello everyone. I would like to know if there is any R library to perform

[R] Pipe delimiter ( | ) in read.delim

2006-04-12 Thread Zev Ross
Hi R folks, Can anyone tell me how to read in a pipe (|) delimited text file? I've tried the following: read.delim(c:/junk/junk.txt,sep=|, skip=7, check.names=FALSE,quote = , header=F) The file looks something like the following:

Re: [R] Pipe delimiter ( | ) in read.delim

2006-04-12 Thread Gabor Grothendieck
For the lines you posted this read them in successfully: read.table(clipboard, sep = |) To extract the RD lines you will need two passes: L - readLines(clipboard) L - grep(^RD, L, value = TRUE) read.table(textConnection(L), sep = |) or you can use read.table(pipe(...), sep = |) where ... is a

Re: [R] unable to open connection

2006-04-12 Thread Fred J.
Duncan what does the permission needs to look like in your opinion? the way it is now, on both the data file and the R batch file r.R seem to have all the read permission there is, for the user, group and others, unless you wanted to say write permission for group and others which are the

Re: [R] unable to open connection

2006-04-12 Thread Duncan Murdoch
Fred J. wrote: Duncan what does the permission needs to look like in your opinion? the way it is now, on both the data file and the R batch file r.R seem to have all the read permission there is, for the user, group and others, unless you wanted to say write permission for group and

[R] question about source package

2006-04-12 Thread James Anderson
Hi, Just a silly question about R source package: I downloaded some source package of R and found there are some source codes written in C, is this true for all the R packages? but it seems that not all the functions described in the package are contained in the source package written in C.

Re: [R] Newbie question: setting rgl.surface plot attributes

2006-04-12 Thread Duncan Murdoch
Joseph Retzer wrote: I don't seem to be able to label the x, y or z axis when creating a 3d chart using rgl.surface. I'd like to have them parallel to the axis line and move with the graph when rotated. Can this be done? rgl.surface is a low level function for drawing a surface. It's more

Re: [R] extremely simple for loop question

2006-04-12 Thread Chris Bergstresser
On 4/12/06, Paul Roebuck [EMAIL PROTECTED] wrote: I want to do a for loop in which m takes on the values 1, 5, 10, 15, 20. What is the syntax for doing that? I had been doing a loop for m in 1:20, but I only want those values above. ?seq ... which doesn't handle the 1 in that

Re: [R] S4 method dispatch matrixOrArray

2006-04-12 Thread Gabor Grothendieck
This is surprising. I would have thought that the parent/child relationships determine the order that dispatched methods are invoked, not the order that the setMethod commands are issued in. On 4/12/06, Paul Roebuck [EMAIL PROTECTED] wrote: On Wed, 12 Apr 2006, Gabor Grothendieck wrote: On

[R] latex-like array in Rd documents

2006-04-12 Thread Antonio, Fabio Di Narzo
Hi all. Is it possible to use something like latex array environments in Rd files? This is just for typesetting a formula of the type: something=a if TRUE, b if FALSE in two lines instead of one line. Any suggestion is wellcome. Antonio, Fabio Di Narzo. [[alternative HTML version

Re: [R] question about source package

2006-04-12 Thread Gabor Grothendieck
The minimum you need is to have a single file, DESCRIPTION, plus R and man directories/folders which contain your .R and .Rd files respectively. A package need not use C and I suspect most don't. On 4/12/06, James Anderson [EMAIL PROTECTED] wrote: Hi, Just a silly question about R source

[R] S4 class slot names

2006-04-12 Thread Steven Lacey
Hi, Why doesn't this work? setClass(test,representation(names=character)) tmp - new(test) [EMAIL PROTECTED] - a Error in slot-(object, name, TRUE, value) : 'names' attribute [1] must be the same length as the vector [0] Why does this work (replace names with name)?

Re: [R] unable to open connection

2006-04-12 Thread Fred J.
aha, thank you, I added ../ or ~/ before the path and it fixed it. Duncan Murdoch [EMAIL PROTECTED] wrote: Fred J. wrote: Duncan what does the permission needs to look like in your opinion? the way it is now, on both the data file and the R batch file r.R seem to have all the read

Re: [R] question about source package

2006-04-12 Thread Thomas Lumley
On Wed, 12 Apr 2006, James Anderson wrote: Hi, Just a silly question about R source package: I downloaded some source package of R and found there are some source codes written in C, is this true for all the R packages? but it seems that not all the functions described in the package are

Re: [R] extremely simple for loop question

2006-04-12 Thread David Scott
On Wed, 12 Apr 2006, Brian Quinif wrote: I am sorry to ask such a simple question, but my knowledge of programming language is extremely limited, and I couldn't find the answer in any of the normal resources. I want to do a for loop in which m takes on the values 1, 5, 10, 15, 20. What is

Re: [R] Reshaping genetic data from long to wide

2006-04-12 Thread dhinds
Farrel Buchinsky [EMAIL PROTECTED] wrote: 2)Storing all the SNP data as a string seems quite clever and a space-saving way of doing it. However, if you were to analyze a whole chromosome at a time you would still be creating one almighty big table albeit only temporarily. Do you use R to run

Re: [R] extremely simple for loop question

2006-04-12 Thread Brian Quinif
Thanks. The c(...) is what i was missing. BQ 2006/4/12, David Scott [EMAIL PROTECTED]: On Wed, 12 Apr 2006, Brian Quinif wrote: I am sorry to ask such a simple question, but my knowledge of programming language is extremely limited, and I couldn't find the answer in any of the normal

Re: [R] using GDD fonts

2006-04-12 Thread Luiz Rodrigo Tozzi
Hi Tim, It really worked!! thanks! now my only problem is about the image size, that is huge! im using the type=png and switching to png8 does not reduce the color depth.. do you know something about is? 2006/4/12, Tim Churches [EMAIL PROTECTED]: Luiz Rodrigo Tozzi wrote: Hi I was

[R] about McNemar

2006-04-12 Thread XinMeng
Hello sir: How can I perform McNemar (paired chi square test) by using R? Thanks! -- *** Xin Meng Capitalbio Corporation National Engineering Research Center for Beijing Biochip Technology BioPharma-informatics

[R] number of matches when using Match()

2006-04-12 Thread Brian Quinif
To anyone who uses the Match() function in the Matching library... How do you go about deciding how many matches you will use? With my data, my standard errors generally get smaller if I use more matches. Speaking of standard errors, when correcting for heteroscedasticity, how many matches do

Re: [R] about McNemar

2006-04-12 Thread Francisco J. Zagmutt
Please consider using R's built-in help capabilities before posting a question. help.search(McNemar) RSiteSearch(McNemar) Regards Francisco From: XinMeng [EMAIL PROTECTED] Reply-To: XinMeng [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Subject: [R] about McNemar Date: Thu, 13 Apr 2006

Re: [R] using GDD fonts

2006-04-12 Thread Jeffrey Horner
Luiz Rodrigo Tozzi wrote: Hi Tim, It really worked!! thanks! now my only problem is about the image size, that is huge! im using the type=png and switching to png8 does not reduce the color depth.. do you know something about is? I've hacked around on the GDD code before. From what