Re: [Rd] Rcmd check fails on Windows Samba network path in R 2.9.1
Hi, The problem almost certainly has something to do with Samba. We also have a NetApp file system, and copying the package source to that drive and running Rcmd check from Windows works just fine. When running the commands from an interactive R session, file_test returns TRUE and file.access to test write permission indicates a failure, even though that information is incorrect.Here is a session transcript: - > getwd() [1] "n:/krc/Umpire/R-Package" > lib <- "Umpire.Rcheck" > file_test("-d", lib) [1] TRUE > file.access(lib, 2) Umpire.Rcheck -1 > dir.create(paste(lib, "testdir", sep='/')) > dir(lib) [1] "00check.log" "00install.out" "testdir" > sessionInfo() R version 2.9.1 (2009-06-26) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base Again, this all worked (and still works) correctly in 2.8.1. Kevin Tony Plate wrote: This error message looks like it comes from src/library/tools/R/install.R, which contains the following test: if (!.file_test("-d", lib) || file.access(lib, 2L)) stop("ERROR: no permission to install to directory ", sQuote(lib), call. = FALSE) The function .file_test() is defined earlier in the same file (it looks at file.info(lib)$isdir) and appears to be intended to be the same as utils:::file_test(). You could start trying to figure out what the problem is by trying these calls on the directory in question from an interactive R session. (They seem to work as intended on my Windows system with a NetApp file system mounted on a letter drive.) -- Tony Plate Kevin R. Coombes wrote: Hi, I have just updated R from version 2.8.1 to version 2.9.1. I am running Windows XP Professional, Service Pack 3. With the update, I decided to update a set of packages that I maintain by compiling them for the new version. Everything worked fine except for one package. This package is unique (among the six I was working on) in that is stored on a UNIX-based file server that is exported to the Windows network via Samba. The root of that network path is mapped to drive "N:" on the local machine. 'Rcmd check' fails for this package under 2.9.1. The error message in '00install.out' is: "Error: ERROR: no permission to install to directory 'N:/krc/Umpire/R-Package/Umpire.Rcheck'" 'Rcmd check' works for this package under 2.8.1. 'Rcmd check' works for this package if the directory is copied onto a local hard drive instead of the network drive. 'Rcmd build' and 'Rcmd build --binary' work under both versions. It would be nice if someone could figure out what has changed and fix it Best, Kevin Coombes __ 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] strange bug? with R CMD check
Hello, I am trying to get a package to pass R CMD check on an iMac running Mac OS X. When the package is named safeBinaryRegression I get the following warning from R CMD check: * checking whether the name space can be loaded with stated dependencies ... WARNING Error in dyn.load(file, DLLpath = DLLpath, ...) : function 'make_lp' not provided by package 'lpSolveAPI' Calls: loadNamespace -> library.dynam -> dyn.load Execution halted A namespace must be able to be loaded with just the base namespace loaded: otherwise if the namespace gets loaded by a saved object, the session will be unable to start. Probably some imports need to be declared in the NAMESPACE file. Here is the contents of the DESCRIPTION: Package: safeBinaryRegression Version: 0.1-2 Date: 2009-07-01 Title: Safe Binary Regression Author: Kjell Konis Maintainer: Kjell Konis Depends: R (>= 2.9.1), lpSolveAPI (>= 5.5.0.14) LinkingTo: lpSolveAPI Description: Overloads the stats::glm function so that a test for the existence of the maximum likelihood estimate is computed as part of the fitting procedure for binary regression models. License: GPL-2 Here is the contents of the NAMESPACE: export(glm) useDynLib(safeBinaryRegression, linprog, reducedLP) The strange thing is that if I change the length of the package name (for example safeBinaryRegression to safeBinaryRegress) the warning goes away and R CMD check completes successfully. Also, regardless of the package name, the package installs and runs as expected. I'm at a loss trying to figure out what's going on. To reproduce: (1) check out the sbr package (which passes R CMD check) svn checkout svn://svn.r-forge.r-project.org/svnroot/sbr/pkg safeBinaryRegression (2) replace sbr with safeBinaryRegression in DESCRIPTION and NAMESPACE (3) run R CMD check Session Info: > sessionInfo() R version 2.9.1 (2009-06-26) i386-apple-darwin8.11.1 locale: fr_CH.UTF-8/en_US.UTF-8/C/C/fr_CH.UTF-8/fr_CH.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base Thanks, Kjell __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Rcmd check fails on Windows Samba network path in R 2.9.1
Did you try starting up R-2.8.1 and checking the result of file.access(lib, 2) on that very same directory where R-2.9.1 gives an incorrect indication? If that gives the correct answer, then, look for changes in the file.access code. -- Tony Plate Kevin R. Coombes wrote: Hi, The problem almost certainly has something to do with Samba. We also have a NetApp file system, and copying the package source to that drive and running Rcmd check from Windows works just fine. When running the commands from an interactive R session, file_test returns TRUE and file.access to test write permission indicates a failure, even though that information is incorrect.Here is a session transcript: - > getwd() [1] "n:/krc/Umpire/R-Package" > lib <- "Umpire.Rcheck" > file_test("-d", lib) [1] TRUE > file.access(lib, 2) Umpire.Rcheck -1 > dir.create(paste(lib, "testdir", sep='/')) > dir(lib) [1] "00check.log" "00install.out" "testdir" > sessionInfo() R version 2.9.1 (2009-06-26) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base Again, this all worked (and still works) correctly in 2.8.1. Kevin Tony Plate wrote: This error message looks like it comes from src/library/tools/R/install.R, which contains the following test: if (!.file_test("-d", lib) || file.access(lib, 2L)) stop("ERROR: no permission to install to directory ", sQuote(lib), call. = FALSE) The function .file_test() is defined earlier in the same file (it looks at file.info(lib)$isdir) and appears to be intended to be the same as utils:::file_test(). You could start trying to figure out what the problem is by trying these calls on the directory in question from an interactive R session. (They seem to work as intended on my Windows system with a NetApp file system mounted on a letter drive.) -- Tony Plate Kevin R. Coombes wrote: Hi, I have just updated R from version 2.8.1 to version 2.9.1. I am running Windows XP Professional, Service Pack 3. With the update, I decided to update a set of packages that I maintain by compiling them for the new version. Everything worked fine except for one package. This package is unique (among the six I was working on) in that is stored on a UNIX-based file server that is exported to the Windows network via Samba. The root of that network path is mapped to drive "N:" on the local machine. 'Rcmd check' fails for this package under 2.9.1. The error message in '00install.out' is: "Error: ERROR: no permission to install to directory 'N:/krc/Umpire/R-Package/Umpire.Rcheck'" 'Rcmd check' works for this package under 2.8.1. 'Rcmd check' works for this package if the directory is copied onto a local hard drive instead of the network drive. 'Rcmd build' and 'Rcmd build --binary' work under both versions. It would be nice if someone could figure out what has changed and fix it Best, Kevin Coombes __ 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] building source package in R run within Emacs under Windows.
Dear R-devel, I installed R-2.9.1 on the 'y:' drive which happens to be mounted to an IBRIX file system. I also downloaded and installed the Rtools bundle recommended for 2.9x. When I build a source package launching R via RGui.exe it seems to work fine: ## setting path according to "Appendix E The Windows toolset" > Sys.setenv(PATH="c:/Rtools/bin;c:/Rtools/perl/bin;c:/Rtools/MinGW/bin;c:/cygwin/bin;c:/progra~1/htmhe~1;y:/R/R-2.9.1/bin;c:/windows;c:/windows/system32") > install.packages("c:/R/vmisc", repos=NULL, type="source", > lib="y:/R/vogranovich/library") *** 'hhc.exe' not found: not building CHM help * Installing *source* package 'vmisc' ... ** libs making DLL ... ... done ** R ** data ** preparing package for lazy loading ** help *** installing help indices >>> Building/Updating help pages for package 'vmisc' Formats: text html latex example Note: removing empty section \usage in file 'vmisc.Rd' vmisc texthtmllatex example ** building package indices ... ** MD5 sums * DONE (vmisc) However when I run the same commands in R launched via Rterm under Emacs (ESS mode) I get this error: > Sys.setenv(PATH="c:/Rtools/bin;c:/Rtools/perl/bin;c:/Rtools/MinGW/bin;c:/cygwin/bin;c:/progra~1/htmhe~1;y:/R/R-2.9.1/bin;c:/windows;c:/windows/system32") > install.packages("c:/R/vmisc", repos=NULL, type="source", > lib="y:/R/vogranovich/library") [1] "y:/R/vogranovich/library" "y:/R/R-2.9.1/library" *** 'hhc.exe' not found: not building CHM help * Installing *source* package 'vmisc' ... ** libs making DLL ... ... done ** R ** data ** preparing package for lazy loading ** help *** installing help indices Can't locate R/Rdconv.pm in @INC (@INC contains: y /R/R-2.9.1/share/perl;y /R/R-2.9.1/share/perl;y /R/R-2.9.1/share/perl; /usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 /usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin /usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at y:/R/R-2.9.1/share/perl/build-help.pl line 21. BEGIN failed--compilation aborted at y:/R/R-2.9.1/share/perl/build-help.pl line 21. ERROR: building help failed for package 'vmisc' * Removing 'y:/R/vogranovich/library/vmisc' * Restoring previous 'y:/R/vogranovich/library/vmisc' Warning message: In install.packages("c:/traders/titan/R/vmisc", repos = NULL, type = "source", : installation of package 'c:/traders/titan/R/vmisc' had non-zero exit status It seems that perl's @INC is corrupted, but I don't know how to fix it. Here is the Emacs version info: This is GNU Emacs 22.0.96.1 (i386-mingw-nt5.1.2600) of 2007-03-21 on LENNART-69DE564 (patched) Did anyone have this problem? I understand that the process of building source packages in Windows is rather fragile so I'll be happy to live with using Rgui, but I am asking just in case someone may know. Thanks, Vadim Note: This email is for the confidential use of the named addressee(s) only and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you are hereby notified that any review, dissemination or copying of this email is strictly prohibited, and to please notify the sender immediately and destroy this email and any attachments. Email transmission cannot be guaranteed to be secure or error-free. Jump Trading, therefore, does not make any guarantees as to the completeness or accuracy of this email or any attachments. This email is for informational purposes only and does not constitute a recommendation, offer, request or solicitation of any kind to buy, sell, subscribe, redeem or perform any type of transaction of a financial product. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Building a package with BLAS under Windows
Hi everybody: I am writing a package that includes C code that uses the BLAS library. My Makevars looks like PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS). If I check and build the package under Linux on my own computer everything works fine. However, if I submit the package to win-builder I get the following error messages: g++ -shared -s -o bzipl.dll tmp.def ars.o bzipl.o cvm_arrays.o cvm_axpym.o cvm_cmatrix.o cvm_cmexp.o cvm_cmplx.o cvm_copym.o cvm_cpoly.o cvm_cvector.o cvm_dmexp.o cvm_dpoly.o cvm_globals.o cvm_icamax.o cvm_icamin.o cvm_idamax.o cvm_idamin.o cvm_infnm.o cvm_isamax.o cvm_isamin.o cvm_izamax.o cvm_izamin.o cvm_npoly.o cvm_rmatrix.o cvm_rvector.o cvm_scalm.o cvm_scmatrix.o cvm_smexp.o cvm_spoly.o cvm_srmatrix.o cvm_utils.o cvm_zmexp.o cvm_zpoly.o -Ld:/Rcompile/recent/R-29~1.1/bin -lRlapack -Ld:/Rcompile/recent/R-29~1.1/bin -lRblas -lgfortran -lgfortran -Ld:/Rcompile/recent/R-29~1.1/bin -lR cvm_arrays.o:cvm_arrays.cpp:(.text+0xf2): undefined reference to `sscal_' cvm_arrays.o:cvm_arrays.cpp:(.text+0x1e2): undefined reference to `cscal_' cvm_arrays.o:cvm_arrays.cpp:(.text+0x252): undefined reference to `csscal_' cvm_arrays.o:cvm_arrays.cpp:(.text+0x32a): undefined reference to `caxpy_' cvm_arrays.o:cvm_arrays.cpp:(.text+0x421): undefined reference to `saxpy_' ... To me it looks like somehow the BLAS routines are not called correctly under Windows. I would be very grateful if anybody could help me. Thanks a lot, Markus. -- View this message in context: http://www.nabble.com/Building-a-package-with-BLAS-under-Windows-tp24590763p24590763.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] destructor for S4 class objects in analogy to C++
Hi all, I'm wondering if there is a way to define a destructor function (to free memory) for S4 class objects in analogy to C++? rm() combined with gc() does not seem to be a good idea (Chambers, 2008). So could it be done on the C/C++ level or is it even already available in the "internals"? Many thanks, David [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] destructor for S4 class objects in analogy to C++
if you are using external pointers, then R allows you to set a finalizer function to be called on the pointer. http://cran.r-project.org/doc/manuals/R-exts.html#External-pointers-and-weak-references see examples in RODBC package. and here too: see the "connFinalizer" function http://github.com/armstrtw/unifieddbi/blob/3b21da83f96de231fb14a1adaf9150fa1bc6a277/src/interface.cpp -Whit On Tue, Jul 21, 2009 at 1:00 PM, David Scherrer wrote: > Hi all, > > I'm wondering if there is a way to define a destructor function (to free > memory) for S4 class objects in analogy to C++? > rm() combined with gc() does not seem to be a good idea (Chambers, 2008). > So could it be done on the C/C++ level or is it even already available in > the "internals"? > > Many thanks, > David > > [[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] destructor for S4 class objects in analogy to C++
David, On Jul 21, 2009, at 13:00 , David Scherrer wrote: I'm wondering if there is a way to define a destructor function (to free memory) for S4 class objects in analogy to C++? The analogy doesn't work, because in C++ you have pass-by-reference semantics, but in R you have pass-by-value. Hence in R there is no "one" object that you could finalize - there may be dozens of copies of your S4 object, so which one would you finalize? However, you can register a finalizer for reference-semantics objects (if that's what you really have), see ?reg.finalizer (and on C level R_Register*Finalizer* functions). Cheers, Simon rm() combined with gc() does not seem to be a good idea (Chambers, 2008). So could it be done on the C/C++ level or is it even already available in the "internals"? Many thanks, David [[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] Rcmd check fails on Windows Samba network path in R 2.9.1
The results of the session below are the same in 2.8.1 as in 2.9.1 (including in particular the response to the call to file.access). Kevin Tony Plate wrote: Did you try starting up R-2.8.1 and checking the result of file.access(lib, 2) on that very same directory where R-2.9.1 gives an incorrect indication? If that gives the correct answer, then, look for changes in the file.access code. -- Tony Plate Kevin R. Coombes wrote: Hi, The problem almost certainly has something to do with Samba. We also have a NetApp file system, and copying the package source to that drive and running Rcmd check from Windows works just fine. When running the commands from an interactive R session, file_test returns TRUE and file.access to test write permission indicates a failure, even though that information is incorrect.Here is a session transcript: - > getwd() [1] "n:/krc/Umpire/R-Package" > lib <- "Umpire.Rcheck" > file_test("-d", lib) [1] TRUE > file.access(lib, 2) Umpire.Rcheck -1 > dir.create(paste(lib, "testdir", sep='/')) > dir(lib) [1] "00check.log" "00install.out" "testdir" > sessionInfo() R version 2.9.1 (2009-06-26) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base Again, this all worked (and still works) correctly in 2.8.1. Kevin Tony Plate wrote: This error message looks like it comes from src/library/tools/R/install.R, which contains the following test: if (!.file_test("-d", lib) || file.access(lib, 2L)) stop("ERROR: no permission to install to directory ", sQuote(lib), call. = FALSE) The function .file_test() is defined earlier in the same file (it looks at file.info(lib)$isdir) and appears to be intended to be the same as utils:::file_test(). You could start trying to figure out what the problem is by trying these calls on the directory in question from an interactive R session. (They seem to work as intended on my Windows system with a NetApp file system mounted on a letter drive.) -- Tony Plate Kevin R. Coombes wrote: Hi, I have just updated R from version 2.8.1 to version 2.9.1. I am running Windows XP Professional, Service Pack 3. With the update, I decided to update a set of packages that I maintain by compiling them for the new version. Everything worked fine except for one package. This package is unique (among the six I was working on) in that is stored on a UNIX-based file server that is exported to the Windows network via Samba. The root of that network path is mapped to drive "N:" on the local machine. 'Rcmd check' fails for this package under 2.9.1. The error message in '00install.out' is: "Error: ERROR: no permission to install to directory 'N:/krc/Umpire/R-Package/Umpire.Rcheck'" 'Rcmd check' works for this package under 2.8.1. 'Rcmd check' works for this package if the directory is copied onto a local hard drive instead of the network drive. 'Rcmd build' and 'Rcmd build --binary' work under both versions. It would be nice if someone could figure out what has changed and fix it Best, Kevin Coombes __ 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] bug in approx crashes R
Dear R-devel, The following line crashes R > approx(1, 1, 0, method='const', rule=2, f=0, yleft=NULL, ties='ordered')$y Process R:2 exited abnormally with code 5 at Tue Jul 21 14:18:09 2009 > version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor 9.1 year 2009 month 06 day26 svn rev48839 language R version.string R version 2.9.1 (2009-06-26) Thanks, Vadim Note: This email is for the confidential use of the named addressee(s) only and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you are hereby notified that any review, dissemination or copying of this email is strictly prohibited, and to please notify the sender immediately and destroy this email and any attachments. Email transmission cannot be guaranteed to be secure or error-free. Jump Trading, therefore, does not make any guarantees as to the completeness or accuracy of this email or any attachments. This email is for informational purposes only and does not constitute a recommendation, offer, request or solicitation of any kind to buy, sell, subscribe, redeem or perform any type of transaction of a financial product. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel