Re: [Rd] 00LOCK and nfs

2010-06-10 Thread Prof Brian Ripley
Note that this patch is incomplete: there are three separate branches 
in install.packages() where R CMD INSTALL is used, and one already 
uses --pkglock.  (So a short-term solution for you is to set Ncpus > 
1.)


However, I think this request has been subsumed by a more general need 
to be able to pass options to INSTALL, and R-devel now has an 
INSTALL_opts argument to install.packages().  So I believe you could 
just use install.packages( ... , INSTALL_opts = "--pkglock") .


On Tue, 1 Jun 2010, Kasper Daniel Hansen wrote:


Further experimentation using this patch to install.packages shows
that I sometimes have remaining 00LOCK-pkgname directories after doing
a massive update on a multi-user system with R installed on NFS.
However, I have never had install.packages/update.packages stop midway
because of an unremovable 00LOCK directory.  I therefore consider the
patch to be big improvement for people like me, having a multi-user R
installed on NFS.  Private followups to my original email shows that I
am not the only one with this problem.


But I should point out that others with well-tuned NFS do not have the 
problem -- my sysadmins say that it was common with NFSv3 but they've 
hardly seen it with NFSv4.




I would very much like the patch (or some variant hereof) to be
considered for inclusion in R-devel.

Kasper

On Tue, May 18, 2010 at 11:59 AM, Kasper Daniel Hansen
 wrote:

This is a follow-up to an old thread with kind of solution to the
00LOCK problem on NFS.

I have made a patch to install.packages to accept a new argument
 locktype = c("lock", "no-lock", "pkglock")
which is passed to R CMD INSTALL.  This addition might have
independent interest aside from the NFS problem, as it exposes
functionality from R CMD INSTALL to install.packages and the very
convenient update.packages.  Patches are at
 http://www.biostat.jhsph.edu/~khansen/packages2.R-patch
 http://www.biostat.jhsph.edu/~khansen/install.packages.Rd-patch
(patches to files in the utils package) and both
 R-devel (R version 2.12.0 Under development (unstable) (2010-05-17 r52025))
and
 R-2.11 (R version 2.11.0 Patched (2010-05-17 r52025))
passed make check-all with these two patches applied.  I thought about
adding a note describing my findings below to the details section, but
decided against it.

Regarding the 00LOCK problem.  In my testing, using the patches above
and setting locktype = "pkglock", makes it possible to deal with the
NFS problem.  Specifically, I have not been able to make
update.packages() fail midway, due to a un-removable 00LOCK file
(which is not too surprising, as I now have a per-package lock).

However, sometimes (but far less frequently than before), a
00LOCK-pkgname directory remains after update/install.packages.
Sometimes this 00LOCK-pkgname directory does not contain any .nfs*
files (!?) and sometimes it does. For this reason, I still precede any
install/update.packages with a check for the existence of a
00LOCK-pkgname directory and an attempt to remove it.

The difference between using locktype = "pkglock" and not is
specifically that without, it was possible for update.packages to fail
midway even though there were no 00LOCK* files at the start of the
update process.

Originally I hypothesized that the presence of the .nfs* files in the
00LOCK directory had to do with synchronization issues between the
file server and the compute node.  In order to approach this I tried
to insert a
 system("sleep 10")
at the beginning of
 do_cleanup
in
 tools/R/install.R
but that did not work.

Since the pkglock approach described above seems to solve this issue
for me, I have not pursued the synchronization issue further.

Kasper



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



--
Brian D. Ripley,  rip...@stats.ox.ac.uk
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] Request: difftime method for cut()

2010-06-10 Thread Gustaf Rydevik
Hi all,

The recent change in 2.11 that made as.numeric() return false on
difftime-objects broke some of my code that calculated age classes of
individuals using cut(). While this was no big thing to fix for me, it
might be wise
to provide a cut.difftime method to  stop other old code from breaking.
I'm guessing something as simple as

cut.difftime<-function(x,...){
x<-as.numeric(x)
cut(x,...)
}

would suffice.

best regards,
Gustaf

--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik

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


Re: [Rd] Question on trying to build R 2.11.1 on Tru64(aka OSF1)

2010-06-10 Thread Bill . Glessner

I created a separate build directory, started with a fresh source directory,
changed directory into the build directory, ran configure from the source
directory. 
Then put 'set -v' at the top of /src/scripts/Rcmd before
issuing the gnumake.
The build had the same problem with the packages and provided the following
output at that stage:

