[Rd] Windows binary packages & R-Forge

2008-05-07 Thread Yohan Chalabi
Hi room,

There seems to be a problem with the Windows building machines of
R-Forge. All our packages with Fortran source code cannot be compiled
for Windows. The error in the log file is

make[3]: gfortran: Command not found

It seems that gfortran is not installed. Is there any plan to fix this
or am I doing something wrong on R-Forge?

thanks in advance for your advises.

regards,
Yohan

-- 
PhD student
Swiss Federal Institute of Technology
Zurich

www.ethz.ch
www.rmetrics.org

NOTE:
Rmetrics Workshop: http://www.rmetrics.org/meielisalp.htm
June 29th - July 3rd Meielisalp, Lake Thune, Switzerland

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


Re: [Rd] Windows binary packages & R-Forge

2008-05-07 Thread Jari Oksanen

On Wed, 2008-05-07 at 09:48 +0200, Yohan Chalabi wrote:
> Hi room,
> 
> There seems to be a problem with the Windows building machines of
> R-Forge. All our packages with Fortran source code cannot be compiled
> for Windows. The error in the log file is
> 
> make[3]: gfortran: Command not found
> 
> It seems that gfortran is not installed. Is there any plan to fix this
> or am I doing something wrong on R-Forge?
> 
> thanks in advance for your advises.
Dear Yohan Chalabi,

This has been reported on R-Forge support forum on 29 April, 2008:

https://r-forge.r-project.org/tracker/index.php?func=detail&aid=139&group_id=34&atid=194

Thomas Petzold even posted there the probable cure. I hope the issue
will be solved some day soon.

cheers, jari oksanen
-- 
Jari Oksanen <[EMAIL PROTECTED]>

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


Re: [Rd] Windows binary packages & R-Forge

2008-05-07 Thread Prof Brian Ripley
Please report this to R-forge, not here -- it is not an R development 
issue (as e.g. R itself and the CRAN packages are being built).


It looks like they don't have the correct Rtools (27 or 28) installed.

You can use win-builder to get a Windows binary built.

On Wed, 7 May 2008, Yohan Chalabi wrote:


Hi room,

There seems to be a problem with the Windows building machines of
R-Forge. All our packages with Fortran source code cannot be compiled
for Windows. The error in the log file is

make[3]: gfortran: Command not found

It seems that gfortran is not installed. Is there any plan to fix this
or am I doing something wrong on R-Forge?

thanks in advance for your advises.

regards,
Yohan

--
PhD student
Swiss Federal Institute of Technology
Zurich

www.ethz.ch
www.rmetrics.org

NOTE:
Rmetrics Workshop: http://www.rmetrics.org/meielisalp.htm
June 29th - July 3rd Meielisalp, Lake Thune, Switzerland

__
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] texi2dvi instead of pdflatex in R2.7.0? and related bioc 2.2 builds

2008-05-07 Thread Prof Brian Ripley

It is also working for me, so it is almost certainly local to you.

Sometimes you can get more information by running 'R CMD check', which 
also builds the vignettes but leaves logs in pkg.Rcheck/inst/doc .


On Sun, 4 May 2008, Oleg Sklyar wrote:


Dear lists:

I am somewhat puzzled by the use of texi2dvi/pdflatex in R2.7.0. When 
building EBImage (bioconductor) with 2.7.0 I get the same error both in 
Windows and Linux, which reads the following:


** building package indices ...
* DONE (EBImage)
* creating vignettes ... ERROR
/usr/bin/texi2dvi: pdflatex exited with bad status, quitting.
Error in texi2dvi(file = bft, pdf = TRUE, clean = FALSE, quiet = quiet) :
 running 'texi2dvi' on 'AnalysisWithEBImage.tex' failed
Calls: buildVignettes -> texi2dvi
Execution halted


The tex file includes links to png graphics and this might be the reason. 
Running pdflatex on the generated tex file directly produces a nice pdf in 
both Linux and Windows. And this seems have been the default in previous 
version of R.


Now the puzzles are:

1) the bioc build system also uses 2.7.0 and builds vignettes just fine on 
both Windows and Linux:


