[Rd] PS driver crashes when no permissions (PR#8078)

2005-08-19 Thread jussi . jousimo
Full_Name: Jussi Jousimo
Version: 2.1.1
OS: Linux
Submission from: (NULL) (193.167.195.60)


R 2.1.1 crashes when it is trying to write a file with the postscript driver to
a directory, where the user has no permission to write. For example,
postscript("foo.ps") gives an error message: *** glibc detected *** free():
invalid pointer: 0x08a469b0 ***. The problem is at the PSDeviceDriver function
in the devPS.c file on line 2357 (free(dd);), where the same memory block is
tried to free the first time and then the second time at line 5138 (free(dev);).
I'd suggest to remove the first free function.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] PS driver crashes when no permissions (PR#8078)

2005-08-19 Thread ripley
This is already fixed in 2.1.1 patched: please see the resources the 
posting guide and FAQ ask you to consult _before_ sending a bug report!

 o  File creation errors in pdf(), postscript(), xfig() resulted
in a pointer being freed twice.  (Reported by Matt McCall)

As the FAQ says

   If a bug has already been reported or fixed, please do not submit
   further bug reports on it.


On Fri, 19 Aug 2005 [EMAIL PROTECTED] wrote:

> Full_Name: Jussi Jousimo
> Version: 2.1.1
> OS: Linux
> Submission from: (NULL) (193.167.195.60)
>
>
> R 2.1.1 crashes when it is trying to write a file with the postscript driver 
> to
> a directory, where the user has no permission to write. For example,
> postscript("foo.ps") gives an error message: *** glibc detected *** free():
> invalid pointer: 0x08a469b0 ***. The problem is at the PSDeviceDriver function
> in the devPS.c file on line 2357 (free(dd);), where the same memory block is
> tried to free the first time and then the second time at line 5138 
> (free(dev);).
> I'd suggest to remove the first free function.
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] problem using model.frame()

2005-08-19 Thread Gavin Simpson
On Thu, 2005-08-18 at 09:00 -0400, Gabor Grothendieck wrote:
> I think this one is a hard call.  Designing software is a
> series of tradeoffs. Its nice to maintain consistency with
> the R base, but in case of extensions (rather than changing
> behavior) as in this case, the argument against the change
> carries less weight.
> 
> The main problems with extensions are (1) that one has to
> remember which functions/packages have which extensions if
> one is to use them and (2) they can interfere with other
> future extensions.
> 
> On the other hand, if one is using a particular package a
> lot then convenience features like this may be attractive.
> Also, packages are where authors have the freedom to try out 
> new ideas and new functionality without being constrained.
> 
> Perhaps, if the extension in question is added there could be 
> a warning in the help file that this is a convenience feature 
> of this particular package and is not generally available 
> throughout R.

Thanks again Gabor for another useful contribution to this debate. Also
thanks to Martin, Gabor and Jari for their comments, ideas, suggestions
and viewpoints.

I still like y1 ~ y2 (both data frames), but during my bike ride to work
this morning I considered both sides of the argument and my position has
moved towards the R way of doing things - far be it for little old me to
go against years of S-formula tradition. So I'll revert the code back to
accepting y1 ~ ., data = y2 and leave it to throw an error for the rhs
being a data frame case.

Once again, thank you for helping me work through this dilemma.

All the best,

Gav

