RE: [R] S+Finmetrics cointegration functions

2004-03-26 Thread Pfaff, Bernhard
Dear all, S+Finmetrics has a number of very specilised functions. I am particularly interested in the estimation of cointegrated VARs (chapter 12 of Zivot and Wang). In this context the functions coint() and VECM() stand out. I looked at package dse1, but found no comparable

[R] Finite mixture models

2004-03-26 Thread Joao Pedro W. de Azevedo
Dear R users, I would like to know if R has any tools to estimate a finite mixture model. Many thanks, Joao Pedro __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

Re: [R] Error : sink stack is full

2004-03-26 Thread Barry Rowlingson
ZABALZA-MEZGHANI Isabelle wrote: Hello, I have implemented a method which uses sink to follow the progression status of an iterative process (Below is part of the code) I have already used such kind of code with no problem. Today, I get a sink stack is full error. I wonder if it could be linked

Re: [R] Finite mixture models

2004-03-26 Thread Prof Brian Ripley
On Fri, 26 Mar 2004, Joao Pedro W. de Azevedo wrote: I would like to know if R has any tools to estimate a finite mixture model. It has several. It is strange you did not want to know what they are, but for the sake of others who may be intrigued: See script ch16 in MASS for bivariate

Re: [R] Error : sink stack is full

2004-03-26 Thread Martin Maechler
BaRow == Barry Rowlingson [EMAIL PROTECTED] on Fri, 26 Mar 2004 10:11:04 + writes: ((nicely explaining everything)) ... BaRow . your code (which wasn't attached BaRow because I think R-news strips out attachments). R-help (sic) does strip (most)

[R] Console output

2004-03-26 Thread Ingmar Visser
Hi all, I am working on Macos x 10.3 (Panther) to build a package consisting of C/C++ code that is called from R. In the C-sources I use several commands to print info to the console: I used two different ways: std::cout info\n; And Rprintf(info\n); Both work fine when R is run from the

[R] update/offset

2004-03-26 Thread Simon.Bond
I've noticed that the update() function does not seem to work correctly when offset(..) terms are there: update(modelwithoffset, .~.-afixedeffect) drops the offset term. I'm using this with a negbin model, but I think it goes wrong with the update.formula() function. update.formula function

[R] Fwd: MDS problems [ajtee@ajtee.uklinux.net]

2004-03-26 Thread Adam Tee
Hi all, I'm trying to perform an MDS of some data that I have. When I use cmdscale everything is fine and I get some interesting results however, the tends to be low. What I wnat to do is compare this with the Non-Metric MDS using isoMDS or sammon. However, when I try using these I get the

[R] Package update: 'urca' version 0.3-3

2004-03-26 Thread Pfaff, Bernhard
Dear R-list member, an update of package 'urca' has been uploaded to CRAN (Mirror: Austria). In the updated release unit root and cointegration tests encountered in applied econometric analysis are implemented. The package is written in 'pure' R and utilises S4 classes. In particular, the

[R] Omegahat down?

2004-03-26 Thread M.Kondrin
Hello! For 2 days can not connect to www.omegahat.org :( Something happens? traceroute to www.omegahat.org (128.105.174.32), 30 hops max, 38 byte packets .. 13 144.92.128.196 (144.92.128.196) 161.792 ms 162.260 ms 160.893 ms 14 g1-2.cisco1.cs.wisc.edu (128.105.1.14) 160.996 ms

RE: [R] Omegahat down?

2004-03-26 Thread Mark Fowle
I was wondering the same thing. The traceroute seems to end at their border router, which leads me to believe that they has a hardware failure. Hoping that they get it up in a few days. I've checked around and there are a few mirrors but they all just hang, so I guess we have to wait... Mark

Re: [R] Fwd: MDS problems [ajtee@ajtee.uklinux.net]

2004-03-26 Thread Jari Oksanen
On Fri, 2004-03-26 at 15:02, Adam Tee wrote: Hi all, I'm trying to perform an MDS of some data that I have. When I use cmdscale everything is fine and I get some interesting results however, the tends to be low. What I wnat to do is compare this with the Non-Metric MDS using isoMDS

Re: [R] Omegahat down?

2004-03-26 Thread Uwe Ligges
Mark Fowle wrote: I was wondering the same thing. The traceroute seems to end at their border router, which leads me to believe that they has a hardware failure. Hoping that they get it up in a few days. I've checked around and there are a few mirrors but they all just hang, so I guess we have to

Re: [R] How to add a top X-axis with a different logarithmic scale?

2004-03-26 Thread Marc Schwartz
On Thu, 2004-03-25 at 17:42, Itay Furman wrote: Thanks, Marc, for your reply. Happy to help. I didn't explain myself well, but thanks to you I think I could phrase my question better. I want to be able to compute new tick-positions for the top X-axis. Why new ticks positions? See in

[R] Gregmisc 'running' question

2004-03-26 Thread Sean Davis
Just a quick and probably simple question: dat - rnorm(500,sd=1+(1:500)/500) fun - function(x) t.test(x)$p.value running(dat,width=50,fun=fun,allow=T) Error in t.test.default(x) : not enough x observations running(dat,width=50,fun=fun,allow=F) Error in t.test.default(x) : not enough x

[R] (no subject)

2004-03-26 Thread pnick
i need to know how to estimate a linear regression whose coefficients sum to zero __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] Novice with trouble running PAN

2004-03-26 Thread Patrick S. Malone
Good morning. I'm a complete tyro at using R, having downloaded it yesterday for the sole purpose of running a problem in PAN, Joe Schafer's program for multiple imputation of multilevel data. I'm starting to get the hang of the command interface, and *think* I have all the input matrices

[R] stop() vs. error() ?

2004-03-26 Thread ivo welch
Why does stop(we are done) print Error in eval.with.vis(expr, envir, enclos) : ? It would seem to me that a plain stop() is not an error, and that it would make more sense to have an error() function that is different from a stop(). Is there a rationale here that I am missing? sincerely,

Re: [R] Novice with trouble running PAN

2004-03-26 Thread Patrick S. Malone
I got a suggestion offlist that I go ahead and post my R commands: lib(pan) y - read.table(c:/temp/y.dat, header=TRUE, na.string='.') subj - read.table(c:/temp/subj.dat, header=TRUE) pred - read.table(c:/temp/pred.dat, header=TRUE, na.strings='.') xcol - c(1, 2, 3, 4, 5, 6, 7, 8) zcol - c(1, 6,

[R] (senza oggetto)

2004-03-26 Thread pnick
i need to know how to estimate a linear regression whose coefficients sum to zero __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

RE: [R] stop() vs. error() ?

2004-03-26 Thread Liaw, Andy
Please do read the documentation of the functions you are trying to use. The description in ?stop says: 'stop' stops execution of the current expression and executes an error action. stop() is how error is flagged in R (and S in general). If that's not what you want, try something

[R] regression problem

2004-03-26 Thread pnick
i need to know how to estimate a linear regression whose coefficients sum to zero __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] With which version of XFree86 can R compile?

2004-03-26 Thread Susumu Tanimura/$BC+B<(B $B?8(B
Hi there, No information was found which version of XFree86 get along with R. I could not compile R version 1.8.1 with XFree86 4.3.99.902. Here is error message. gcc -I. -I../../../src/include -I../../../src/include -DI18N_MB -I/usr/X11R6/include -I/usr/local/include -DHAVE_CONFIG_H

Re: [R] Gregmisc 'running' question

2004-03-26 Thread Don MacQueen
It says not enough x observations. That's pretty clear. So ask yourself, what is the minimum number of observations one needs to do a t test? Try this to see how many observations t.test was given each time. running(dat,width=50,fun=function(x) length(x),allow=T) or this

[R] How to do the significant test on Local Moran's I

2004-03-26 Thread Louis
Dear Danlin Yu: I read your message at https://stat.ethz.ch/pipermail/r-help/2003-April/030754.html. Actually, I have a question about significant of Local Moran I too. based on it's function: Ii = zi [¦²j wijzj], I wonder how can I calculate it's z-value. Any

Re: [R] regression problem

2004-03-26 Thread Patrick Burns
Assuming that you want to estimate via least squares, you can do something like this: reg.coefsum - function(x, y, start=coef(lm.fit(x, y)), coefsum=0, penalty=1000) { subfun.objective - function(coef){ sum((y - x %*% coef)^2) + abs(sum(coef)) * penalty } opt -

Re: [R] With which version of XFree86 can R compile?

2004-03-26 Thread A.J. Rossini
It isn't clear that R is currently friendly to the new XFree 4.4 license. I believe that there is an advertising clause for linking -- does anyone know if this has been addressed or clarified? I've not been following those issues for a few months. best, -tony Susumu

[R] multicolumn sort on dataframe?

2004-03-26 Thread Jeff D. Hamann
I couldn't find any reference to this in the FAQ, but is it possible to sort a dataframe by multiple columns? I've created some code, similar to the following: nspr.code - sp.results$sp.code[order( sp.results$sp.code )] nspr.tpa - sp.results$tpa[order( sp.results$sp.code )] nspr.code -

Re: [R] regression problem

2004-03-26 Thread Patrick Burns
The function has a coefsum argument but never uses it. The objective is supposed to be: sum((y - x %*% coef)^2) + abs(sum(coef) - coefsum) * penalty Patrick Burns wrote: Assuming that you want to estimate via least squares, you can do something like this: reg.coefsum - function(x,

RE: [R] regression problem

2004-03-26 Thread Wayne Jones
Consider a regression equation say:- Y=a+b1*X1+b2*X2+b3*X3 if all the regression coefficients have to sum to 0 then a+b1+b2+b3=0 i.e. b3=-a-b1-b2 Substituting this back into the regression equation we get Y=a(1-X3)+b1(X1-X3)+b2(X2-X3) All you need to do then is to create the new

[R] (marginal) dot diagram

2004-03-26 Thread ndesnoyers
I am attempting to plot something called a (marginal) dot diagram which is a regular scatterplot with an extra set of plots in the margins along both the X and Y axes. I have looked everywhere I can think for information. Can anyone give me any suggestions? Is there a single command that

Re: [R] multicolumn sort on dataframe?

2004-03-26 Thread Spencer Graves
?order Jeff D. Hamann wrote: I couldn't find any reference to this in the FAQ, but is it possible to sort a dataframe by multiple columns? I've created some code, similar to the following: nspr.code - sp.results$sp.code[order( sp.results$sp.code )] nspr.tpa - sp.results$tpa[order(

Re: [R] (marginal) dot diagram

2004-03-26 Thread Marc Schwartz
On Fri, 2004-03-26 at 10:41, [EMAIL PROTECTED] wrote: I am attempting to plot something called a (marginal) dot diagram which is a regular scatterplot with an extra set of plots in the margins along both the X and Y axes. I have looked everywhere I can think for information. Can anyone give me

RE: [R] (marginal) dot diagram

2004-03-26 Thread Simon Fear
Also try ?rug On Fri, 2004-03-26 at 10:41, [EMAIL PROTECTED] wrote: I am attempting to plot something called a (marginal) dot diagram which is a regular scatterplot with an extra set of plots in the margins along both the X and Y axes. I have looked everywhere I can think for

Re: [R] regression problem

2004-03-26 Thread Gabor Grothendieck
pnick at virgilio.it writes: i need to know how to estimate a linear regression whose coefficients sum to zero Transform the model: y = Xb + error to y = XPb + error where P is the projection onto the orthogonal complement of the vector 1. Solve this regression for b and then Pb

[R] color.ramp in maptools

2004-03-26 Thread Marco Albani
Dear list members, I am trying to use the maptools library to display geographical data. At the moment I have some trouble understanding how the auxvar variable is supposed to be used in the plot.Map function. I am using R Version 1.8.1 (2003-11-21) on Linux Looking at the plot.Map

[R] (Off topic) Text on General Linear Model.

2004-03-26 Thread Rolf Turner
A student (at another university) has contacted me for advice about a good text dealing with the general linear model (which she needs to know about for her thesis defense). [One might say that if she used the GLM in her thesis she ***ought*** to know about the concept already, but ought to and

[R] lme question

2004-03-26 Thread eesteves
Dear All, I need help both with analytical and computational aspects. My problem: I have counted and measured increments on otoliths (inner-ear bony structures) of fish larvae collected at different times of day. This was repeated three times for each fish larvae (in random order and no

Re: [R] With which version of XFree86 can R compile?

2004-03-26 Thread Marc Schwartz
On Fri, 2004-03-26 at 10:30, A.J. Rossini wrote: It isn't clear that R is currently friendly to the new XFree 4.4 license. I believe that there is an advertising clause for linking -- does anyone know if this has been addressed or clarified? I've not been following those issues for a few

Re: [R] Omegahat down?

2004-03-26 Thread Douglas Bates
Uwe Ligges [EMAIL PROTECTED] writes: Mark Fowle wrote: I was wondering the same thing. The traceroute seems to end at their border router, which leads me to believe that they has a hardware failure. Hoping that they get it up in a few days. I've checked around and there are a few

[R] Help import data

2004-03-26 Thread Ricardo Huaman
Friends: 1. Is it possible to import data from excel and/or access to R? How? 2. Is it possible to import data from a txt file? How? Thanks in advance, Ricardo. [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list

Re: [R] (Off topic) Text on General Linear Model.

2004-03-26 Thread Rolf Turner
Sorry to take up bandwidth, but Several people have already sent my suggestions for books about ***generalized*** linear models. My request was for suggestions as to books on ***GENERAL*** linear models, which is an (entirely?) different topic.

Re: [R] Help import data

2004-03-26 Thread Paulo Justiniano Ribeiro Jr
There is a Data Import/Export manual. Check it! For 2. see ?read.table On Fri, 26 Mar 2004, Ricardo Huaman wrote: Friends: 1. Is it possible to import data from excel and/or access to R? How? 2. Is it possible to import data from a txt file? How? Thanks in advance, Ricardo.

Re: [R] color.ramp in maptools

2004-03-26 Thread Roger Bivand
On Fri, 26 Mar 2004, Marco Albani wrote: Dear list members, I am trying to use the maptools library to display geographical data. At the moment I have some trouble understanding how the auxvar variable is supposed to be used in the plot.Map function. I am using R Version 1.8.1

Re: [R] How to do the significant test on Local Moran's I

2004-03-26 Thread Roger Bivand
On Sat, 27 Mar 2004, [gb2312] Louis wrote: Dear Danlin Yu: I read your message at https://stat.ethz.ch/pipermail/r-help/2003-April/030754.html. Actually, I have a question about significant of Local Moran I too. based on it's function: Ii = zi [¦²j wijzj],

[R] Mahalanobis

2004-03-26 Thread Alberto Murta
Dear all Why isn'it possible to calculate Mahalanobis distances with R for a matrix with 1 row (observations) more than the number of columns (variables)? mydata - matrix(runif(12,-5,5), 4, 3) mahalanobis(x=mydata, center=apply(mydata,2,mean), cov=var(mydata)) [1] 2.25 2.25 2.25 2.25 mydata

Re: [R] color.ramp in maptools

2004-03-26 Thread Roger Bivand
On Fri, 26 Mar 2004, Marco Albani wrote: Roger Bivand wrote: On Fri, 26 Mar 2004, Marco Albani wrote: At the moment I have some trouble understanding how the auxvar variable is supposed to be used in the plot.Map function. [...] I don't seem to be able to get any information on

Re: [R] stop() vs. error() ?

2004-03-26 Thread ivo welch
hi andy: yes, I know what it does. My suggestion would be to have a different command, that is a pure stop without error condition (with its message). A stop and an error are really two different things. regards, /ivo Liaw, Andy wrote: Please do read the documentation of the functions you

Re: [R] Omegahat down?

2004-03-26 Thread Peter Dalgaard
Douglas Bates [EMAIL PROTECTED] writes: The machine that was serving as Omegahat.org was compromised. We were going to move that site to another machine anyway so this attack has resulted in a somewhat accelerated schedule for the move. Before any one get's unduly paranoid: There's nothing

Re: [R] stop() vs. error() ?

2004-03-26 Thread Pierre Kleiber
The thing is that functions don't really stop... they return. So what you want is return() Cheers, Pierre ivo welch wrote: hi andy: yes, I know what it does. My suggestion would be to have a different command, that is a pure stop without error condition (with its message). A stop and an

Re: [R] update/offset

2004-03-26 Thread Prof Brian Ripley
Which version of R? This is supposedly fixed in 1.9.0 beta, so please try that. On Fri, 26 Mar 2004, Simon.Bond wrote: I've noticed that the update() function does not seem to work correctly when offset(..) terms are there: update(modelwithoffset, .~.-afixedeffect) drops the offset

Re: [R] Fwd: MDS problems [ajtee@ajtee.uklinux.net]

2004-03-26 Thread Prof Brian Ripley
If you `lie', you may find that the routines fail to converge, especially sammon -- it is not a good idea. On 26 Mar 2004, Jari Oksanen wrote: On Fri, 2004-03-26 at 15:02, Adam Tee wrote: Hi all, I'm trying to perform an MDS of some data that I have. When I use cmdscale everything

Re: [R] stop() vs. error() ?

2004-03-26 Thread James MacDonald
And a closer examination of the help page would lead you to this: options(show.error.messages=FALSE) stop() which is what I believe you want Jim James W. MacDonald Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI

[R] SUMMARY: Using R's LAPACK Related files in Visual C++

2004-03-26 Thread Greg Tarpinian
The following were the replies to my question about using R's LAPACK and other .h files in some of my C programs. From what was said, it appears that buying a ready-made library (MKL = $200, for example) or using CLapack according to the Shumway lecture notes are the best approaches:

RE: [R] Mahalanobis

2004-03-26 Thread Liaw, Andy
If I'm not mistaken, the data you generated form a simplex in the p-dimensional space. Mahalanobis distance for such data, using sample mean and covariance, just give the distance to the centroid after normalization. The normalization step make all the points equidistance from the centroid. To

[R] 3D globe plot

2004-03-26 Thread yshen004
Hi, This is Yan, a graduate student from Temple University. My current work involves drawing 3D plot in R or S-Plus. I have a dataset containing distances between 18 cities in 4 continents. Using classical multi-deminsional scaling in 2 dimensions, I could seperate them successfully and plot

Re: [R] With which version of XFree86 can R compile?

2004-03-26 Thread Prof Brian Ripley
Note this is not R as distributed by R-core (which does not have dataentry_mb.c) but I believe some `Japanized' distribution. People might want to check if the problem is in the changes (which I suspect) or R itself. On Fri, 26 Mar 2004, A.J. Rossini wrote: It isn't clear that R is currently

[R] R packages for S Poetry

2004-03-26 Thread Patrick Burns
Nick Efthymiou has created two R packages out of some of the functions from S Poetry. He obviously realized that I'm too much of a slouch to do it myself. They are Nick's packages, but they are available through the S Poetry page on http://www.burns-stat.com The packages are:

Re: [R] Aggregating frequency of irregular time series

2004-03-26 Thread Ivan Alves
To the extent that my daughter, work and sports activities leave me some time, for sure I will put together a function like AggregateSeries (maybe within the its package)! As for cointegration, much less likely to happen, especially in light of the development of the urca package. The

[R] trouble with paste()

2004-03-26 Thread Charles Annis, P.E.
Greetings: I'm trying to annotate a plot and find that I cannot correctly paste elements. When I do this: text(1.4, 1., paste(conditional density, \n, of y, given , expression(x == x[0])), adj=c(0.,0.)) The expression is not properly displayed. Resolving this is not urgent because the

[R] Aggregating frequency of irregular time series

2004-03-26 Thread Ivan Alves
Thanks to all once again for the very useful suggestions. I will have to teach myself some real S before tackling the writting of the AggregateSeries-like function! I brace myself. Kind regards, Ivan ___ Ivan Alves mailto://[EMAIL PROTECTED]

Re: [R] With which version of XFree86 can R compile?

2004-03-26 Thread Peter Dalgaard
Prof Brian Ripley [EMAIL PROTECTED] writes: Note this is not R as distributed by R-core (which does not have dataentry_mb.c) but I believe some `Japanized' distribution. People might want to check if the problem is in the changes (which I suspect) or R itself. Yes. On the other hand, the

Re: [R] trouble with paste()

2004-03-26 Thread Peter Dalgaard
Charles Annis, P.E. [EMAIL PROTECTED] writes: Greetings: I'm trying to annotate a plot and find that I cannot correctly paste elements. When I do this: text(1.4, 1., paste(conditional density, \n, of y, given , expression(x == x[0])), adj=c(0.,0.)) The expression is not properly

FW: [R] Gregmisc 'running' question

2004-03-26 Thread Warnes, Gregory R
[The new version of gregmisc will be showing up on CRAN shortly.] -Original Message- From: Warnes, Gregory R Sent: Friday, March 26, 2004 6:07 PM To: 'Sean Davis' Subject: RE: Quick running question Hi Sean, Congratulations, you found a bug! My running function took an improper

[R] Recall: Quick running question

2004-03-26 Thread Warnes, Gregory R
Warnes, Gregory R would like to recall the message, Quick running question. LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}} __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] RE: Quick running question

2004-03-26 Thread Warnes, Gregory R
[The new version of gregmisc will be showing up on CRAN shortly.] -Original Message- From: Warnes, Gregory R Sent: Friday, March 26, 2004 6:07 PM To: 'Sean Davis' Subject: RE: Quick running question Hi Sean, Congratulations, you found a bug! My running function took an

[R] gregmisc: install trouble

2004-03-26 Thread Christian Reilly
Hello all, I'm having trouble installing the package 'gregmisc'. I've run the command: R CMD INSTALL -l /usr/lib/R/library /tmp/gregmisc_0.9.0.tar.gz And I can see it shows up on the list of available packeage when I issue library() But when I do library(gregmisc) I get: Error in

RE: [R] stop() vs. error() ?

2004-03-26 Thread Liaw, Andy
So you still have not told us what exactly what you are looking for. What do you want some sort of stop() to do inside a function, that is neither an error nor returning? Can you show an example in some other language that has such a feature? Andy From: ivo welch [mailto:[EMAIL PROTECTED]

[R] Cluster Analysis with minimum cluster size?

2004-03-26 Thread Danny Heuman
Hi all, Is it possible to run kmeans, pam or clara with a constraint such that no resulting cluster has fewer than X cases? These kmeans algorithms often find clusters that are too small for my use. There are usually a few clusters with 1-10 cases (generally substantial outliers). I then have

Re: [R] stop() vs. error() ?

2004-03-26 Thread Andrew Robinson
Andy, I'm really not sure that he hasn't told us. All he wants to do is stop the process, without throwing an error. return() won't work if he's in a nested function, it will just send him up to the next level. For example, let's say he's in a loop and calling his function in the loop. If

Re: [R] stop() vs. error() ?

2004-03-26 Thread Pierre Kleiber
OK... how about defining a function exit() as follows exit - function() { + opt - options(show.error.messages=FALSE) + on.exit(options(opt)) + stop() +} then spend.time - function(i) { + print(i) + if (i == 5) { + exit() + } + if (i == 75) { + stop(Is this an error?) +

[R] dev.print

2004-03-26 Thread Scott Bartell
Hi, Shouldn't the following commands produce a nice jpeg file, or am I missing something? hist(rnorm(1000)) dev.print(file=test.jpg,device=jpeg) I get a very tiny (6x6 pixel) jpeg every time. Using dev.copy(file=test.jpg,device=jpeg) ; dev.off() instead of dev.print produces a perfectly

[R] a question about scoping functions

2004-03-26 Thread Rajarshi Guha
Hi, I've written some helper functions which are used by another function (called func()). When func() is sourced I dont want the helper function to be seen in the global namespace (as shown by ls()). Currently what I have done is: func - function() { helper1 - function() { ... }

Re: [R] dev.print

2004-03-26 Thread Dirk Eddelbuettel
On Fri, Mar 26, 2004 at 09:25:02PM -0500, Scott Bartell wrote: Shouldn't the following commands produce a nice jpeg file, or am I missing something? hist(rnorm(1000)) dev.print(file=test.jpg,device=jpeg) [...] R bug or my misunderstanding? The latter. The idiom is

RE: [R] a question about scoping functions

2004-03-26 Thread Liaw, Andy
Here's one possible alternative: - Write the helper functions outside of func(). - source() the file containing all the functions. - save(helper1, helper2, file=helperfuns.rda) - rm(helper1, helper2) - attach(helperfuns.rda) Eventually you may want to put things into a package... HTH, Andy

RE: [R] stop() vs. error() ?

2004-03-26 Thread Liaw, Andy
OK, I guess I'm dense (again?)... Stop where, and do what? I don't know many languages, but I haven't seen (or heard) any that allows stopping in the middle of a function and do nothing. What's the poor user to do at that point? The only thing I could think of is when the programmer is

[R] variable scope

2004-03-26 Thread Fred J.
Hello getdata - function(p){ fname - NULL; dl - list(NULL)#build the sturcture dt - read.csv(file.path(d,i),header=F) #data frame ret - builddl(dt,s) #where s is a string } how can I get this following function to use fname and dl from the above function without passing them down the