Re: [R] R: Including R plots in a Microsoft Word document

2004-02-24 Thread Erich Neuwirth
Saving as a metafile should to the trick. emf files work nicely in Word. Michael A. Miller wrote: Frank == Frank E Harrell [EMAIL PROTECTED] writes: Also, has anyone tried creating a Word document using OpenOffice with figures imported from R? I've tried that. It works fine with

[R] Filter out some levels?

2004-02-24 Thread Christian Schulz
Hi , how is it possible t cut some levels from one factor to subsetting a data.frame on? subdata - subset(data, data$FACTOR=1 | data$FACTOR=BETA | data$FACTOR=XY) ??? Maybe a modifcation here is better, but how? mergex[mergex$PLZX %in% levels(mergex$PLZX) ,] Many thanks and regards,

[R] would be nice ...

2004-02-24 Thread Jan de Leeuw
if R had something like python -c print(sum([1,2,3]));print(3*2) 6 6 but I guess the only way to do this is by writing the string to a tmp file and then doing something like R CMD BATCH --quiet on the tmp file I would like to use this for an R service, which allows you to select any string in

Re: [R] would be nice ...

2004-02-24 Thread Martin Maechler
Jan == Jan de Leeuw [EMAIL PROTECTED] on Tue, 24 Feb 2004 00:52:51 -0800 writes: Jan if R had something like python -c print(sum([1,2,3]));print(3*2) Jan 6 6 Jan but I guess the only way to do this is by writing the Jan string to a tmp file and then doing something

Re: [R] Filter out some levels?

2004-02-24 Thread Chuck Cleland
Christian Schulz wrote: how is it possible t cut some levels from one factor to subsetting a data.frame on? subdata - subset(data, data$FACTOR=1 | data$FACTOR=BETA | data$FACTOR=XY) ??? Maybe a modifcation here is better, but how? mergex[mergex$PLZX %in% levels(mergex$PLZX) ,] Christian:

[R] Computing the mode

2004-02-24 Thread Aurora Torrente
Hi all, I think this question could be quite trivial, but I can´t find out the solution... How can you compute the statistic mode of a sample, in case it exists (as mode() returns the mode of an object)? I tried help.search(mode) but I couldn't find a clue... Any help would be much appreciated.

[R] rstandard does not produce standardized residuals

2004-02-24 Thread Ulrich Halekoh
Dear all, the application of the function rstandard() in the base package to a glm object does not produce residuals standardized to have variance one: the reason is that the deviance residuals are divided by the dispersion estimate and not by the square root of the estimate for the

Re: [R] rstandard does not produce standardized residuals

2004-02-24 Thread Prof Brian D Ripley
This has laready been changed in the R-devel version (1.9.0 to be). Pre-test versions of that for Windows are available on CRAN. From the NEWS file o rstandard() was wrongly scaled for cases where summary(model)$dispersion != 1. and that ought to mention glm somewhere On

Re: [R] Computing the mode

2004-02-24 Thread Spencer Graves
The problem is that 'the statistic mode of a sample' has no clear definition. If the distribution is highly discrete, then the following will do the job: set.seed(1) X - rpois(11,1) (nX - table(X)) X 0 1 2 3 4 4 2 1 names(nX)[nX==max(nX)] [1] 0 1 However, if the data are

Re: [R] would be nice ...

2004-02-24 Thread Dirk Eddelbuettel
On Tue, Feb 24, 2004 at 10:07:32AM +0100, Martin Maechler wrote: Jan == Jan de Leeuw [EMAIL PROTECTED] on Tue, 24 Feb 2004 00:52:51 -0800 writes: Jan if R had something like python -c print(sum([1,2,3]));print(3*2) Jan 6 6 Jan but I guess the only way to do this is

[R] r: plots

2004-02-24 Thread allan clark
hi all i have another probably simple question. I have three variables say x, y and z. x and y are quite large and z is relative small. how can one plot the three variables on the same graph with two separate axis? (one for x and y and the other for z) e.g. x-c(101,110,150,167,120)

Re: [R] Computing the mode

2004-02-24 Thread Thomas Petzoldt
Aurora Torrente wrote: Hi all, I think this question could be quite trivial, but I can´t find out the solution... How can you compute the statistic mode of a sample, in case it exists (as mode() returns the mode of an object)? I tried help.search(mode) but I couldn't find a clue... Any help

[R] no subject

2004-02-24 Thread Claudia Paladini
Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on hypatia.math.ethz.ch X-Spam-Status: No, hits=3.5 required=5.0 tests=BAYES_44,RCVD_IN_BL_SPAMCOP_NET autolearn=no version=2.63 X-Spam-Level: *** Dear ladies and

Re: [R] would be nice ...

2004-02-24 Thread Eric Lecoutre
Hi, What about using cat()? Here is a piece of code that allows to bypass standard output to produce such a result. Be carefull: it is dangerous: it replaces output by calling 'cat()', which is not allowed on all objects... - EatOutput - function(start=TRUE,stop=!start){ if (start)

Re: [R] no subject [list.files]

2004-02-24 Thread Michael Mader
Hi, have a look at list.files() and import them in a loop or similar. Regards Michael Claudia Paladini wrote: Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on hypatia.math.ethz.ch X-Spam-Status: No,

Re: [R] r: plots

2004-02-24 Thread Thomas Petzoldt
allan clark wrote: hi all i have another probably simple question. I have three variables say x, y and z. x and y are quite large and z is relative small. how can one plot the three variables on the same graph with two separate axis? (one for x and y and the other for z) e.g.

Re: [R] no subject

2004-02-24 Thread Uwe Ligges
Claudia Paladini wrote: Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on hypatia.math.ethz.ch X-Spam-Status: No, hits=3.5 required=5.0 tests=BAYES_44,RCVD_IN_BL_SPAMCOP_NET autolearn=no version=2.63

Re: [R] r: plots

2004-02-24 Thread Marc Schwartz
On Tue, 2004-02-24 at 06:44, allan clark wrote: hi all i have another probably simple question. I have three variables say x, y and z. x and y are quite large and z is relative small. how can one plot the three variables on the same graph with two separate axis? (one for x and y and the

Re: [R] no subject

2004-02-24 Thread Timur Elzhov
On Tue, Feb 24, 2004 at 02:34:35PM +0100, Claudia Paladini wrote: Dear ladies and gentlmen, I want to import a directory with about 400 files (.dat) in R. I know how to import a single file (with scan...) but I've good no idea how to import 400 at once. Can you help me ? You can get list of

Re: [R] r: plots

2004-02-24 Thread Duncan Murdoch
On Tue, 24 Feb 2004 14:44:47 +0200, allan clark [EMAIL PROTECTED] wrote : hi all i have another probably simple question. I have three variables say x, y and z. x and y are quite large and z is relative small. how can one plot the three variables on the same graph with two separate axis? (one

Re: [R] no subject

2004-02-24 Thread Timur Elzhov
On Tue, Feb 24, 2004 at 05:11:07PM +0300, Timur Elzhov wrote: Dear ladies and gentlmen, I want to import a directory with about 400 files (.dat) in R. I know how to import a single file (with scan...) but I've good no idea how to import 400 at once. Can you help me ? You can get list of

[R] Re: (read many files)

2004-02-24 Thread Thomas Petzoldt
Claudia Paladini wrote: Dear ladies and gentlmen, I want to import a directory with about 400 files (.dat) in R. I know how to import a single file (with scan...) but I've good no idea how to import 400 at once. Can you help me ? Thanks a lot! Claudia setwd(c:/myfiles/) ## list.files uses

[R] Suggestions ?!?!

2004-02-24 Thread ivo welch
hi chaps: * I have some suggestion, the first of which is about suggestions, R tells me who the contributors() are, but this should also tell me where I should email suggestions to. Is it this mailing address/list? a repository of suggestions? an individual? this came up because i wanted

Re: [R] orthonormalization with weights

2004-02-24 Thread Douglas Bates
Gabor Grothendieck [EMAIL PROTECTED] writes: Obviously the R code does not match the description I gave since we should be taking the QR decomp of sqrt(D)X, not X. Z should be: diag(1/sqrt(diag(D))) %*% qr.Q(qr(sqrt(D)%*%X)) Because R stores matrices in column-major order and repeats

[R] Nonlinear Optimization

2004-02-24 Thread Kissell, Robert [EQRE]
Hi, I have been brought back to the R-Side from MatLab. I have used R in graduate econometrics but only for statistics and regression (linear and nonlinear). But now I need to run general nonlinear optimization. I know about the add-in quadprog but my problem is not QP. My problem is a general

Re: [R] no subject

2004-02-24 Thread Jean Eid
I don't know what these files are. so depending on whether you want to call them with 400 different names or just have one data set for the 400 files. but in either case you can do a for loops on the directory. i.e. put the 400 files in a seperate directory and setwd(to that directory) do this

Re: [R] Filter out some levels?

2004-02-24 Thread Douglas Bates
Christian Schulz [EMAIL PROTECTED] writes: how is it possible to cut some levels from one factor to subsetting a data.frame on? subdata - subset(data, data$FACTOR=1 | data$FACTOR=BETA | data$FACTOR=XY) ??? Maybe a modifcation here is better, but how? mergex[mergex$PLZX %in%

Re: [R] would be nice ...

2004-02-24 Thread Thomas Lumley
On Tue, 24 Feb 2004, Martin Maechler wrote: or (slightly nicer) % echo sum(c(1,2,3)); 3*2 | R --quiet --vanilla sum(c(1,2,3)); 3*2 [1] 6 [1] 6 but it still echoes the input by default You can use --slave to suppress the input [al:~] thomas% echo print(sum(1:3))

[R] Calculate Distance and Aggregate Data?

2004-02-24 Thread dsheuman
Hi all, I've been struggling learning R and need to turn to the list again. I've got a dataset (comma-delimited file) with the following fields: recid, latitude, longitude, population, dwelling and age. For each observation, I'd like to calculate the total number of people and dwellings and

[R] Blue book

2004-02-24 Thread Henric Nilsson
Hi everyone, Has the Blue book been revised? When googling for something completely different I happened to stumble upon http://isbn.nu/0412741504, claiming that a revised edition was published by CRC Press in 1998. Is this true? If so, in what way was it revised? //Henric

Re: [R] Nonlinear Optimization

2004-02-24 Thread Dirk Eddelbuettel
On Tue, Feb 24, 2004 at 09:21:49AM -0500, Kissell, Robert [EQRE] wrote: nonlinear). But now I need to run general nonlinear optimization. I know about the add-in quadprog but my problem is not QP. My problem is a general nonlinear (obj funct) with linear constraints.I know about the ms and

Re: [R] Nonlinear Optimization

2004-02-24 Thread Uwe Ligges
Kissell, Robert [EQRE] wrote: Hi, I have been brought back to the R-Side from MatLab. I have used R in graduate econometrics but only for statistics and regression (linear and nonlinear). But now I need to run general nonlinear optimization. I know about the add-in quadprog but my problem is

[R] Legends text

2004-02-24 Thread Sebastien Durand
Hi, Is there a way to change the color of the text inside a legend, let say I would like to use a black background in my legend, how can I get the text to show up, it is black!!! So for example how could I change it to white...? Sebastien __ [EMAIL

[R] matrix() Help

2004-02-24 Thread Jonathan Wang
I have a question related to matrix(). The code below randomly generates 3 Poisson numbers into a 3 by 1 matrix: matrix1 - matrix(rpois(3,lambda=2),nrow=3,ncol=1) And I use list() to see what they are: [,1] [1,] 3 [2,] 1 [3,] 4 , which is what I had intended. I then I want to

Re: [R] Nonlinear Optimization

2004-02-24 Thread Thomas Lumley
On Tue, 24 Feb 2004, Kissell, Robert [EQRE] wrote: Hi, I have been brought back to the R-Side from MatLab. I have used R in graduate econometrics but only for statistics and regression (linear and nonlinear). But now I need to run general nonlinear optimization. I know about the add-in

Re: [R] Nonlinear Optimization

2004-02-24 Thread Prof Brian Ripley
I found help.search(optimization) gave constrOptim(base) Linearly constrained optimisation optim(base) General-purpose Optimization optimize(base) One Dimensional Optimization and there is also nlm which is not showing up there. optim() provides several algorithms

Re: [R] no subject

2004-02-24 Thread Duncan Murdoch
On Tue, 24 Feb 2004 17:14:17 +0300, Timur Elzhov [EMAIL PROTECTED] wrote : flist - system(ls *.dat, intern = TRUE) That's not portable (Windows doesn't necessarily have ls). list.files() is the portable function to do this. If you want to be Windows-only non-portable, then choose.files() is a

Re: [R] Legends text

2004-02-24 Thread Marc Schwartz
On Tue, 2004-02-24 at 10:45, Sebastien Durand wrote: Hi, Is there a way to change the color of the text inside a legend, let say I would like to use a black background in my legend, how can I get the text to show up, it is black!!! So for example how could I change it to white...?

[R] be careful: using attach in R functions

2004-02-24 Thread li dongfeng
Hi there, I have just found that the ``attach'' function can get you into trouble when called many times. For example, you have a simulation routine called ``f()'', in which you used ``attach'' and no corresponding ``detach''. Then you call this function many times. You will find that the

[R] convergence in polr

2004-02-24 Thread C. Spanou
Hello splus-users, I am trying to fit a regression model for an ordered response factor. So I am using the function polr in library(MASS). My data is a matrix of 1665 rows and 63 columns (one of the column is the dependent variable). The code I use is polr(as.ordered(q23p)~.,data=newdatap) but

Re: [R] New Perl module Statistics::R

2004-02-24 Thread Don MacQueen
In a small amount of testing on Solaris, SunOS 5.8, it is working. Installed via cpan. -Don At 3:42 AM -0300 2/22/04, Graciliano M. P. wrote: I have released the new module Statistics::R and need some feedback of it's status. This will permit the control of the the R (R-project) interpreter

RE: [R] Suggestions ?!?!

2004-02-24 Thread Gabor Grothendieck
For the question at the end, try barplot with the horiz=TRUE argument. Date: Tue, 24 Feb 2004 09:30:21 -0500 From: ivo welch [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED],ivo welch [EMAIL PROTECTED] Subject: [R] Suggestions ?!?! hi chaps: * I have some

[R] Accessing columns in data.frame using formula

2004-02-24 Thread Paul Lemmens
Hello! I'm trying the hard way to use a formula, in a function, to specify the names of several important columns in a data.frame. Maybe I'm just battling to figure out the right search terms :-( This is on XP, R 1.8.1. So, for instance, wery[1:5,] V1 V2 V3 V4V5 congr V7 V8 V9 ok

Re: [R] Nonlinear Optimization

2004-02-24 Thread Spencer Graves
optim? Kissell, Robert [EQRE] wrote: Hi, I have been brought back to the R-Side from MatLab. I have used R in graduate econometrics but only for statistics and regression (linear and nonlinear). But now I need to run general nonlinear optimization. I know about the add-in quadprog but

Re: [R] matrix() Help

2004-02-24 Thread Marc Schwartz
On Tue, 2004-02-24 at 10:51, Jonathan Wang wrote: I have a question related to matrix(). The code below randomly generates 3 Poisson numbers into a 3 by 1 matrix: matrix1 - matrix(rpois(3,lambda=2),nrow=3,ncol=1) And I use list() to see what they are: [,1] [1,] 3 [2,] 1

[R] Inheriting from factors + co.

2004-02-24 Thread Torsten Steuernagel
I'm trying to create a formal class that does the following: 1) accept objects of arbitrary class as .Data slot 2) provide a set of other slots that are of fixed type (as usual) The following two approaches came to my mind: A) setClass(myclass, representation(ANY, x = numeric, y =numeric))

Re: [R] convergence in polr

2004-02-24 Thread Prof Brian Ripley
Why have you sent a message about S-PLUS to R-help, one that has already been answered on S-news? There is no function nlminb in R. On 24 Feb 2004, C. Spanou wrote: Hello splus-users, I am trying to fit a regression model for an ordered response factor. So I am using the function polr in

Re: [R] convergence in polr

2004-02-24 Thread C. Spanou
I am really sorry. I was supposed to send it to the Splus users but by mistake I sent to the R-users. Sorry once again On Feb 24 2004, Prof Brian Ripley wrote: Why have you sent a message about S-PLUS to R-help, one that has already been answered on S-news? There is no function nlminb in R.

RE: [R] be careful: using attach in R functions

2004-02-24 Thread Liaw, Andy
You can write your code more defensively. There are a few ways to do that: (B (B1. Right after the attach(object), do on.exit(detach(object)). (B2. If you know the function will be call repeatedly, it might be a good idea (Bto check whether the object has been attached. This way you only

[R] problem of install.packages in windows (R 1.81)

2004-02-24 Thread mrufino
Dear R users, I have a problem in the configuration of R: I just changed university, and my conection to the net is via a password, which permits me to access the packages with no problem via the internet explorer (version 6). I just updated R to R 1.81, and I cannot download nether upgrade

Re: [R] Suggestions ?!?!

2004-02-24 Thread Douglas Bates
ivo welch [EMAIL PROTECTED] writes: * the first is for the summary() method for plain data frames. it would seem to me that the number of NA observations should be printed as an integer, not necessarily in scientific notation. I have also yet to determine when summary() likes to give means

RE: [R] no subject

2004-02-24 Thread Liaw, Andy
From: Jean Eid I don't know what these files are. so depending on whether you want to call them with 400 different names or just have one data set for the 400 files. but in either case you can do a for loops on the directory. i.e. put the 400 files in a seperate directory and setwd(to

Re: [R] Calculate Distance and Aggregate Data?

2004-02-24 Thread Roger Bivand
On Tue, 24 Feb 2004 [EMAIL PROTECTED] wrote: Hi all, I've been struggling learning R and need to turn to the list again. I've got a dataset (comma-delimited file) with the following fields: recid, latitude, longitude, population, dwelling and age. For each observation, I'd like to

Re: [R] Legends text

2004-02-24 Thread Uwe Ligges
Sebastien Durand wrote: Hi, Is there a way to change the color of the text inside a legend, let say I would like to use a black background in my legend, how can I get the text to show up, it is black!!! So for example how could I change it to white...? Sebastien

Re: [R] matrix() Help

2004-02-24 Thread Uwe Ligges
Jonathan Wang wrote: I have a question related to matrix(). The code below randomly generates 3 Poisson numbers into a 3 by 1 matrix: matrix1 - matrix(rpois(3,lambda=2),nrow=3,ncol=1) And I use list() to see what they are: [,1] [1,] 3 [2,] 1 [3,] 4 , which is what I had

Re: [R] lme - problems with model

2004-02-24 Thread Dick Beyer
As Spencer Graves suggested, I tried this with continuous variables. Seems to work ok: lme(maill6 ~ water * temp , random= ~1|rep, data = milk) Linear mixed-effects model fit by REML Data: milk Log-restricted-likelihood: -10.57237 Fixed: maill6 ~ water * temp (Intercept)water

Re: [R] be careful: using attach in R functions

2004-02-24 Thread Marc Schwartz
On Tue, 2004-02-24 at 09:32, li dongfeng wrote: Hi there, I have just found that the ``attach'' function can get you into trouble when called many times. For example, you have a simulation routine called ``f()'', in which you used ``attach'' and no corresponding ``detach''. Then you call

[R] Statistical Quality Control

2004-02-24 Thread Holton, Blake
Greetings, I've been familiarizing myself with the features of R over the past few days. I'm impressed with the quality and quantity of the features and packages. One feature that I would be interested in would be a package for statistical quality control. Does a package for statistical quality

RE: [R] be careful: using attach in R functions

2004-02-24 Thread Gabor Grothendieck
An alternative to attach is with: x - with( theta, c(one,two,three) ) --- Date: Tue, 24 Feb 2004 23:32:0 +0800 From: li dongfeng [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Subject: [R] be careful: using attach in R functions Hi there, I have just found that the

Re: [R] be careful: using attach in R functions

2004-02-24 Thread Thomas Petzoldt
li dongfeng wrote: Hi there, I have just found that the ``attach'' function can get you into trouble when called many times. [..] Below is a demonstration of this performance loss, you will see a linear growth in CPU time usage. Adding a ``detach()'' call at the end of ``f'' will get

[R] Course***Advanced R/Splus Programming @ 5 locations, March 2004

2004-02-24 Thread elvis
XSolutions Corp ([1]www.xlsolutions-corp.com) is proud to announce a 2-day Advanced R/Splus programming taught by R Development Core Team Guru. *San Francisco - March 22-23 *Washington DC March 22-23 *Chicago --- March 25-26

Re: [R] be careful: using attach in R functions

2004-02-24 Thread Uwe Ligges
li dongfeng wrote: Hi there, I have just found that the ``attach'' function can get you into trouble when called many times. For example, you have a simulation routine called ``f()'', in which you used ``attach'' and no corresponding ``detach''. Well, attach() may be useful for

Re: [R] Inheriting from factors + co.

2004-02-24 Thread Uwe Ligges
Torsten Steuernagel wrote: I'm trying to create a formal class that does the following: 1) accept objects of arbitrary class as .Data slot 2) provide a set of other slots that are of fixed type (as usual) The following two approaches came to my mind: A) setClass(myclass,

Re: [R] problem of install.packages in windows (R 1.81)

2004-02-24 Thread Duncan Murdoch
On Tue, 24 Feb 2004 17:36:39 +0100, [EMAIL PROTECTED] wrote : Dear R users, I have a problem in the configuration of R: I just changed university, and my conection to the net is via a password, which permits me to access the packages with no problem via the internet explorer (version 6). If

Re: [R] Accessing columns in data.frame using formula

2004-02-24 Thread Uwe Ligges
Paul Lemmens wrote: Hello! I'm trying the hard way to use a formula, in a function, to specify the names of several important columns in a data.frame. Maybe I'm just battling to figure out the right search terms :-( This is on XP, R 1.8.1. So, for instance, wery[1:5,] V1 V2

Re: [R] Computing the mode

2004-02-24 Thread Ravi Varadhan
Forgive me for not following the posting guidelines and posting before doing my homework! I checked CRAN website and found that there is a package developed by Davies and Kovac, called ftnonpar that implements the taut spring approach that I mentioned in my previous posting. # For example:

Re: [R] problem of install.packages in windows (R 1.81)

2004-02-24 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: Dear R users, I have a problem in the configuration of R: I just changed university, and my conection to the net is via a password, which permits me to access the packages with no problem via the internet explorer (version 6). I just updated R to R 1.81, and I

Re: [R] problem of install.packages in windows (R 1.81)

2004-02-24 Thread Prof Brian Ripley
Do read the rw-FAQ, Q2.17, which gives examples. If following them does not work, you should seek local advice about your system. You can always download the zip files and install them from the Packages menu too. BTW, you do need to be accurate: it is R 1.8.1, not 1.81 and the proxy

Re: [R] be careful: using attach in R functions

2004-02-24 Thread Roger D. Peng
Using attach() in this context may not be wise. I tend to only use attach() when working interactively. It might be better to use with() in this situation, such as f - function() { theta - list(one=2.0, two=0.3, three=0.4) x - with(theta, c(one, two, three)) sample(x,

[R] levelplot add line

2004-02-24 Thread Jeff Jorgensen
R folks, I can't seem to find the instructions in the help files for the lattice package that explain how to add lines, such as with lines() or ?, to a levelplot. I'd be grateful if someone could point me in the proper direction. Cheers, Jeff ~~

Re: [R] Computing the mode

2004-02-24 Thread Ravi Varadhan
I remember Prof. Ripley suggesting the taut springs approach to estimating the modes, sometime ago in a posting to this group. I would be interested in knowing whether there is any R implementation of this approach (developed by Davies (1995)), for both non-parametric regression and density

Re: [R] Inheriting from factors + co.

2004-02-24 Thread Torsten Steuernagel
On 24 Feb 2004 at 21:38, Uwe Ligges wrote: setClass(myclass, representation(ANY, x = numeric, y =numeric)) new(myclass, 1:10)# works new(myclass, Test) # works new(myclass, factor(1:10))# fails Why do you think it fails? I was typing faster than thinking.

Re: [R] Suggestions ?!?!

2004-02-24 Thread Jason Turner
ivo welch [EMAIL PROTECTED] said... * Finally, a more complex question: I have a historical rate of stock return series (yes, I teach finance). I would like to make a ts plot on the left (plot(date,returns,type=h)), and a plot(density(returns)) on the right. works nicely with

Re: [R] levelplot add line

2004-02-24 Thread Deepayan Sarkar
On Tuesday 24 February 2004 18:03, Jeff Jorgensen wrote: R folks, I can't seem to find the instructions in the help files for the lattice package that explain how to add lines, such as with lines() or ?, to a levelplot. I'd be grateful if someone could point me in the proper direction. The

[R] (no subject)

2004-02-24 Thread Nathan Leon Pace, MD, MStat
Hi All, I'm new at programming in R. Some functions create objects for which extractor functions are written to pull out some partial result. I wish to extract partial results from functions without extractor functions: for example, to pass a vector of results to another function. Even after

Re: [R] (no subject)

2004-02-24 Thread Jason Turner
Some functions create objects for which extractor functions are written to pull out some partial result. I wish to extract partial results from functions without extractor functions: for example, to pass a vector of results to another function. There isn't a general solution to this problem

[R] circular filter

2004-02-24 Thread Christof Bigler
I try to find a circular filter that I can export to be used in a spatial software. Assuming, we have a matrix, representing 9x9 regularly spaced points with the center point 'filter[5, 5]'. In this example, I want to find a function that weighs all neighbor points within a distance of d=4

Re: [R] would be nice ...

2004-02-24 Thread Richard A. O'Keefe
Jan de Leeuw [EMAIL PROTECTED] wrote: if R had something like python -c print(sum([1,2,3]));print(3*2) 6 6 What's wrong with % echo print(sum(c(1,2,3))); print(3*2) | R --no-save -q print(sum(c(1,2,3))); print(3*2) [1] 6 [1] 6

[R] lapack routine dgesdd, error code 1

2004-02-24 Thread karl cottenie
Hello R-users, during one of my analyses that involve a SVD, I get the following error message: Error in La.svd(x, nu, nv, method) : error code 1 from Lapack routine dgesdd With a search on the R web site, I only found references to error codes 17 and 3 for this particular routine. I also found

Re: [R] Calculate Distance and Aggregate Data?

2004-02-24 Thread Jim Lemon
[EMAIL PROTECTED] wrote: Hi all, I've been struggling learning R and need to turn to the list again. I've got a dataset (comma-delimited file) with the following fields: recid, latitude, longitude, population, dwelling and age. For each observation, I'd like to calculate the total number

Re: [R] circular filter

2004-02-24 Thread Peter Wolf
try: filter.matrix.center-function(n=9,size=5){ x-matrix(1,n,n) center-(n+1)/2 (abs(row(x)-center)+abs(col(x)-center)) size } filter.matrix.center() some tests: 0+filter.matrix.center(5,2) [,1] [,2] [,3] [,4] [,5] [1,]00000 [2,]00100 [3,]0

Re: [R] circular filter

2004-02-24 Thread Uwe Ligges
Christof Bigler wrote: I try to find a circular filter that I can export to be used in a spatial software. Assuming, we have a matrix, representing 9x9 regularly spaced points with the center point 'filter[5, 5]'. In this example, I want to find a function that weighs all neighbor points