> On 8/18/05, Gavin Simpson <[EMAIL PROTECTED]> wrote:
> > On Thu, 2005-08-18 at 07:57 +0300, Jari Oksanen wrote:
> > > On 18 Aug 2005, at 1:49, Gavin Simpson wrote:
> > >
> > > > On Wed, 2005-08-17 at 20:24 +0200, Martin Maechler wrote:
> > > >>> "GS" == Gavin Simpson <[EMAIL PROTECTED]>
> > > >>> on Tue, 16 Aug 2005 18:44:23 +0100 writes:
> > > >>
> > > >> GS> On Tue, 2005-08-16 at 12:35 -0400, Gabor Grothendieck
> > > >> GS> wrote:
> > >  On 8/16/05, Gavin Simpson <[EMAIL PROTECTED]>
> > >  wrote: > On Tue, 2005-08-16 at 11:25 -0400, Gabor
> > >  Grothendieck wrote: > > It can handle data frames like
> > >  this:
> > > >>
> > > >> model.frame(y1) > > or > > model.frame(~., y1)
> > > >
> > > > Thanks Gabor,
> > > >
> > > > Yes, I know that works, but I want the function
> > >  coca.formula to accept a > formula like this y2 ~ y1,
> > >  with both y1 and y2 being data frames. It is
> > > 
> > >  The expressions I gave work generally (i.e. lm, glm,
> > >  ...), not just in model.matrix, so would it be ok if the
> > >  user just does this?
> > > 
> > >  yourfunction(y2 ~., y1)
> > > >>
> > > >> GS> Thanks again Gabor for your comments,
> > > >>
> > > >> GS> I'd prefer the y1 ~ y2 as data frames - as this is the
> > > >> GS> most natural way of doing things. I'd like to have (y2
> > > >> GS> ~., y1) as well, and (y2 ~ spp1 + spp2 + spp3, y1) also
> > > >> GS> work - silently without any trouble.
> > > >>
> > > >> I'm sorry, Gavin, I tend to disagree quite a bit.
> > > >>
> > > >> The formula notation has quite a history in the S language, and
> > > >> AFAIK never was the idea to use data.frames as formula
> > > >> components, but rather as "environments" in which formula
> > > >> components are looked up --- exactly as Gabor has explained.
> > > >
> > > > Hi Martin, thanks for your comments,
> > > >
> > > > But then one could have a matrix of variables on the rhs of the formula
> > > > and it would work - whether this is a documented feature or un-intended
> > > > side-effect of matrices being stored as vectors with dims, I don't
> > > > know.
> > > >
> > > > And whilst the formula may have a long history, a number of packages
> > > > have extended the interface to implement a specific feature, which
> > > > don't
> > > > work with standard functions like lm, glm and friends. I don't see how
> > > > what I wanted to achieve is greatly different to that or using a
> > > > matrix.
> > > >
> > > >> To break with such a deeply rooted principle,
> > > >> you should have very very good reasons, because you're breaking
> > > >> the concepts on which all other uses of formulae are based.
> > > >> And this would potentially lead to much confusion of your users,
> > > >> at least in the way they should learn to think about what
> > > >> formulae mean.
> > > >
> > > > In the end I managed to treat y1 ~ y2 (both data frames) as a special
> > > > case, which allows the existing formula notation to work as well, so I
> > > > can use y1 ~ y2, y1 ~ ., data = y2, or y1 ~ var + var2, data = y2. This
> > > > is what I wanted all along, to extend my interface (not do anything to
> > > > R's formulae), but to also work in the traditional sense.
> > > >
> > > > The model I am writing code for really is modelling the relation

[Rd] SciViews-R v8.7 and Rcmdr v1.0-2 (PR#8079)

2005-08-19 Thread haydin
Full_Name: Hamit AYDIN
Version: R v2.1.1
OS: winxp
Submission from: (NULL) (194.27.40.230)


When I try to run sciviews the consol opens but when I try to import text,
spss... it tries to load rmcdr pakage gives me "the pakage can not be find inthe
Package or bundle 'Rcmdr' was not found in C:\PROGRA~1\R\rw2011\library.  Would
you like to install it now?" I know the pakage in ther and it runs in R.


Sciview consol
Loading required package: datasets
Loading required package: utils
Loading required package: grDevices
Loading required package: graphics
Loading required package: stats
Loading required package: methods
Loading required package: tcltk
Loading Tcl/Tk interface ... done
Loading required package: R2HTML
Loading required package: svMisc
Loading required package: svIO
Loading required package: svViews
Loading required package: Rcmdr
Loading required package: rgl
Loading required package: zoo
Loading required package: strucchange
Loading required package: sandwich
Loading required package: relimp
Loading required package: nnet
Loading required package: nlme
Loading required package: mvtnorm
Loading required package: multcomp
Loading required package: mgcv
This is mgcv 1.3-5 
Loading required package: MASS
Loading required package: lmtest
Loading required package: lattice
Loading required package: grid
Loading required package: foreign
Loading required package: effects
Loading required package: car
Loading required package: abind
Error in get(x, envir, mode, inherits) : variable "version" was not found
Error: .onAttach failed in 'attachNamespace'
Warning in Require(Rcmdr) : Missing package or bundle 'Rcmdr' was neither
installed nor loaded
Error in get(x, envir, mode, inherits) : variable "crisp.dialogs" was not found
»

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] minor typo in Writing R Extensions

2005-08-19 Thread Patrick Burns
On page 10 (section 1.1.4) of Writing R Extensions
version 2.1.1 the following two phrases appear:

define these function in a file

after the packages is

The 's' from 'functions' fell down the page and attached
itself to 'package'.

Patrick Burns
[EMAIL PROTECTED]
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and "A Guide for the Unwilling S User")

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] SciViews-R v8.7 and Rcmdr v1.0-2 (PR#8079)

2005-08-19 Thread Philippe Grosjean
Hello,

I am currently finishing version 0.8-8 of SciViews, which correct these 
bug and is now completely compatible with R 2.1.1 and Rcmdr 1.1-1.
This new version will be available within one week at 
http://www.sciviews.org/SciViews-R
Best,

Philippe Grosjean

..<°}))><
  ) ) ) ) )