gnumake[1]: Leaving directory `/usrX/JunqueYard/R-2.11.1_build/src/library'
gnumake[1]: Entering directory `/usrX/JunqueYard/R-2.11.1_build/src/library/Reco
mmended'
gnumake[2]: Entering directory `/usrX/JunqueYard/R-2.11.1_build/src/library/Reco
mmended'
begin installing recommended package MASS

# ${R_HOME}/bin/Rcmd

## Shell script wrapper for all R CMD commands.
## For internal use only.

R_CMD="${R_HOME}/bin/Rcmd"
export R_CMD

R_VERSION=2.11.1
export R_VERSION

R_OSTYPE="unix"
export R_OSTYPE

## Add 'share/perl' to the perl library path.
if test -n "${PERL5LIB}"; then
  PERL5LIB="${R_SHARE_DIR}/perl:${PERL5LIB}"
  export PERL5LIB
else
  PERLLIB="${R_SHARE_DIR}/perl:${PERLLIB}"
  export PERLLIB
fi

## Append 'share/texmf' to TeX's input search path.
if test -z "$TEXINPUTS}"; then
  TEXINPUTS=".:${R_SHARE_DIR}/texmf:"
else
  TEXINPUTS=".:${TEXINPUTS}:${R_SHARE_DIR}/texmf:"
fi
export TEXINPUTS

. "${R_HOME}/etc${R_ARCH}/Renviron"
export `sed 's/^ *#.*//; s/^\(.*\)=.*/\1/' "${R_HOME}/etc${R_ARCH}/Renviron"`

extra=
case "${1}" in
  perl)
cmd="${PERL}" ;;
  awk)
cmd="${AWK}"  ;;
## this was a separate command prior to 2.10.0
  Rd2txt)
cmd="${R_HOME}/bin/Rdconv"
extra="-t txt"
;;
  Rd2pdf)
cmd="${R_HOME}/bin/Rd2dvi"
extra="--pdf"
;;
  *)
if test -x "${R_HOME}/bin/${1}"; then
  cmd="${R_HOME}/bin/${1}"
else
  cmd="${1}"
fi
;;
esac
shift

exec "${cmd}" ${extra} "$...@}"
/usr/local/JunqueYard/R-2.11.1_build/bin/Rcmd: @: not found
gnumake[2]: *** [MASS.ts] Error 1
gnumake[2]: Leaving directory `/usrX/JunqueYard/R-2.11.1_build/src/library/Recom
mended'
gnumake[1]: *** [recommended-packages] Error 2
gnumake[1]: Leaving directory `/usrX/JunqueYard/R-2.11.1_build/src/library/Recom
mended'
gnumake: *** [stamp-recommended] Error 2

I think that I am following the instructions in the "R Installation and 
Administration" manual, but results would suggest otherwise. I greatly
appreciate any suggestions.

Regards,
Bill

>Return-path: 
>Date: Wed, 09 Jun 2010 23:10:12 +0200
>From: Peter Dalgaard 
>Subject: Re: [Rd] Question on trying to build R 2.11.1 on Tru64(aka OSF1)
>To: bill.gless...@cwu.edu
>Cc: r-devel@r-project.org
>
>bill.gless...@cwu.edu wrote:
>> First I tried 'setenv R_SHELL /usr/local/bin/bash', as bash is the weapon
>> of choice for the faculty wishing to use R, then ran ./configure as before.
>> The ./configure output line 
>> 
>> using as R_SHELL for scripts ... /usr/local/bin/bash
>> 
>> would seem to indicate that the R_SHELL environment variable was recognized
>> and acknowledged. However, I got the same build error:
>
>Two ideas (longshots...)
>
>(a) You're building in the source directory. Try not doing that an start
>with clean sources.
>
>(b) insert "set -v" at the top of Rcmd so that you see the script as it
>is executed.
>
>-- 
>Peter Dalgaard
>Center for Statistics, Copenhagen Business School
>Phone: (+45)38153501
>Email: pd@cbs.dk  Priv: pda...@gmail.com

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


[Rd] OWL ontologies in R?

2010-06-10 Thread Stavros Macrakis
Are there any R packages to import and use Web Ontology Language (OWL)
ontologies (represented in OWL/RDF or other form)?

Thanks,

 -s

[[alternative HTML version deleted]]

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


[Rd] R-based version of R CMD build broken on Windows

2010-06-10 Thread Hervé Pagès

Hi,

The R-based version of R CMD build doesn't work for me on Windows:

  E:\biocbld\bbs-2.7-bioc>R\bin\R CMD build meat\Biobase
  * checking for file 'meat\Biobase/DESCRIPTION' ... OK
  * preparing 'Biobase':
  * checking DESCRIPTION meta-information ... OK
  * cleaning src
  * installing the package to re-build vignettes
  Warning in shell(sprintf("%s > %s 2>&1", command, outfile), shell = 
"cmd.exe") :
'"E:\biocbld\bbs-2.7-bioc\R/bin/i386/Rcmd.exe" INSTALL -l 
"C:\DOCUME~1\BIOCBU~1\LOCALS~1\tmpdir\RtmpfEAMUM\Rinst4488262f" 
"E:/biocbld/bbs-2.7-bioc/meat/Biobase" > 
C:\DOCUME~1\BIOCBU~1\LOCALS~1\tmpdir\RtmpfEAMUM\xshell2bc3cf 2>&1' 
execution failed with error code 1

---
  The filename, directory name, or volume label syntax is incorrect.
---
  ERROR: Installation failed
  Removing installation dir

The old Perl-based version (R\bin\R CMD obuild) does work with no problem.

My R version is:

  E:\biocbld\bbs-2.7-bioc>R\bin\R --version
  R version 2.12.0 Under development (unstable) (2010-06-07 r52225)
  Copyright (C) 2010 The R Foundation for Statistical Computing
  ISBN 3-900051-07-0

  R is free software and comes with ABSOLUTELY NO WARRANTY.
  You are welcome to redistribute it under the terms of the
  GNU General Public License version 2.
  For more information about these matters see
  http://www.gnu.org/licenses/.

I'm on Windows Server 2003 R2 (32-bit). I have the same problem on
Windows Server 2008 R2 Enterprise (64-bit) (using the same revision
of R 2.12.0). I don't have any problem on Linux or Mac OS X.

FYI, this problem is causing most of the Bioconductor packages to
be red on Windows on our daily build/check report:

  http://bioconductor.org/checkResults/2.7/bioc-LATEST/

OTOH I don't see anything like that on the check summaries for
CRAN packages:

  http://cran.r-project.org/web/checks/check_summary.html

Maybe because CRAN only runs R CMD check which is still Perl-based?

Thanks,
H.

--
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpa...@fhcrc.org
Phone:  (206) 667-5791
Fax:(206) 667-1319

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