* DONE (EBImage)
* creating vignettes ... OK
* removing junk files
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building 'EBImage_2.4.0.tar.gz'

2) have the tex settings been changed from 2.6.0 into 2.7.0 as changes to 
vignette have not been significant and the compilation goes through fine with 
2.6.0.


Not that I am aware of.


Or I am missing something and doing something wrong?

Best,
Oleg

--
Dr Oleg Sklyar * EBI-EMBL, Cambridge CB10 1SD, UK * +44-1223-494466

__
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


[Rd] optional setValidity()

2008-05-07 Thread Robin Hankin

Hi


Suppose I have an S4 class "foo" and a validity checking
function  ".checkfoo()":

setClass("foo",  representation=representation("numeric"))
setValidity("foo" , .checkfoo)

is fine; in my application, .checkfoo() verifies that a bunch
of necessary conditions are met.

But .checkfoo() is very time consuming and I want
to give users the option of switching it off.

Most foo objects that one deals with fall into two or three standard  
types

and in these cases one doesn't need to execute  .checkfoo()
because one can show algebraically that the conditions are
automatically met.

But OTOH, I want the check to be performed "by default" to
stop anyone (me) from being too clever and defining
a non-standard foo object that doesn't meet .checkfoo().

What is best practice here?

Are there any examples I could copy?





--
Robin Hankin
Uncertainty Analyst and Neutral Theorist,
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
 tel  023-8059-7743

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


Re: [Rd] optional setValidity()

2008-05-07 Thread Sklyar, Oleg (MI London)
You could add a flag to your class and check if it set as a first thing
in the validity as in the example below:

setClass("foo", 
  representation("numeric", .validate="logical"), 
  prototype(.validate=TRUE),
  validity=function(object) {
if ([EMAIL PROTECTED]) TRUE
## do lengthy checks
  }
)

setGeneric("foo", function(x, ...) standardGeneric("foo"))
setMethod("foo", signature(x="numeric"),
  function(x, ..., validate=TRUE) new("foo", ..., .validate=validate)
)

a = foo(runif(10), validate=FALSE)
## or
b = new("foo", runif(10), .validate=FALSE)
## or do validate
d = foo(runif(10))
e = new("foo", runif(10))

The downside is that you carry unnecessary information around in your
objects.

Best,

Dr Oleg Sklyar
Technology Group
Man Investments Ltd
+44 (0)20 7144 3803
[EMAIL PROTECTED] 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Robin Hankin
> Sent: 07 May 2008 15:44
> To: R-devel@r-project.org
> Subject: [Rd] optional setValidity()
> 
> Hi
> 
> 
> Suppose I have an S4 class "foo" and a validity checking 
> function  ".checkfoo()":
> 
> setClass("foo",  representation=representation("numeric"))
> setValidity("foo" , .checkfoo)
> 
> is fine; in my application, .checkfoo() verifies that a bunch 
> of necessary conditions are met.
> 
> But .checkfoo() is very time consuming and I want to give 
> users the option of switching it off.
> 
> Most foo objects that one deals with fall into two or three 
> standard types and in these cases one doesn't need to execute 
>  .checkfoo() because one can show algebraically that the 
> conditions are automatically met.
> 
> But OTOH, I want the check to be performed "by default" to 
> stop anyone (me) from being too clever and defining a 
> non-standard foo object that doesn't meet .checkfoo().
> 
> What is best practice here?
> 
> Are there any examples I could copy?
> 
> 
> 
> 
> 
> --
> Robin Hankin
> Uncertainty Analyst and Neutral Theorist, National 
> Oceanography Centre, Southampton European Way, Southampton 
> SO14 3ZH, UK
>   tel  023-8059-7743
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 


**
The contents of this email are for the named addressee(s...{{dropped:22}}

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


Re: [Rd] optional setValidity()

2008-05-07 Thread Sklyar, Oleg (MI London)
sorry I forgot the return statement, it should be
if ([EMAIL PROTECTED]) return(TRUE)

Dr Oleg Sklyar
Technology Group
Man Investments Ltd
+44 (0)20 7144 3803
[EMAIL PROTECTED] 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Sklyar, 
> Oleg (MI London)
> Sent: 07 May 2008 16:13
> To: Robin Hankin; R-devel@r-project.org
> Subject: Re: [Rd] optional setValidity()
> 
> You could add a flag to your class and check if it set as a 
> first thing in the validity as in the example below:
> 
> setClass("foo",
>   representation("numeric", .validate="logical"),
>   prototype(.validate=TRUE),
>   validity=function(object) {
> if ([EMAIL PROTECTED]) TRUE
> ## do lengthy checks
>   }
> )
> 
> setGeneric("foo", function(x, ...) standardGeneric("foo")) 
> setMethod("foo", signature(x="numeric"),
>   function(x, ..., validate=TRUE) new("foo", ..., .validate=validate)
> )
> 
> a = foo(runif(10), validate=FALSE)
> ## or
> b = new("foo", runif(10), .validate=FALSE) ## or do validate 
> d = foo(runif(10)) e = new("foo", runif(10))
> 
> The downside is that you carry unnecessary information around 
> in your objects.
> 
> Best,
> 
> Dr Oleg Sklyar
> Technology Group
> Man Investments Ltd
> +44 (0)20 7144 3803
> [EMAIL PROTECTED] 
> 
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Robin Hankin
> > Sent: 07 May 2008 15:44
> > To: R-devel@r-project.org
> > Subject: [Rd] optional setValidity()
> > 
> > Hi
> > 
> > 
> > Suppose I have an S4 class "foo" and a validity checking function  
> > ".checkfoo()":
> > 
> > setClass("foo",  representation=representation("numeric"))
> > setValidity("foo" , .checkfoo)
> > 
> > is fine; in my application, .checkfoo() verifies that a bunch of 
> > necessary conditions are met.
> > 
> > But .checkfoo() is very time consuming and I want to give users the 
> > option of switching it off.
> > 
> > Most foo objects that one deals with fall into two or three 
> standard 
> > types and in these cases one doesn't need to execute
> >  .checkfoo() because one can show algebraically that the conditions 
> > are automatically met.
> > 
> > But OTOH, I want the check to be performed "by default" to 
> stop anyone 
> > (me) from being too clever and defining a non-standard foo 
> object that 
> > doesn't meet .checkfoo().
> > 
> > What is best practice here?
> > 
> > Are there any examples I could copy?
> > 
> > 
> > 
> > 
> > 
> > --
> > Robin Hankin
> > Uncertainty Analyst and Neutral Theorist, National Oceanography 
> > Centre, Southampton European Way, Southampton
> > SO14 3ZH, UK
> >   tel  023-8059-7743
> > 
> > __
> > R-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
> > 
> 
> 
> **
> The contents of this email are for the named 
> addressee(s...{{dropped:22}}
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 


**
The contents of this email are for the named addressee(s...{{dropped:22}}

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


[Rd] Ross Ihaka's reflections on Common Lisp and R

2008-05-07 Thread francogrex

I came across a quite interesting post from Ross Ihaka, thought would be good
to share it and get the opinion of folks around here. I am not sure where to
post this for the R community but since it has to do with development I
thought or R-devel

Ross Ihaka 
Newsgroups: comp.lang.lisp
From: Ross Ihaka <[EMAIL PROTECTED]>
Date: Wed, 23 Jan 2008 10:35:26 +1300
Local: Tues, Jan 22 2008 11:35 pm 
Subject: Re: Is Xlisp-Stat Dead?

Rainer Joswig wrote: 
> In article 
> <[EMAIL PROTECTED]>, 
>  Robert <[EMAIL PROTECTED]> wrote: 
>> Did the founders of R cut it's head off? 
>> Did SAS and SPSS chop it to pieces? 
>> What happened to it? 
> See: http://repositories.cdlib.org/uclastat/papers/2004062201/ 
> On Abandoning Xlisp-Stat 
> Jan de Leeuw, UCLA Department of Statistics 

I'm one of the two originators of R.  After reading Jan's 
paper I wrote to him and said I thought it was interesting 
that he was choosing to jump from Lisp to R at the same 
time I was jumping from R to Common Lisp. 
Building something like R is a big task though.  The 
capabilities in R reflect the specialist contributions 
of hundreds of research statisticians. Currently there 
is a very small group of us scoping out ways to create 
a Lisp-based framework in which similar contributions 
could be made.

... A a little further:

Newsgroups: comp.lang.lisp
From: Ross Ihaka <[EMAIL PROTECTED]>
Date: Wed, 23 Jan 2008 12:42:14 +1300
Local: Wed, Jan 23 2008 1:42 am 
Subject: Re: Is Xlisp-Stat Dead?
Reply to author | Forward | Print | Individual message | Show original |
Report this message | Find messages by this author 

Ken Tilton wrote: 
> So how come an originator of something with the momentum and mindshare 
> of R is swimming against the current, and one he helped set in motion to 
> boot? 

We started work on R in the early '90s.  At the time 
decent Lisp implementations required much more resources 
than our target machines had.  We therefore wrote a small 
scheme-like interpreter and implemented over that. 
Being rank amateurs we didn't do a great job of the 
implementation and the semantics of the S language which 
we borrowed also don't lead to efficiency (there is a 
lot of copying of big objects). 
R is now being applied to much bigger problems than we 
ever anticipated and efficiency is a real issue.  What 
we're looking at now is implementing a thin syntax over 
Common Lisp.  The reason for this is that while Lisp is 
great for  programming it is not good for carrying out 
interactive data analysis.  That requires a mindset better 
expressed by standard math notation.  We do plan to make 
the syntax thin enough that it is possible to still work 
at the Lisp level.  (I believe that the use of Lisp syntax 
was partially responsible for why XLispStat failed to gain 
a large user community). 
The payoff (we hope) will be much greater flexibility and 
a big boost in performance (we are working with SBCL so 
we gain from compilation).  For some simple calculations 
we are seeing orders of magnitude increases in performance 
over R, and quite big gains over Python. 
There is lots to do.  We're experimenting with syntax and 
making a start on assembling quality numerics libraries. 
Creating a fully-featured system will require buy-in from 
the statistical specialists who can contribute implementations 
of their methodology, so we also thinking about issues 
associated with community building (eg. licensing). 
-- 
View this message in context: 
http://www.nabble.com/Ross-Ihaka%27s-reflections-on-Common-Lisp-and-R-tp17100237p17100237.html
Sent from the R devel mailing list archive at Nabble.com.

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


[Rd] closeAllConnections fails with socketConnection (PR#11396)

2008-05-07 Thread steve
Full_Name: Stephen Weston
Version: 2.7.0
OS: darwin8.10.1
Submission from: (NULL) (75.56.13.246)


If a socketConnection is created in an R session, and you call
closeAllConnections to close it, you get the following error:

> x <- socketConnection("localhost", 80)
> closeAllConnections()
Error in socket$socket : $ operator is invalid for atomic vectors

You get the same error message if you try to quit, saving the
workspace image.

I also noticed that getConnection returns an object that has a
different class than the original socket connection object:

> class(x)
[1] "sockconn"   "connection"
> class(getConnection(3))
[1] "socket" "connection"

My version information is:
> version
   _   
platform   i386-apple-darwin8.10.1 
arch   i386
os darwin8.10.1
system i386, darwin8.10.1  
status 
major  2   
minor  7.0 
year   2008
month  04  
day22  
svn rev45424   
language   R   
version.string R version 2.7.0 (2008-04-22)

My session information is:
> sessionInfo()
R version 2.7.0 (2008-04-22) 
i386-apple-darwin8.10.1 

locale:
en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

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


[Rd] bug on compilation (PR#11395)

2008-05-07 Thread toffolidan
Dear Mr.

Beginning to work on Linux.

I am trying to install R into Ubuntu Gustsy. I installed version 2.5.1 and 
worked fine. But then I tried to upgrade by adding these lines to sources.list:

deb http://cran.fiocruz.br/bin/linux/debian etch-cran/
deb http://cran.fiocruz.br/bin/linux/ubuntu gutsy/

I introduced the authorization keys (as recommended) and the files were 
downloaded. But then I tried to upgrade but some have problems on dependencies. 
What I did was to erase R folder installed on my /usr/lib and went to synaptic 
and uninstall all the cran files. The idea was to start over again.

But I try to install by apt and appears:

Os pacotes a seguir têm dependências desencontradas:
  r-base: Depende: r-base-core (>= 2.7.0-1gutsy0) mas 2.5.1-1 está para ser 
instalado
  r-recommended: Depende: r-base-core (>= 2.7.0-1gutsy0) mas 2.5.1-1 está para 
ser instalado
 Depende: r-cran-boot (>= 1.2.19) mas não vai ser instalado
 Depende: r-cran-cluster (>= 1.9.6-2) mas não vai ser instalado
 Depende: r-cran-foreign (>= 0.7-2) mas não vai ser instalado
 Depende: r-cran-kernsmooth (>= 2.2.14) mas não vai ser 
instalado
 Depende: r-cran-lattice (>= 0.10.11) mas não vai ser instalado
 Depende: r-cran-mgcv (>= 1.1.5) mas não vai ser instalado
 Depende: r-cran-nlme (>= 3.1.52) mas não vai ser instalado
 Depende: r-cran-rpart (>= 3.1.20) mas não vai ser instalado
 Depende: r-cran-survival (>= 2.13.2-1) mas não vai ser 
instalado
 Depende: r-cran-vr (>= 7.2.8) mas não vai ser instalado
 Depende: r-cran-codetools mas não vai ser instalado
E: Pacotes quebrados

I dowloaded the R-2.7.0 and tried to compile with the command ./configure. But  
what appeared at the end was (after a bunch of other things):

configure: error: --with-readline=yes (default) and headers/libs are not 
available

What should I do?

Hope you can help me.

Sincerelly

Daniel





-


Daniel Toffoli Ribeiro
Laboratório de Evolução e Genética Animal
Universidade Federal do Amazonas
www.evoamazon.net

tel: ++55 (92) 36474233

   
-

[[alternative HTML version deleted]]

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


[Rd] R-2.8.0 : get platform device with get(getOption("device"))

2008-05-07 Thread Frédéric Lafitte
Hi,

I have a R-package that works fine with R 2.7.0 (it builds, checks and
installs) but not with R 2.8.0.
Running check in 2.8.0 gives the following output :
[...]
* checking examples ... ERROR
[...]
The error most likely occurred in:
[...]
> dev <- show.pr(mr.tbl, col="green", type="b")
Error in get(getOption("device")) : invalid first argument
Calls: show.pr -> get
Execution halted

How can I change this code so that it works fine with R 2.8.0?

Thanks!

[[alternative HTML version deleted]]

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


Re: [Rd] R-2.8.0 : get platform device with get(getOption("device"))

2008-05-07 Thread Prof Brian Ripley

Please do study the posting guide.  This was covered recently:

https://stat.ethz.ch/pipermail/r-devel/2008-April/049319.html


On Wed, 7 May 2008, Frédéric Lafitte wrote:


Hi,

I have a R-package that works fine with R 2.7.0 (it builds, checks and
installs) but not with R 2.8.0.


There is no 'R 2.8.0' and will not be for some months.  You probably mean 
R-devel, but your code has been erroneous since R 2.5.0.



Running check in 2.8.0 gives the following output :
[...]
* checking examples ... ERROR
[...]
The error most likely occurred in:
[...]

dev <- show.pr(mr.tbl, col="green", type="b")

Error in get(getOption("device")) : invalid first argument
Calls: show.pr -> get
Execution halted

How can I change this code so that it works fine with R 2.8.0?

Thanks!

[[alternative HTML version deleted]]

__
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] R-2.8.0 : get platform device with get(getOption("device"))

2008-05-07 Thread Peter Dalgaard

Frédéric Lafitte wrote:

Hi,

I have a R-package that works fine with R 2.7.0 (it builds, checks and
installs) but not with R 2.8.0.
Running check in 2.8.0 gives the following output :
[...]
* checking examples ... ERROR
[...]
The error most likely occurred in:
[...]
  

dev <- show.pr(mr.tbl, col="green", type="b")


Error in get(getOption("device")) : invalid first argument
Calls: show.pr -> get
Execution halted

How can I change this code so that it works fine with R 2.8.0?

  

Use dev.new() instead of  that construct.


--
  O__   Peter Dalgaard Øster Farimagsgade 5, Entr.B
 c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen   Denmark  Ph:  (+45) 35327918
~~ - ([EMAIL PROTECTED])  FAX: (+45) 35327907

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


Re: [Rd] R-2.8.0 : get platform device with get(getOption("device"))

2008-05-07 Thread Peter Dalgaard

Prof Brian Ripley wrote:

Please do study the posting guide.  This was covered recently:

https://stat.ethz.ch/pipermail/r-devel/2008-April/049319.html
Nevertheless, perhaps an explicit NEWS entry could be warranted, 
something like


  oThe "device" option can now be a function, and is one in some 
standard setups. Consequentially, get(getOption("device")) will fail; 
programmers should usually use dev.new() instead.





On Wed, 7 May 2008, Frédéric Lafitte wrote:


Hi,

I have a R-package that works fine with R 2.7.0 (it builds, checks and
installs) but not with R 2.8.0.


There is no 'R 2.8.0' and will not be for some months.  You probably 
mean R-devel, but your code has been erroneous since R 2.5.0.



Running check in 2.8.0 gives the following output :
[...]
* checking examples ... ERROR
[...]
The error most likely occurred in:
[...]

dev <- show.pr(mr.tbl, col="green", type="b")

Error in get(getOption("device")) : invalid first argument
Calls: show.pr -> get
Execution halted

How can I change this code so that it works fine with R 2.8.0?

Thanks!

[[alternative HTML version deleted]]

__
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
  



--
  O__   Peter Dalgaard Øster Farimagsgade 5, Entr.B
 c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen   Denmark  Ph:  (+45) 35327918
~~ - ([EMAIL PROTECTED])  FAX: (+45) 35327907

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


Re: [Rd] a R_PV problem

2008-05-07 Thread Gang Liang
Thanks for the pointer, and the problem solved.

I double checked that Rf_PrintValue works when the option
"unwindonsignal" is turned on in gdb. I also found that without "set
unwindonsignal on", both "p Rf_PrintValue(colNames)" and "p
R_PV(colNames)" could result in SIGTRAP or SIGSEGV sometimes. But not
sure what caused the signal and why... because if I stepped into these
functions, nothing would happen.

Thanks, Gang

On Tue, May 6, 2008 at 8:30 AM, Bill Dunlap <[EMAIL PROTECTED]> wrote:
> On Tue, 6 May 2008, Duncan Murdoch wrote:
>
>
>
> > On 06/05/2008 3:02 AM, pseudo wrote:
>  > > Dear all,
>  > >
>  > > When using gdb to debug my C code, I use R_PV to show the content of
>  > > SEXP variables:
>  > >
>  > >   SEXP sexp; // it is a data.frame
>  > >   SEXP colNames = getAttrib(sexp, R_NameSymbol);
>  > >
>  > > A strange thing is that after halting the program:
>  > >
>  > >   (gdb) p R_PV(colNames)
>  > >
>  > > does not show the content of colNames. I am positive my code is right
>  > > because if I insert "PrintValue(colNames);" in the c code, it will
>  > > print the right value. My debug result shows that the variable
>  > > "colNames" failed the "isObject" call. I am not sure whether this is a
>  > > new feature or bug. Anyone can help?
>  >
>  > Are you sure that getAttrib has been called?  Depending on the
>  > optimization level under which your code was compiled, instructions may
>  > be re-ordered.  gdb may show the instruction pointer after that line,
>  > even though that line hasn't been run yet.
>
>  R_PV(sexp) only prints if isObject(sexp) is true, i.e., if it
>  is "internally classed".  Try using Rf_PrintValue(colNames) from
>  the debugger.
>
>  src/main/print.c contains:
>/* Print an S-expression using global options */
>void PrintValue(SEXP s)
>{
>PrintValueEnv(s, R_GlobalEnv);
>
>}
>/* Ditto, but only for objects, for use in debugging */
>void R_PV(SEXP s)
>{
>if(isObject(s)) PrintValueEnv(s, R_GlobalEnv);
>}
>  and include/Internals.h has the usual add-Rf_ #define:
>#define PrintValue  Rf_PrintValue
>
>  
>  Bill Dunlap
>  Insightful Corporation
>  bill at insightful dot com
>  360-428-8146
>
>   "All statements in this message represent the opinions of the author and do
>   not necessarily reflect Insightful Corporation policy or position."
>

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


Re: [Rd] R-2.8.0 : get platform device with get(getOption("device"))

2008-05-07 Thread Prof Brian Ripley

Here is the NEWS item, for 2.5.0

o   options(device = ) now accepts a function object as well as
the name of a function.

The construct in the subject line has been broken ever since.

On Thu, 8 May 2008, Peter Dalgaard wrote:


Prof Brian Ripley wrote:

Please do study the posting guide.  This was covered recently:

https://stat.ethz.ch/pipermail/r-devel/2008-April/049319.html
Nevertheless, perhaps an explicit NEWS entry could be warranted, something 
like


 oThe "device" option can now be a function, and is one in some standard 
setups. Consequentially, get(getOption("device")) will fail; programmers 
should usually use dev.new() instead.





On Wed, 7 May 2008, Frédéric Lafitte wrote:


Hi,

I have a R-package that works fine with R 2.7.0 (it builds, checks and
installs) but not with R 2.8.0.


There is no 'R 2.8.0' and will not be for some months.  You probably mean 
R-devel, but your code has been erroneous since R 2.5.0.



Running check in 2.8.0 gives the following output :
[...]
* checking examples ... ERROR
[...]
The error most likely occurred in:
[...]

dev <- show.pr(mr.tbl, col="green", type="b")

Error in get(getOption("device")) : invalid first argument
Calls: show.pr -> get
Execution halted

How can I change this code so that it works fine with R 2.8.0?

Thanks!

[[alternative HTML version deleted]]

__
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




--
 O__   Peter Dalgaard Øster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen   Denmark  Ph:  (+45) 35327918
~~ - ([EMAIL PROTECTED])  FAX: (+45) 35327907

__
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] R-2.8.0 : get platform device with get(getOption("device"))

2008-05-07 Thread Peter Dalgaard

Prof Brian Ripley wrote:

Here is the NEWS item, for 2.5.0

ooptions(device = ) now accepts a function object as well as
the name of a function.

The construct in the subject line has been broken ever since.

OK, but that entry was obviously hard to spot even when looking for it!


On Thu, 8 May 2008, Peter Dalgaard wrote:


Prof Brian Ripley wrote:

Please do study the posting guide.  This was covered recently:

https://stat.ethz.ch/pipermail/r-devel/2008-April/049319.html
Nevertheless, perhaps an explicit NEWS entry could be warranted, 
something like


 oThe "device" option can now be a function, and is one in some 
standard setups. Consequentially, get(getOption("device")) will fail; 
programmers should usually use dev.new() instead.



So...

oThe "device" option now is a function in some standard setups. 
Consequentially, get(getOption("device")) will fail; programmers should 
usually use dev.new() instead. (Assuming that the device is a character 
string has been incorrect since 2.5.0.)





On Wed, 7 May 2008, Frédéric Lafitte wrote:


Hi,

I have a R-package that works fine with R 2.7.0 (it builds, checks and
installs) but not with R 2.8.0.


There is no 'R 2.8.0' and will not be for some months.  You probably 
mean R-devel, but your code has been erroneous since R 2.5.0.



Running check in 2.8.0 gives the following output :
[...]
* checking examples ... ERROR
[...]
The error most likely occurred in:
[...]

dev <- show.pr(mr.tbl, col="green", type="b")

Error in get(getOption("device")) : invalid first argument
Calls: show.pr -> get
Execution halted

How can I change this code so that it works fine with R 2.8.0?

Thanks!

[[alternative HTML version deleted]]

__
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




--
 O__   Peter Dalgaard Øster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen   Denmark  Ph:  (+45) 35327918
~~ - ([EMAIL PROTECTED])  FAX: (+45) 35327907

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






--
  O__   Peter Dalgaard Øster Farimagsgade 5, Entr.B
 c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen   Denmark  Ph:  (+45) 35327918
~~ - ([EMAIL PROTECTED])  FAX: (+45) 35327907

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