( ( ( ( (Prof. Philippe Grosjean
  ) ) ) ) )
( ( ( ( (Numerical Ecology of Aquatic Systems
  ) ) ) ) )   Mons-Hainaut University, Pentagone (3D08)
( ( ( ( (Academie Universitaire Wallonie-Bruxelles
  ) ) ) ) )   8, av du Champ de Mars, 7000 Mons, Belgium
( ( ( ( (
  ) ) ) ) )   phone: + 32.65.37.34.97, fax: + 32.65.37.30.54
( ( ( ( (email: [EMAIL PROTECTED]
  ) ) ) ) )
( ( ( ( (web:   http://www.umh.ac.be/~econum
  ) ) ) ) )  http://www.sciviews.org
( ( ( ( (
..

[EMAIL PROTECTED] wrote:
> Full_Name: Hamit AYDIN
> Version: R v2.1.1
> OS: winxp
> Submission from: (NULL) (194.27.40.230)
> 
> 
> When I try to run sciviews the consol opens but when I try to import text,
> spss... it tries to load rmcdr pakage gives me "the pakage can not be find 
> inthe
> Package or bundle 'Rcmdr' was not found in C:\PROGRA~1\R\rw2011\library.  
> Would
> you like to install it now?" I know the pakage in ther and it runs in R.
> 
> 
> Sciview consol
> Loading required package: datasets
> Loading required package: utils
> Loading required package: grDevices
> Loading required package: graphics
> Loading required package: stats
> Loading required package: methods
> Loading required package: tcltk
> Loading Tcl/Tk interface ... done
> Loading required package: R2HTML
> Loading required package: svMisc
> Loading required package: svIO
> Loading required package: svViews
> Loading required package: Rcmdr
> Loading required package: rgl
> Loading required package: zoo
> Loading required package: strucchange
> Loading required package: sandwich
> Loading required package: relimp
> Loading required package: nnet
> Loading required package: nlme
> Loading required package: mvtnorm
> Loading required package: multcomp
> Loading required package: mgcv
> This is mgcv 1.3-5 
> Loading required package: MASS
> Loading required package: lmtest
> Loading required package: lattice
> Loading required package: grid
> Loading required package: foreign
> Loading required package: effects
> Loading required package: car
> Loading required package: abind
> Error in get(x, envir, mode, inherits) : variable "version" was not found
> Error: .onAttach failed in 'attachNamespace'
> Warning in Require(Rcmdr) : Missing package or bundle 'Rcmdr' was neither
> installed nor loaded
> Error in get(x, envir, mode, inherits) : variable "crisp.dialogs" was not 
> found
> »
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 
>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Implementing a single-precision class with raw

2005-08-19 Thread Colin A. Smith
A package that I develop (xcms) sometimes needs to read and process 
vectors several hundreds of megabytes in size. (They only represent 
parts of a large data sets which can approach nearly 100GB.) 
Unfortunately, R sometimes hits the 2GB memory limit of Win32. To help 
cut the memory footprint in half, I'm implementing a "float" class as a 
subclass of "raw". Because almost all the computation on the large 
vectors is done in C code, having a somewhat limited single-precision 
data type is okay.

I've run into a limitation with the .C() function where it does not 
handle raw vectors, which it will do in 2.2.0. In the meantime, I'm 
using the .Call() function to access the raw vectors. However, there 
don't seem to be any macros for handling raw vectors in Rdefines.h. 
I've made a guess at what those macros would be and was wondering 
whether my guesses were correct and/or might be included in 2.2.0:

#define NEW_RAW(n) allocVector(RAWSXP,n)
#define RAW_POINTER(x) (RAW(x))
#define AS_RAW(x) coerceVector(x,RAWSXP)

I'm not sure whether coerceVector(x,RAWSXP) will actually work. Also, 
there isn't an Rf_isRaw() function, which would be useful for an 
IS_RAW(x) macro.

Another issue with the "float" class is that it will run into endian 
issues if it ever gets saved to disk and moved cross-platform. I don't 
really anticipate that happening but it might be nice to incorporate 
serialization hooks if possible. Are there any facilities in R for 
doing that?

Thanks for any feedback or suggestions.

-Colin

http://abagyan.scripps.edu/~csmith/float.R
http://abagyan.scripps.edu/~csmith/float.c


__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel