Re: [R] batch file execution

2005-10-15 Thread Uwe Ligges
sosman wrote: jun xu wrote: I am new to R and really like to get a handle of basics in short period of time. What I am trying to do is get myself a list of must-do's (read in data, batch execution, delimiters, basic modeling commands) in R as in Stata or SAS. I am just wondering how to execute

Re: [R] Beginner plot and map questions

2005-10-15 Thread Roger Bivand
(OFF TOPIC) Although not mentioned in our exellent posting guide: http://www.r-project.org/posting-guide.html or Eric Raymond's excellent advice refered to in the posting guide: http://www.catb.org/~esr/faqs/smart-questions.html I personally often find it difficult to formulate a sensible

Re: [R] batch file execution

2005-10-15 Thread ronggui
if we have set the path of R to the Environment Variables,things will be much convenient. from Start - Settings - Control Panel - System - Advanced - Environment Variables Now we are the Environment Variables window, we will only need to pay attention to the lower window for System

Re: [R] subset selection for glm

2005-10-15 Thread Thomas Schönhoff
Hello Dhiren, 2005/10/15, Dhiren DSouza [EMAIL PROTECTED]: Hello: Are there any libraries that will do a subset selection for glm's? I looked through leaps, but seems like it is specifically for linear regressions. ?subset should tell you. AFAIK, subset function is not depend on a special

Re: [R] use of NA's

2005-10-15 Thread Hank Stevens
Hi Tom, You need to use the is.na test rather then the test x==NA because the latter is not defined. d-c(0,2,3,2,0,3,4,0,0,0,0,0) d.mat-matrix(data=d,nrow=4,ncol=3,byrow=TRUE) d.mat[d.mat==0]-NA for(i in 1:length(d.mat[1,])){ d.mat[,i][is.na(d.mat[,i])] - mean(d.mat[,i],na.rm=TRUE) } Hank tom

[R] write R extenesion issue

2005-10-15 Thread jiesheng zhang
Hi, all I am trying to write a R package. I was able to build and install the package with no problem. However, I got this error when I try to load the library by calling library(btRRTest); --error message in loading- library(btRRTest) Error in library(btRRTest) :

[R] regression using a lagged dependent variable as explanatory variable

2005-10-15 Thread giacomo moro
Hi, I would like to regress y (dependent variable) on x (independent variable) and y(-1). I have create the y(-1) variable in this way: ly-lag(y, -1) Now if I do the following regression lm (y ~ x + ly) the results I obtain are not correct. Can someone tell me the code to use in R in order to

Re: [R] write R extenesion issue

2005-10-15 Thread jiesheng zhang
My package structure is very simple. I attached it here. Any help is appreciated. -ason jiesheng zhang wrote: Hi, all I am trying to write a R package. I was able to build and install the package with no problem. However, I got this error when I try to load the library by calling

Re: [R] batch file execution

2005-10-15 Thread jun xu
Thanks for all your (ronggui, *Uwe Ligges , **sosman) *help. I got it through using source. I know R has gone through all those lines, but I didn't get results of what I would if I use drop-down menu and click run all under edit after I open a script file? Basically, nothing hasspens except that

Re: [R] regression using a lagged dependent variable as explanatory variable

2005-10-15 Thread Gabor Grothendieck
Create time series from your data and then use lm with the dyn or dynlm package (as lm does not support time series directly). With the dyn package you just preface lm with dyn$ and then use lm as usual: library(dyn) yt - ts(y) xt - ts(x) dyn$lm(yt ~ xt + lag(yt, -1)) After loading dyn try this

[R] how to import such data to R?

2005-10-15 Thread ronggui
It seems my last post not sent successfully ,so I post again. - the data file has such structure: 1992 6245 49 . . 20 1 0 0 8.739536 0 . . . . . .

[R] generating response curves

2005-10-15 Thread Christian Jones
Hello does anyone know how to visualize a response curve based on a regression model with lines rather than dots. Having a large number of parameters the following formula is to time consuming. Perhaps a built in function exists to speed up the process. Model1-a~b #Setting the scale extent

Re: [R] regression using a lagged dependent variable as explanatory variable

2005-10-15 Thread Achim Zeileis
On Sat, 15 Oct 2005, giacomo moro wrote: Hi, I would like to regress y (dependent variable) on x (independent variable) and y(-1). I have create the y(-1) variable in this way: ly-lag(y, -1) Now if I do the following regression lm (y ~ x + ly) the results I obtain are not correct. The

[R] grid.edit problem

2005-10-15 Thread Gabor Grothendieck
I am having a problem in editing a grob. It works ok if I try to shift the grob using npc coordinates but if I do the same thing using native coordinates the grob disappears. What is wrong? library(grid) grid.newpage() # create viewport pushViewport(viewport(xscale = c(100,200), name = X)) #

Re: [R] grid.edit problem

2005-10-15 Thread Gabor Grothendieck
Sorry, forgot to mention my system: R.version.string # XP [1] R version 2.2.0, 2005-09-20 On 10/15/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: I am having a problem in editing a grob. It works ok if I try to shift the grob using npc coordinates but if I do the same thing using native

Re: [R] how to import such data to R?

2005-10-15 Thread Marc Schwartz
On Sat, 2005-10-15 at 23:54 +0800, ronggui wrote: It seems my last post not sent successfully ,so I post again. - the data file has such structure: 1992 6245 49 . . 20 1 0 0 8.739536 0

Re: [R] how to import such data to R?

2005-10-15 Thread Marc Schwartz
On Sat, 2005-10-15 at 11:43 -0500, Marc Schwartz wrote: There may be an easier way, but here is one possible approach: First, use scan to read in the data. Set the 'what' argument to a list of atomic data types, based upon your specs above. Also, set the 'na.names' argument to '.'.

Re: [R] batch file execution

2005-10-15 Thread Uwe Ligges
jun xu wrote: Thanks for all your (ronggui, *Uwe Ligges , **sosman) *help. I got it through using source. I know R has gone through all those lines, but I didn't get results of what I would if I use drop-down menu and click run all under edit after I open a script file? Basically, nothing

Re: [R] write R extenesion issue

2005-10-15 Thread Duncan Murdoch
jiesheng zhang wrote: I found my attachment was discarded. My R package structure lis listed here - btRRTest DESCRIPTION Package: btRRTest Version: 0.0.1 Date: 2005-10-15 Title: a test remote R

Re: [R] write R extenesion issue

2005-10-15 Thread Peter Dalgaard
jiesheng zhang [EMAIL PROTECTED] writes: I found my attachment was discarded. My R package structure lis listed here - btRRTest DESCRIPTION Package: btRRTest Version: 0.0.1 Date: 2005-10-15 Title: a

Re: [R] write R extenesion issue

2005-10-15 Thread Prof Brian Ripley
Here is the cause: * Installing *binary* package 'btRRTest' ... ^^ However, you have a source package, and you have an invalid DESCRIPTION file containing a Built: line. Please read `Writing R Extensions' and check you are following the rules it lays down (as in this

Re: [R] generating response curves

2005-10-15 Thread Marc Schwartz
On Sat, 2005-10-15 at 18:00 +0200, Christian Jones wrote: Hello does anyone know how to visualize a response curve based on a regression model with lines rather than dots. Having a large number of parameters the following formula is to time consuming. Perhaps a built in function exists to

[R] subset selection for glm

2005-10-15 Thread Dhiren DSouza
I posted a message earlier about subset selection. I have a data set with 50 variables x1, x2, x50 x50 is a binary response variable that I would like to predict. Is there a library I could use to do an exhaustive search for a subset (forward/backward subset selection) of variables to

Re: [R] subset selection for glm

2005-10-15 Thread Prof Brian Ripley
On Sat, 15 Oct 2005, Dhiren DSouza wrote: I posted a message earlier about subset selection. I have a data set with 50 variables x1, x2, x50 x50 is a binary response variable that I would like to predict. Is there a library I could use to do an exhaustive search for a subset

Re: [R] Your order (#gzmgss-R-help) Is somebody's machine infected to zombie this trash??

2005-10-15 Thread Brian Lunergan
Dennis Ewing wrote: Ciialis Softt Tabss actts up to 36 houurs! Simplyy disollve halff a tablet underr youur tonngue 15 minuutes beforee s.ex. Alll orderrs willl be processed and dispatched withiin 24hrs. 100 pills - 1.98 per 10m.g

[R] TRAMO-SEATS confusion?

2005-10-15 Thread Erin Hodgess
Dear R People: When looking at the previous postings regarding TRAMO-SEATS, I am somewhat puzzled. Is it true that we CANNOT replicate TRAMO-SEATS because of licensing or ownership issues, please? If not, would anyone be interested in an R version of it, please? Thanks, Sincerely, Erin

Re: [R] TRAMO-SEATS confusion?

2005-10-15 Thread Dirk Eddelbuettel
Erin, On 15 October 2005 at 15:53, Erin Hodgess wrote: | When looking at the previous postings regarding TRAMO-SEATS, | I am somewhat puzzled. | | Is it true that we CANNOT replicate TRAMO-SEATS because of | licensing or ownership issues, please? Could you please i) define 'replicate', and

[R] solve() versus ginv()

2005-10-15 Thread Werner Bier
Dear All, While inverting a matrix the following error appears on my console: Error in solve.default(my_matrix) : Lapack routine dgesv: system is exactly singular With this respect, I have been replacing the solve() function with ginv(): the Moore-Penrose generalized inverse of a matrix.

Re: [R] TRAMO-SEATS confusion?

2005-10-15 Thread Allin Cottrell
On Sat, 15 Oct 2005, Dirk Eddelbuettel wrote: The closest I know to using x12 and/or tramo-seats from somewhat saner and more modern software is via Allin Cottrell's gretl (cf http://gretl.sf.net). And per my suggestion a few years back, Allin even hacked a 'gretl to R' interface [ via

[R] Animated lissajous

2005-10-15 Thread rlist . 10 . phftt
Here's some code to make lissajous dance. I've attached a small sample GIF. Cheers, Rob Steele robsteele at yahoo dot com plot.lissajous = function(omega.x, omega.y, delta = 0, num.thetas = 200) { thetas = seq(0, 2 * pi, length = num.thetas) xs = sin(omega.x * thetas + delta) ys =

[R] Animated lissajous

2005-10-15 Thread rlist . 10 . phftt
Oh my goodness how did that bug creep in there. Ignore that last post and try this instead. Rob Steele robsteele at yahoo dot com plot.lissajous = function(omega.x, omega.y, delta = 0, num.thetas = 200) { thetas = seq(0, 2 * pi, length = num.thetas) xs = sin(omega.x * thetas + delta)

[R] Sorting a data frame by one of the variables

2005-10-15 Thread Leaf Sun
Dear all, I have a date frame like this: X Y Z 22 24 4.3 2.3 3.4 5.3 . 57.223.434 What my purpose is: to sort the data frame by either X, Y or Z. sample output is (sorted by X) : X Y Z 2.3 3.4 5.3 . .. 22 24 4.3 ... 57.2 23.4 34 I have