RE: [R] .First.lib doesn't appear to be running after calling lib rary()

2003-10-07 Thread Liaw, Andy
From the R-exts manual:


The R subdirectory contains R code files. The code files to be installed
must start with a (lower or upper case) letter and have one of the
extensions .R, .S, .q, .r, or .s. We recommend using .R, as this extension
seems to be not used by any other software. It should be possible to read in
the files using source(), so R objects must be created by assignments. Note
that there need be no connection between the name of the file and the R
objects created by it. If necessary, one of these files (historically zzz.R)
should use library.dynam() inside .First.lib() to load compiled code. 


So the problem is the . that the filename starts with.

HTH,
Andy

 From: Crispin Miller [mailto:[EMAIL PROTECTED] 
 
 Hi - so I've dusted off the C bits of my brain and gotten a 
 library written for my package...
  
 It passes R CMD check ok, and I've put a file called 
 '.First.lib.R' in the pacakge's 'R'  subdirectory. Its 
 permissions are 644.
 
 It says:
 
 .First.lib - function(lib,pkg) {
library.dynam(foo,pkg,lib);
require(affy,quietly=TRUE);
 }
 
 
 I build and INSTALL the package, start R and then call 
 library(foo). I deduce that my '.First.lib' isn't running 
 because the affy library doesn't get loaded - and neither 
 does my dynamic library (which complies ok and results in 
 'foo.so' being put in the 'src/' directory of the package)...
 
 Any ideas what I'm doing wrong?
 
 Crispin
  
 
 
  
 This email is confidential and intended solely for the use 
 o...{{dropped}}
 
 __
 [EMAIL PROTECTED] mailing list 
 https://www.stat.math.ethz.ch/mailman/listinfo /r-help


__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: [R] .First.lib doesn't appear to be running after calling lib rary()

2003-10-07 Thread Crispin Miller
Thanks - it is indeed the first '.' that's the problem...
Crispin


 -Original Message-
 From: Liaw, Andy [mailto:[EMAIL PROTECTED]
 Sent: 07 October 2003 15:21
 To: Crispin Miller
 Subject: RE: [R] .First.lib doesn't appear to be running after calling
 lib rary()
 
 
 I put .First.lib in the file zzz.R, and it works for me.  
 My guess is that
 the problem is using a filename that starts with ..  I see 
 many packages
 put the .First.lib in zzz.R, so I just follow that.
 
 HTH,
 Andy
 
  -Original Message-
  From: Crispin Miller [mailto:[EMAIL PROTECTED] 
  Sent: Tuesday, October 07, 2003 10:00 AM
  To: R-help (E-mail)
  Subject: [R] .First.lib doesn't appear to be running after 
  calling library()
  
  
  Hi - so I've dusted off the C bits of my brain and gotten a 
  library written for my package...
   
  It passes R CMD check ok, and I've put a file called 
  '.First.lib.R' in the pacakge's 'R'  subdirectory. Its 
  permissions are 644.
  
  It says:
  
  .First.lib - function(lib,pkg) {
 library.dynam(foo,pkg,lib);
 require(affy,quietly=TRUE);
  }
  
  
  I build and INSTALL the package, start R and then call 
  library(foo). I deduce that my '.First.lib' isn't running 
  because the affy library doesn't get loaded - and neither 
  does my dynamic library (which complies ok and results in 
  'foo.so' being put in the 'src/' directory of the package)...
  
  Any ideas what I'm doing wrong?
  
  Crispin
   
  
  
   
  This email is confidential and intended solely for the use 
  o...{{dropped}}
  
  __
  [EMAIL PROTECTED] mailing list 
  https://www.stat.math.ethz.ch/mailman/listinfo /r-help
  
 

 


 
This email is confidential and intended solely for the use o...{{dropped}}

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help