[Rd] Error in compactPDF/find_gs_cmd or documentation?

2014-07-14 Thread Jon Olav Skoien

I am using tools::compactPDF for reducing the size of some pdf-files 
with GhostScript. I had some trouble in the beginning as the 
documentation seems not to match the usage of the function. For 
GhostScript, one has to set the argument gs_cmd, which has the following 
description:
gs_cmd - Character string giving the path to the GhostScript executable, 
if that is to be used. On Windows this is the path to 'gswin32c.exe' or 
'gswin64c.exe'. If "", the function will try to find a platform-specific 
path to GhostScript.

The first part seems not to work as described. If gs_cmd is given, this 
is passed to find_gs_cmd. This function will then call:
Sys.which(gs_cmd)
which rather takes the name of the executable as input. I guess either 
the documentation should be changed to refer to the name of the 
GhostScript executable, or the function should be changed to use the 
given path.

Best wishes,
Jon

-- 
Jon Olav Skøien
Joint Research Centre - European Commission
Institute for Environment and Sustainability (IES)
Climate Risk Management Unit

Disclaimer: Views expressed in this email are those of the individual and do 
not necessarily represent official views of the European Commission.



[[alternative HTML version deleted]]

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


Re: [Rd] Error in compactPDF/find_gs_cmd or documentation?

2014-07-14 Thread Henrik Bengtsson
Seems related to:

https://stat.ethz.ch/pipermail/r-devel/2012-May/064213.html

Henrik
On Jul 14, 2014 10:45 AM, "Jon Olav Skoien" 
wrote:

>
> I am using tools::compactPDF for reducing the size of some pdf-files
> with GhostScript. I had some trouble in the beginning as the
> documentation seems not to match the usage of the function. For
> GhostScript, one has to set the argument gs_cmd, which has the following
> description:
> gs_cmd - Character string giving the path to the GhostScript executable,
> if that is to be used. On Windows this is the path to 'gswin32c.exe' or
> 'gswin64c.exe'. If "", the function will try to find a platform-specific
> path to GhostScript.
>
> The first part seems not to work as described. If gs_cmd is given, this
> is passed to find_gs_cmd. This function will then call:
> Sys.which(gs_cmd)
> which rather takes the name of the executable as input. I guess either
> the documentation should be changed to refer to the name of the
> GhostScript executable, or the function should be changed to use the
> given path.
>
> Best wishes,
> Jon
>
> --
> Jon Olav Skřien
> Joint Research Centre - European Commission
> Institute for Environment and Sustainability (IES)
> Climate Risk Management Unit
>
> Disclaimer: Views expressed in this email are those of the individual and
> do not necessarily represent official views of the European Commission.
>
>
>
> [[alternative HTML version deleted]]
>
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

[[alternative HTML version deleted]]

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


[Rd] cummax / cummin for complex numbers

2014-07-14 Thread Michael Haupt
Dear all,

in R 3.1.0, this is happening:

> cummin(c(1+1i,2-3i,4+5i))
Error in cummin(c(1 + (0+1i), 2 - (0+3i), 4 + (0+5i))) : 
  'cummax' not defined for complex numbers
> cummax(c(1+1i,2-3i,4+5i))
Error in cummax(c(1 + (0+1i), 2 - (0+3i), 4 + (0+5i))) : 
  'cummin' not defined for complex numbers

It may be fixed in R-devel, but I thought I'd mention it to make sure ...

Best,

Michael

-- 
Dr. Michael Haupt
Principal Member of Technical Staff
Phone: +49 331 200 7277, Fax: +49 331 200 7561
Oracle Labs
Oracle Deutschland B.V. & Co. KG, Schiffbauergasse 14, 14467 Potsdam, Germany

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


Re: [Rd] proposed change of check message when VIgnetteBuilder package is not declared as a dependency

2014-07-14 Thread Brian Diggs

On 7/11/2014 4:49 PM, Dan Tenenbaum wrote:> Hi,
>
> I notice in R-3.1.1, if a package specifies a VignetteBuilder (such
> as knitr) in its DESCRIPTION file, butdoes not also depend on the
> specified package (in either Depends, Imports, or Suggests), that R
> CMD check will say:
>
> * checking package dependencies ... ERROR
> VignetteBuilder package not declared: ‘knitr’
>
> I'm glad this situation is now caught by R CMD check, but I think
> the message text should be changed, because the message is confusing.
> Indeed, the VignetteBuilder package *was* declared, in the
> VignetteBuilder line. The problem is that there's no dependency on it,
> so no automated way to install it for building or checking.
>
> Can the message instead say something like:
>
> Package 'knitr' must be in Depends, Imports, or Suggests field of
> DESCRIPTION file.
>
> ?

You shouldn't leave out the information that the package in question is 
being mentioned because it is declared in VignetteBuilder. I would 
suggest something more like:


VignetteBuilder package 'knitr' must be in Depends, Imports, or Suggests 
field of DESCRIPTION file.


--
Brian S. Diggs, PhD
Senior Research Associate, Department of Surgery
Oregon Health & Science University

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


Re: [Rd] cummax / cummin for complex numbers

2014-07-14 Thread Marc Schwartz

On Jul 14, 2014, at 9:53 AM, Michael Haupt  wrote:

> Dear all,
> 
> in R 3.1.0, this is happening:
> 
>> cummin(c(1+1i,2-3i,4+5i))
> Error in cummin(c(1 + (0+1i), 2 - (0+3i), 4 + (0+5i))) : 
>  'cummax' not defined for complex numbers
>> cummax(c(1+1i,2-3i,4+5i))
> Error in cummax(c(1 + (0+1i), 2 - (0+3i), 4 + (0+5i))) : 
>  'cummin' not defined for complex numbers
> 
> It may be fixed in R-devel, but I thought I'd mention it to make sure ...
> 
> Best,
> 
> Michael


The help file for cummax/cummin in 3.1.1 specifically states:

x  a numeric or complex (not cummin or cummax) object, or an object 
that can be coerced to one of these.


So why would you expect it to work for cummin or cummax when you pass a complex 
'x'?

Regards,

Marc Schwartz

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


Re: [Rd] cummax / cummin for complex numbers

2014-07-14 Thread Ben Bolker
Michael Haupt  oracle.com> writes:

> 
> Dear all,
> 
> in R 3.1.0, this is happening:
> 
> > cummin(c(1+1i,2-3i,4+5i))
> Error in cummin(c(1 + (0+1i), 2 - (0+3i), 4 + (0+5i))) : 
>   'cummax' not defined for complex numbers
> > cummax(c(1+1i,2-3i,4+5i))
> Error in cummax(c(1 + (0+1i), 2 - (0+3i), 4 + (0+5i))) : 
>   'cummin' not defined for complex numbers
> 
> It may be fixed in R-devel, but I thought I'd mention it to make sure ...
> 
> Best,
> 
> Michael

  Well, it is documented in the development version:

   x: a numeric or complex (not ‘cummin’ or ‘cummax’) object, or an
  object that can be coerced to one of these.

I imagine the problem is in coming up with a good, consistent definition
of the min/max for complex numbers: would you prefer min/max modulus,
phase, real part, imaginary part ... ? max()/min() aren't even defined
for complex numbers in R ...

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


Re: [Rd] cummax / cummin for complex numbers

2014-07-14 Thread Duncan Temple Lang
I believe Michael's point is that the error messages
are incorrect - referring to cunmax when cunmin was called
and vice verse.

 D.

On 7/14/14, 8:14 AM, Ben Bolker wrote:
> Michael Haupt  oracle.com> writes:
> 
>>
>> Dear all,
>>
>> in R 3.1.0, this is happening:
>>
>>> cummin(c(1+1i,2-3i,4+5i))
>> Error in cummin(c(1 + (0+1i), 2 - (0+3i), 4 + (0+5i))) : 
>>   'cummax' not defined for complex numbers
>>> cummax(c(1+1i,2-3i,4+5i))
>> Error in cummax(c(1 + (0+1i), 2 - (0+3i), 4 + (0+5i))) : 
>>   'cummin' not defined for complex numbers
>>
>> It may be fixed in R-devel, but I thought I'd mention it to make sure ...
>>
>> Best,
>>
>> Michael
> 
>   Well, it is documented in the development version:
> 
>x: a numeric or complex (not ‘cummin’ or ‘cummax’) object, or an
>   object that can be coerced to one of these.
> 
> I imagine the problem is in coming up with a good, consistent definition
> of the min/max for complex numbers: would you prefer min/max modulus,
> phase, real part, imaginary part ... ? max()/min() aren't even defined
> for complex numbers in R ...
> 
> __
> 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


Re: [Rd] cummax / cummin for complex numbers

2014-07-14 Thread Marc Schwartz
Ah! That was not clear and this early on a Monday morning, insufficient 
caffeine levels are common. :-)

I can confirm that this is still an issue in 3.1.1, which is a version newer 
than what Michael is running and the current stable release. 

They appear to be still reversed in the current SVN trunk (aka R-Devel):

  https://svn.r-project.org/R/trunk/src/main/cum.c

Regards,

Marc

On Jul 14, 2014, at 10:18 AM, Duncan Temple Lang  
wrote:

> I believe Michael's point is that the error messages
> are incorrect - referring to cunmax when cunmin was called
> and vice verse.
> 
> D.
> 
> On 7/14/14, 8:14 AM, Ben Bolker wrote:
>> Michael Haupt  oracle.com> writes:
>> 
>>> 
>>> Dear all,
>>> 
>>> in R 3.1.0, this is happening:
>>> 
 cummin(c(1+1i,2-3i,4+5i))
>>> Error in cummin(c(1 + (0+1i), 2 - (0+3i), 4 + (0+5i))) : 
>>>  'cummax' not defined for complex numbers
 cummax(c(1+1i,2-3i,4+5i))
>>> Error in cummax(c(1 + (0+1i), 2 - (0+3i), 4 + (0+5i))) : 
>>>  'cummin' not defined for complex numbers
>>> 
>>> It may be fixed in R-devel, but I thought I'd mention it to make sure ...
>>> 
>>> Best,
>>> 
>>> Michael
>> 
>>  Well, it is documented in the development version:
>> 
>>   x: a numeric or complex (not ‘cummin’ or ‘cummax’) object, or an
>>  object that can be coerced to one of these.
>> 
>> I imagine the problem is in coming up with a good, consistent definition
>> of the min/max for complex numbers: would you prefer min/max modulus,
>> phase, real part, imaginary part ... ? max()/min() aren't even defined
>> for complex numbers in R ...

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


Re: [Rd] cummax / cummin for complex numbers

2014-07-14 Thread Michael Haupt
.. spot on. :-)

Apologies for not having been more "pointy" about the problem - this just 
confirms it *is* kind of subtle. :-)

Best,

Michael

Am 14.07.2014 um 17:18 schrieb Duncan Temple Lang :

> I believe Michael's point is that the error messages
> are incorrect - referring to cunmax when cunmin was called
> and vice verse.
> 
> D.
> 
> On 7/14/14, 8:14 AM, Ben Bolker wrote:
>> Michael Haupt  oracle.com> writes:
>> 
>>> 
>>> Dear all,
>>> 
>>> in R 3.1.0, this is happening:
>>> 
 cummin(c(1+1i,2-3i,4+5i))
>>> Error in cummin(c(1 + (0+1i), 2 - (0+3i), 4 + (0+5i))) : 
>>>  'cummax' not defined for complex numbers
 cummax(c(1+1i,2-3i,4+5i))
>>> Error in cummax(c(1 + (0+1i), 2 - (0+3i), 4 + (0+5i))) : 
>>>  'cummin' not defined for complex numbers
>>> 
>>> It may be fixed in R-devel, but I thought I'd mention it to make sure ...
>>> 
>>> Best,
>>> 
>>> Michael
>> 
>>  Well, it is documented in the development version:
>> 
>>   x: a numeric or complex (not ‘cummin’ or ‘cummax’) object, or an
>>  object that can be coerced to one of these.
>> 
>> I imagine the problem is in coming up with a good, consistent definition
>> of the min/max for complex numbers: would you prefer min/max modulus,
>> phase, real part, imaginary part ... ? max()/min() aren't even defined
>> for complex numbers in R ...

-- 
Dr. Michael Haupt
Principal Member of Technical Staff
Phone: +49 331 200 7277, Fax: +49 331 200 7561
Oracle Labs
Oracle Deutschland B.V. & Co. KG, Schiffbauergasse 14, 14467 Potsdam, Germany

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


Re: [Rd] how to list external dependencies (i.e., non-R packages)?

2014-07-14 Thread Michael Lawrence
One idea is to wrap system libraries in R packages. This is what Martin did
for zlib with zlibbioc. That's feasible for a tiny library like zlib; for
other things this approach would not be feasible. For imlib2 and
imagemagick, it might be. Someone has to maintain it, and there would need
to be careful consideration of licenses, but there are obvious gains from
integrating with the R package framework. Ideally, packages would share the
same system library package dependency.




On Sun, Jul 13, 2014 at 1:08 PM, Kasper Daniel Hansen <
kasperdanielhan...@gmail.com> wrote:

> Several packages in Bioconductor (and possibly CRAN) uses
>   SystemRequirements
> in DESCRIPTION, but unless the user reads the DESCRIPTION file, this is for
> naught.  Still useful to some people I think.
>
> Best,
> Kasper
>
>
> On Sun, Jul 13, 2014 at 9:13 PM, Greg Minshall  wrote:
>
> > hi.  i'm working on a package which only works if one (or both) of two
> > libraries (Imlib2 and MagickWand) exist on the machine on which the
> > package is compiled and executed.  as currently written, the program
> > purposely generates an error at *compile* time if neither library is
> > available (thinking the earlier the user is notified, the less
> > frustrating).
> >
> > is there a way of specifying this dependency in, say, the DESCRIPTION
> > file?  (seems unlikely, as this is what the whole autotools/configure.ac
> > framework is supposed to deal with.)
> >
> > or, should i take out the compile time error (maybe replace my #error
> > with a #warning), and just generate at error at run time?  (this will
> > require me to figure out what that means for build tests/, but obviously
> > some sort of hack is doable.)
> >
> > cheers, Greg
> >
> > __
> > R-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
> >
>
> [[alternative HTML version deleted]]
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

[[alternative HTML version deleted]]

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