[Rd] R.exe crashes on R v2.12.0dev (Windows Vista)

2010-05-22 Thread Henrik Bengtsson
Using the latest developers version of R [2.12.0 Under development
(unstable) (2010-05-21 r52061)], R.exe crashes:

%ProgramFiles%/R/R-2.12.0dev/bin/i386/R.exe

with Windows reporting:

Problem signature:
  Problem Event Name:   APPCRASH
  Application Name: R.exe
  Application Version:  2.120.52061.0
  Application Timestamp:4bf638bd
  Fault Module Name:R.exe
  Fault Module Version: 2.120.52061.0
  Fault Module Timestamp:   4bf638bd
  Exception Code:   c005
  Exception Offset: 1d94
  OS Version:   6.0.6002.2.2.0.256.6
  Locale ID:1033
  Additional Information 1: 1c1d
  Additional Information 2: e064c795479179a5f08d19e37de8915e
  Additional Information 3: 50ea
  Additional Information 4: 02a385f4f3dc3301c3a9d270f946

same occurs when calling:

%ProgramFiles%/R/R-2.12.0dev/bin/R.exe

However,

C:\Users\hb\braju.com.R\R.matlab,R-forge%ProgramFiles%/R/R-2.12.0dev/bin/i386/Rterm.exe
-e sessionInfo()

R version 2.12.0 Under development (unstable) (2010-05-21 r52061)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i386-pc-mingw32/i386 (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

 sessionInfo()
R version 2.12.0 Under development (unstable) (2010-05-21 r52061)
i386-pc-mingw32

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

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] exmaple problems

2010-05-22 Thread Erich Neuwirth
I do not know if this has been reported already
(I searched the headers of the recent messages to r-devel)
It seems that 'example' in R 2.11.0 has a problem when the help file
does not contain any example.
This is what happens on R 2.11.0 on Windows XP.

 library(tools)
 example(Rdiff)
Error in file(con, r) : cannot open the connection
In addition: Warning message:
In file(con, r) :
  cannot open file
'C:\DOCUME~1\neuwirth\LOCALS~1\Temp\RtmpmknOJe\Rex678418be': No such
file or directory

The error does not occur when there is an example marked #Not Run:

The problem does not appear in R 2.10.1
 library(tools)
 example(Rdiff)
Warning message:
In example(Rdiff) : 'Rdiff' has a help file but no examples



-- 
Erich Neuwirth, University of Vienna
Faculty of Computer Science
Center for Computer Science Didactics and Learning Research
Visit our SunSITE at http://sunsite.univie.ac.at
Phone: +43-1-4277-39902 Fax: +43-1-4277-39459

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


Re: [Rd] dyn.load() strange behavior

2010-05-22 Thread Uwe Ligges

- Does bar really dyn.load its shared library on load?
- Have you told package foo (in the DESCRIPTION) it is LinkingTo: bar ?

Uwe Ligges



On 21.05.2010 22:35, Dominick Samperi wrote:

Hello,

I am observing the following strange behavior when I try to
load a shared library using dyn.load() under Linux...

The library foo.so refers to a symbol in another package bar
(with shared library bar.so), I get:

dyn.load('foo.so') # error message because I forgot to load bar
library(bar) # so I fix it
dyn.load('foo.so') # works this time and everything is fine

But, if restart my R session and do it right the second
time there is a surprise:

library(bar)
dyn.load('foo.so') # fails
library(bar) # just to be sure?
dyn.load('foo.so) # fails again
dyn.load('/usr/local/lib64/library/bar/lib/libbar.so') # just to be really
sure?
dyn.load('foo.so')

In other words, it is possible to load foo.so, but only
after a failed attempt. If I remember to load the required
package bar I cannot load the depenent library foo.so.

Any ideas?

Thanks,
Dominick

[[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


Re: [Rd] dyn.load() strange behavior

2010-05-22 Thread Dominick Samperi
Thanks for taking the time to look at this Uwe. Turns out the
problem was caused by the fact that foo.so was built with
incorrect linker options (not pointing to bar.so), so there were
undefined symbols. Why it worked at all is a puzzle.

2010/5/22 Uwe Ligges lig...@statistik.tu-dortmund.de

 - Does bar really dyn.load its shared library on load?
 - Have you told package foo (in the DESCRIPTION) it is LinkingTo: bar ?

 Uwe Ligges




 On 21.05.2010 22:35, Dominick Samperi wrote:

 Hello,

 I am observing the following strange behavior when I try to
 load a shared library using dyn.load() under Linux...

 The library foo.so refers to a symbol in another package bar
 (with shared library bar.so), I get:

 dyn.load('foo.so') # error message because I forgot to load bar
 library(bar) # so I fix it
 dyn.load('foo.so') # works this time and everything is fine

 But, if restart my R session and do it right the second
 time there is a surprise:

 library(bar)
 dyn.load('foo.so') # fails
 library(bar) # just to be sure?
 dyn.load('foo.so) # fails again
 dyn.load('/usr/local/lib64/library/bar/lib/libbar.so') # just to be really
 sure?
 dyn.load('foo.so')

 In other words, it is possible to load foo.so, but only
 after a failed attempt. If I remember to load the required
 package bar I cannot load the depenent library foo.so.

 Any ideas?

 Thanks,
 Dominick

[[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


Re: [Rd] S4 method defined but not used

2010-05-22 Thread Martin Morgan
Hi Thibaut --

On 05/21/2010 08:34 AM, Jombart, Thibaut wrote:
 Dear R developers, 
 
 I am having a slightly weird issue with a S4 method defined in my package 
 adegenet 1.2-4, with R 2.11.0. As far as I know, the problem is new, and the 
 code implementing the method has not changed for more than a year and worked 
 well so far.
 
 The problem is the following. I define, in the package, a method [ for the 
 S4 class 'genind'. The method's definition is:
 setMethod([, signature(x=genind, i=ANY, j=ANY, drop=ANY), 
 function(x, i, j, ..., loc=NULL, treatOther=TRUE, drop=FALSE) { 
 ... ## code of the function
 })
 
 When sourcing the code directly from R, this method is found and used 
 normally. However, when loading the package, the method does not seem to be 
 found any longer by the dispatcher. For instance, here is an error I get:
 ### R code
 library(adegenet)
 data(nancycats) # nancycat is a S4 object with class 'genind'
 class(nancycats)
 [1] genind
 attr(,package)
 [1] adegenet
 nancycats[1]
 Error in nancycats[1] : object of type 'S4' is not subsettable # [ IS NOT 
 USED HERE
 ### end R code

For what it's worth, I can't reproduce this problem, and in a new R
session after library(adegenet) I have

 sessionInfo()
R version 2.11.0 Patched (2010-05-01 r51886)
x86_64-unknown-linux-gnu

locale:
 [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=C  LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8   LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
[1] adegenet_1.2-4 MASS_7.3-5

which has a different set of attached / loaded packages -- maybe you are
picking up something from .RData or .Rprofile, and you need to start R
with --vanilla?

Martin



 
 And still, the method is defined in the environment:
 ### R code
 showMethods([, class=genind)
 Function: [ (package base)
 x=genind
 
 findMethods([, classes=genind)$genind
 Method Definition:
 
 function (x, i, j, ..., drop = FALSE) 
 {
 .local - function (x, i, j, ..., loc = NULL, treatOther = TRUE, 
 drop = FALSE) 
 {
 if (missing(i)) 
 i - TRUE
 if (missing(j)) 
 j - TRUE
 pop - NULL
 
 ... # rest of the code of the function
 ### end R code
 
 findMethods and showMethods find the method. However, getMethod doesn't:
 ### R code
 getMethod([,genind)
 Error in getMethod([, genind) : 
   No method found for function [ and signature genind
 ### end R code
 
 Now, if I just try the same thing after sourcing the code of the method 
 manually, everything works fine. showMethods then reads:
 ### R code
 showMethods([, classes=genind)
 Function: [ (package base)
 x=genind
 x=genind, i=ANY, j=ANY, drop=ANY
 x=genind, i=numeric, j=missing, drop=missing
 (inherited from: x=genind, i=ANY, j=ANY, drop=ANY)
 ### end R code
 
 My R version/session is:
 ### R code
 R.version
_
 platform   i686-pc-linux-gnu
 arch   i686 
 os linux-gnu
 system i686, linux-gnu  
 status  
 major  2
 minor  11.0 
 year   2010 
 month  04   
 day22   
 svn rev51801
 language   R
 version.string R version 2.11.0 (2010-04-22)
 
 sessionInfo()
 R version 2.11.0 (2010-04-22) 
 i686-pc-linux-gnu 
 
 locale:
  [1] LC_CTYPE=en_GB.utf8   LC_NUMERIC=C 
  [3] LC_TIME=en_GB.utf8LC_COLLATE=en_GB.utf8
  [5] LC_MONETARY=C LC_MESSAGES=en_GB.utf8   
  [7] LC_PAPER=en_GB.utf8   LC_NAME=C
  [9] LC_ADDRESS=C  LC_TELEPHONE=C   
 [11] LC_MEASUREMENT=en_GB.utf8 LC_IDENTIFICATION=C  
 
 attached base packages:
 [1] stats graphics  grDevices utils datasets  methods   base 
 
 other attached packages:
 [1] adegenet_1.2-4 MASS_7.3-5
 
 loaded via a namespace (and not attached):
 [1] graph_1.26.0  phylobase_0.5 tcltk_2.11.0  tools_2.11.0 
 
 ### end R code
 
 R was compiled from the sources. All packages are up-to-date (as of the 21 
 May 2010). My system is a Ubuntu 10.04 (32 bits), with kernel 
 2.6.31-20-generic. I could not reproduce the problem using R 2.11.0 on 
 Windows Vista, or on Debian testing (R 2.11.0 compiled from the sources). The 
 package adegenet does not have a namespace. The error arises whether using a 
 field 'Collate' in DESCRIPTION, or not. I checked that the source file is 
 indeed sourced when loading the package: it is. The method [ is not defined 
 by any other