Re: [Rd] MASS (and class, nnet, spatial) for R 2.10.0 ?

2009-10-15 Thread Uwe Ligges



Peter Dalgaard wrote:

Dirk Eddelbuettel wrote:

On 14 October 2009 at 18:54, Duncan Murdoch wrote:
| On 14/10/2009 6:42 PM, Dirk Eddelbuettel wrote:
| > Maybe I missed an announcement somewhere but having started with 
the usual
| > practice of putting R pre-releases into Debian unstable leading up 
to the
| > release of the next R version, I now find myself unable to do my 
daily

| > package maintenance as I only see VR 7.2-49 with its
| > | > Depends: R (≥ 2.5.0), R (≤ 2.9.2)
| > | > preventing use on R 2.10.0.   That stopped the update of the 
Debian package
| > r-cran-effects (which wants MASS) in its tracks.   | > | > I see 
the somewhat hidden MASS 7.3-0 and 7.3-1 in

| > | > http://cran.r-project.org/src/contrib/Archive/MASS/
| > | > so should I be using these?  Along with the other components 
of VR ?

| | Yes, see this news item:
| |  oBundles of packages are deprecated.  See 'Writing R
| Extensions' for the steps needed to unbundle a bundle.

That of course I knew as a reader of both your NEWS feed [1] as well 
as my

own CRANberries [2] which carried e.g. Paul Gilbert's dse unbundling.

But that still does not answer my new MASS, nnet, spatial, class 
release are
not on CRAN in the usual location (eg $CRAN/src/contrib/) but socked 
away in

the Archive/ subdir.

| The VR bundle contained packages class, MASS, nnet, and spatial, 
which | are now separate recommended packages, whose source is 
included in the R | source tarball, or on CRAN in

| | http://cran.r-project.org/src/contrib/2.10.0/Recommended/

I guess the fact that VR is special and included in R itself explains 
part of

it.  I forget about that angle.


I don't think that's it. Rather, the point is that packages directly 
under src/contrib/ refers to the CURRENT version of R and gets updated 
only on release of the next version. The MASS in src/contrib/2.10.0 has


Depends: R (>= 2.10.0), grDevices, graphics, stats, utils

which means that trouble will occur if it gets put into src/contrib at 
this stage and someone tries to install it.


This does occasionally also affect non-recommended packages, currently: 
orientlib, which is in src/contrib/2.10.0/Other.


So, the point is that if you are building stuff for unreleased versions, 
the process should be taught to look in the appropriate part of CRAN.


As I'm never quite sure what you're up to, I can't tell whether the 
issue is on your side or ours. There does seem to be some potential 
issues, both with dependency searches and with the effects of 
unbundling. (Do we, e.g., want a virtual VR package which just depends 
on the packages that used to be inside, for the benefit of packages that 
depends on VR?)



Can packages depend on VR? Untested, but at least there is no such 
package on CRAN and dependency rules should mention the package, not the 
bundle.


The PACKAGES file in src/contrib also points to the packages in 
src/contrib/2.10.0. It is up to Dirk to use the information in PACKAGES 
correctly as it is done for the Windows and Mac binaries on CRAN.


Best,
Uwe








-p


Dirk

[1] http://developer.r-project.org/blosxom.cgi/R-devel
[2] http://dirk.eddelbuettel.com/cranberries/





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


Re: [Rd] MASS (and class, nnet, spatial) for R 2.10.0 ?

2009-10-15 Thread Peter Dalgaard

Uwe Ligges wrote:




As I'm never quite sure what you're up to, I can't tell whether the 
issue is on your side or ours. There does seem to be some potential 
issues, both with dependency searches and with the effects of 
unbundling. (Do we, e.g., want a virtual VR package which just depends 
on the packages that used to be inside, for the benefit of packages 
that depends on VR?)



Can packages depend on VR? Untested, but at least there is no such 
package on CRAN and dependency rules should mention the package, not the 
bundle.


The PACKAGES file in src/contrib also points to the packages in 
src/contrib/2.10.0. It is up to Dirk to use the information in PACKAGES 
correctly as it is done for the Windows and Mac binaries on CRAN.


OK, thanks for clearing that up, Uwe.


--
   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
~~ - (p.dalga...@biostat.ku.dk)  FAX: (+45) 35327907

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


[Rd] typo in nlminb ?

2009-10-15 Thread Yohan Chalabi
Dear dev,

it looks like there is a typo in nlminb.

regards,
Yohan


Index: src/library/stats/R/nlminb.R
===
--- src/library/stats/R/nlminb.R(revision 50097)
+++ src/library/stats/R/nlminb.R(working copy)
@@ -93,7 +93,7 @@
"7" = "singular convergence (7)",
"8" = "false convergence (8)",
"9" = "function evaluation limit reached without convergence 
(9)",
-   "10" = "iteration limit reached without convergence (9)",
+   "10" = "iteration limit reached without convergence (10)",
"14" = "storage has been allocated (?) (14)",
 
"15" = "LIV too small (15)",

-- 
PhD candidate
Swiss Federal Institute of Technology
Zurich

www.ethz.ch

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


Re: [Rd] Mac R spinning wheel with Package Manager (PR#14005)

2009-10-15 Thread james
Thanks Simon,

I changed my mirror and the freeze on "Get List" reduced (although  
there was still a spinning pizza).  Attempting an install definitely  
locked things up, but I can tell from my network activity that it was  
downloading and it did go ahead and install.

Thanks, I suppose expected behavior would be something communicating  
the issue and perhaps a progress bar; certainly I think avoiding a  
spinning pizza would be a good think, since that is usually very bad  
news :)

Cheers,
James

On Oct 14, 2009, at 09:32, Simon Urbanek wrote:

> (moving to the proper mailing list: R-SIG-Mac - this is not a bug so  
> far!)
>
> James,
>
> this look like your internet access is stalling R -- it's not really  
> R freezing but your internet. Try using a different mirror and/or  
> check your internet connection.
>
> Cheers,
> Simon
>
>
> On Oct 13, 2009, at 10:45 , ja...@howison.name wrote:
>
>> Full_Name: James Howison
>> Version: 2.9.2
>> OS: Mac OS X 10.5.8
>> Submission from: (NULL) (128.2.222.163)
>>
>>
>> For quite a while now I have been unable to use Package Manager to  
>> install
>> programs.  I get the spinning wheel and long lock ups.  This  
>> happens when I hit,
>> "get list", but that eventually returns, seemingly successfully.   
>> However it
>> also happens when I try to install a package, the whole application  
>> locks up.  I
>> don't see anything in a log file; I took a sample using Activity  
>> Manager and the
>> report after a force quit (which I didn't "send to apple")
>>
>> I'm able to build packages fine using install.packages and CMD  
>> INSTALL
>>
>> This behavior continued with a fresh R install (Oct 13, 2009)
>

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


[Rd] Can't locate R/Rdconv.pm in @INC

2009-10-15 Thread Grainne Kerr
Hi all,

I've inherited in-house development package, which was developed on R v
2.6.1. I'm trying upgrade to R v 2.9.1. I have installed R from source, with
a shared library and tcktk support.
When installing myPkg, I use the following command:

>R CMD INSTALL myPkg

* Installing to library ‘/usr/local/lib/R/library’
* Installing *source* package ‘myPkg’ ...
** R
** inst
** preparing package for lazy loading
Warning: 'Sys.putenv' is deprecated.
Use 'Sys.setenv' instead.
See help("Deprecated")
** help
*** installing help indices
Can't locate R/Rdconv.pm in @INC (@INC contains:
/usr/local/lib/R/library/RSPerl/perl/i486-linux-gnu-thread-multi
/usr/local/lib/R/library/RSPerl/perl
/etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
/usr/local/lib/site_perl .) at /usr/local/lib/R/share/perl/build-help.plline 21.
BEGIN failed--compilation aborted at /usr/local/lib/R/share/perl/
build-help.pl line 21.
ERROR: building help failed for package ‘myPkg’

>find / -name "Rdconv.pm"
/usr/local/lib/R/share/perl/R/Rdconv.pm


Obviously, if I  run "R CMD INSTALL --no-docs myPkg" it installs fine. It
also installs with older versions of perl.
I'm using Ubuntu OS.

Any pointers in the right direction or what to look for would be very much
appreciated.

Grainne.

R> sessionInfo()

R version 2.9.2 (2009-08-24)
i686-pc-linux-gnu

locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C

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

[[alternative HTML version deleted]]

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


[Rd] news() format

2009-10-15 Thread Paul Gilbert
I am trying to reformat my NEWS file so it works with news()  (in R-beta
as of a few days ago). I have tried several variations around

Changes in version 2009.10-1
o Standardized NEWS format for function news().
o Fixed a few documentation problems found by R-2.10.0 (beta) 
quality checks.


But news() only picks up the second entry.  Suggestions?

Paul


La version française suit le texte anglais.



This email may contain privileged and/or confidential information, and the Bank 
of
Canada does not waive any related rights. Any distribution, use, or copying of 
this
email or the information it contains by other than the intended recipient is
unauthorized. If you received this email in error please delete it immediately 
from
your system and notify the sender promptly by email that you have done so. 



Le présent courriel peut contenir de l'information privilégiée ou 
confidentielle.
La Banque du Canada ne renonce pas aux droits qui s'y rapportent. Toute 
diffusion,
utilisation ou copie de ce courriel ou des renseignements qu'il contient par une
personne autre que le ou les destinataires désignés est interdite. Si vous 
recevez
ce courriel par erreur, veuillez le supprimer immédiatement et envoyer sans 
délai à
l'expéditeur un message électronique pour l'aviser que vous avez éliminé de 
votre
ordinateur toute copie du courriel reçu.
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] MASS (and class, nnet, spatial) for R 2.10.0 ?

2009-10-15 Thread Dirk Eddelbuettel

On 15 October 2009 at 09:54, Uwe Ligges wrote:
| The PACKAGES file in src/contrib also points to the packages in 
| src/contrib/2.10.0. It is up to Dirk to use the information in PACKAGES 
| correctly as it is done for the Windows and Mac binaries on CRAN.

I am -- which is why I took care of 'effects' where yesterday's release to
upgrade as MASS complained loud and clear thanks to its R (<= 2.9.2) and I am
now using R 2.10.0 beta.

The issue at hand are the 'conditional' source directories. We (eg Debian)
use so-called watch files to match current versions against http or
ftp-reachable sources, and that scheme simply does cooperate with the scheme
I could satirically describe as 'CRAN sources here when the moon is half full
but there otherwise'.  *Unconditionally* computable URLs are simply easier to
handle.  "We" (eg Debian) deal with some 15,000 source packages from a
presumably similarly large number of sources. Special-casing the PACKAGES
file is out of scope.

Then again, with my Debian developer hat on, I can certainly cope with that,
and I don't see a much cleaner way forward.  Part of the problem simply is
that I am 'early' with some packages, but that is in simply to help in
getting pre-releases out so that we catch a bug or two.  I was just trying to
point out potential sources of confusion, and you are quite right in pointing
me to the PACKAGES file.

OTOH, consider that eg Brian always reminds people to use pre-release, and if
one then does simple non-R-based searches such as the URL expansion

http://cran.r-project.org/package=MASS

or the direct

http://cran.r-project.org/web/packages/MASS/index.html

one arrives at entirely misleading information.  Just sayin' ... and as
above, this cannot be corrected as the Apache macro / cgi expander cannot
know that I have R 2.10.0 in mind.

I'll drop this now, and thank everybody for taking the time to follow-up.

Dirk

-- 
Three out of two people have difficulties with fractions.

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


[Rd] R segfault in fgets from do_system under high memory use (PR#14008)

2009-10-15 Thread atp
Full_Name: Andrew Piskorski
Version: R 2.9.2 (Patched), 2009-09-24, svn.rev 49930, x86_64-unknown-linux-gnu
OS: Linux, Ubuntu 8.04.3 LTS
Submission from: (NULL) (66.31.65.247)


I have a large memory test case which segaults R everytime in an fgets
call from R's do_system (see below).

This appears to be because R does not check the return value of the
system popen, and I have a simple patch to src/main/sysutils.c and
src/unix/sys-unix.c which fixes the problem.  I will attempt to attach
the patch after submitting this initial bug report.

This is on Linux, Ubuntu 8.04.3 LTS with:

R 2.9.2 (Patched), 2009-09-24, svn.rev 49930, x86_64-unknown-linux-gnu


Below is some further detail on the problem, from BEFORE applying my
patch:


Valgrind doesn't seem to find anything unusual until an "Invalid read
of size 4" in fgets right before it segfaults.  Valgrind is also
reporting an "Address 0x0 is not stack'd" message there, which I think
means that do_system is passing a 0 address to fgets, which is then
causing the segfault.

Looking at the fgets all in src/unix/sys-unix.c, the buf argument is
statically allocated so I don't see how it could be 0.  fp, the 3rd
argument to fgets, is set by R_popen().  So, I think the system
popen() call is failing to fork or allocate memory or whatever it's
trying to do, and is returning a NULL.

gdb and Valgrind output from the failure follow:


Program received signal SIGSEGV, Segmentation fault.
(gdb) bt
#0  0x7f735647f4fd in fgets () from /lib/libc.so.6
#1  0x7f7356b39fe3 in do_system (call=,
op=, args=,
rho=) at ../../../src/unix/sys-unix.c:273
#2  0x7f7356aa1c09 in do_internal (call=,
op=, args=0xace1d220, env=0xa90e3820)
at ../../../src/main/names.c:1150
#3  0x7f7356a6ec11 in Rf_eval (e=0x872638, rho=0xa90e3820)
at ../../../src/main/eval.c:461
[...]
#90 0x7f7356a92950 in run_Rmainloop () at ../../../src/main/main.c:966
#91 0x0040088b in main (ac=,
av=) at ../../../src/main/Rmain.c:33
#92 0x7f735643a1c4 in __libc_start_main () from /lib/libc.so.6
#93 0x004007a9 in _start ()
(gdb) q


==27499== Invalid read of size 4
==27499==at 0x55E84FD: fgets (in /lib/libc-2.7.so)
==27499==by 0x4FB6FB2: do_system (sys-unix.c:273)
==27499==by 0x4F1EBD8: do_internal (names.c:1150)
==27499==by 0x4EEBBE0: Rf_eval (eval.c:461)
==27499==by 0x4EEC9D1: do_begin (eval.c:1191)
==27499==by 0x4EEBBE0: Rf_eval (eval.c:461)
==27499==by 0x4EEE34E: Rf_applyClosure (eval.c:667)
==27499==by 0x4EEBAFB: Rf_eval (eval.c:505)
==27499==by 0x4EEC9D1: do_begin (eval.c:1191)
==27499==by 0x4EEBBE0: Rf_eval (eval.c:461)
==27499==by 0x4EEBBE0: Rf_eval (eval.c:461)
==27499==by 0x4EEC9D1: do_begin (eval.c:1191)
==27499==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
/home/andy/t/vg-R.sh: line 34: 27499 Segmentation fault

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


[Rd] bugs.r-project.org, Submit Changes does nothing (PR#14009)

2009-10-15 Thread atp
Full_Name: Andrew Piskorski
Version: not applicable, web-based R bug tracker
OS: not applicable, web-based R bug tracker
Submission from: (NULL) (66.31.65.247)


Once I have submitted a bug via the bugs.r-project.org web interface,
I can find the bug and view it.  E.g.:

  http://bugs.r-project.org/cgi-bin/R/incoming?id=14008

That shows me an empty "Notes:" box and a button to "Submit Changes".

I entered some text (a patch for the above id=14008 segfault) and
clicked Submit, but my entry seems to be silently discarded.  There is
no error message, but the new data I attempted to enter never shows up
on the bug report.

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


Re: [Rd] PR#14008, R segfault in fgets from do_system under high memory use

2009-10-15 Thread atp
On this issue:

  http://bugs.r-project.org/cgi-bin/R/incoming?id=14008

Here's a small patch which fixes the problem:


$ svn diff src/main/sysutils.c src/unix/sys-unix.c
Index: src/main/sysutils.c
===
--- src/main/sysutils.c (revision 49961)
+++ src/main/sysutils.c (working copy)
@@ -260,6 +260,9 @@
 #else
 fp = popen(command, type);
 #endif
+if (NULL == fp) {
+   error(_("popen failed with errno %i: %s"), errno, strerror(errno));
+}
 return fp;
 }
 #endif /* HAVE_POPEN */
Index: src/unix/sys-unix.c
===
--- src/unix/sys-unix.c (revision 49961)
+++ src/unix/sys-unix.c (working copy)
@@ -270,6 +270,11 @@
 
PROTECT(tlist);
fp = R_popen(translateChar(STRING_ELT(CAR(args), 0)), x);
+if (NULL == fp) {
+UNPROTECT(1);
+errorcall(call, _("R_popen returned NULL."));
+return R_NilValue;
+}
 for (i = 0; fgets(buf, INTERN_BUFSIZE, fp); i++) {
 read = strlen(buf);
 if(read >= INTERN_BUFSIZE - 1)

-- 
Andrew Piskorski 
http://www.piskorski.com/

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


[Rd] R RSS feed

2009-10-15 Thread Paul Gilbert
I was trying to subscribe to an RSS feed from
 but IE chokes on DTDs and
Firefox also has trouble with this feed. (I'm not sure if it has trouble
with DTDs in general.) 

I went to one of our web developers to see what I should use to read the
feed, and he pointed out that the mix of RSS 2.00 and rss-0.91 looks
like a mistake:


http://www.rssboard.org/rss-0.91.dtd";>

and that DTDs are a little bit unusual in RSS feeds (but said it is not
impossible). I'm a complete novice in this, just pointing it out in case
it is a bug.

Paul


La version française suit le texte anglais.



This email may contain privileged and/or confidential information, and the Bank 
of
Canada does not waive any related rights. Any distribution, use, or copying of 
this
email or the information it contains by other than the intended recipient is
unauthorized. If you received this email in error please delete it immediately 
from
your system and notify the sender promptly by email that you have done so. 



Le présent courriel peut contenir de l'information privilégiée ou 
confidentielle.
La Banque du Canada ne renonce pas aux droits qui s'y rapportent. Toute 
diffusion,
utilisation ou copie de ce courriel ou des renseignements qu'il contient par une
personne autre que le ou les destinataires désignés est interdite. Si vous 
recevez
ce courriel par erreur, veuillez le supprimer immédiatement et envoyer sans 
délai à
l'expéditeur un message électronique pour l'aviser que vous avez éliminé de 
votre
ordinateur toute copie du courriel reçu.
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R RSS feed

2009-10-15 Thread Duncan Murdoch

On 10/15/2009 2:46 PM, Paul Gilbert wrote:

I was trying to subscribe to an RSS feed from
 but IE chokes on DTDs and
Firefox also has trouble with this feed. (I'm not sure if it has trouble
with DTDs in general.) 


I went to one of our web developers to see what I should use to read the
feed, and he pointed out that the mix of RSS 2.00 and rss-0.91 looks
like a mistake:


http://www.rssboard.org/rss-0.91.dtd";>

and that DTDs are a little bit unusual in RSS feeds (but said it is not
impossible). I'm a complete novice in this, just pointing it out in case
it is a bug.


I agree it's a bug, but I'm also a novice here (even though I set up the 
feed!)


If your web developer (or anyone else on this list) can suggest what the 
header should look like, I'll fix it.


Duncan Murdoch



Paul


La version française suit le texte anglais.



This email may contain privileged and/or confidential information, and the Bank 
of
Canada does not waive any related rights. Any distribution, use, or copying of 
this
email or the information it contains by other than the intended recipient is
unauthorized. If you received this email in error please delete it immediately 
from
your system and notify the sender promptly by email that you have done so. 




Le présent courriel peut contenir de l'information privilégiée ou 
confidentielle.
La Banque du Canada ne renonce pas aux droits qui s'y rapportent. Toute 
diffusion,
utilisation ou copie de ce courriel ou des renseignements qu'il contient par une
personne autre que le ou les destinataires désignés est interdite. Si vous 
recevez
ce courriel par erreur, veuillez le supprimer immédiatement et envoyer sans 
délai à
l'expéditeur un message électronique pour l'aviser que vous avez éliminé de 
votre
ordinateur toute copie du courriel reçu.
__
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] forwarded: bug (?) in cut.POSIXt with "breaks"=integer

2009-10-15 Thread Ben Bolker

From: Vitalie S.  rambler.ru>
Subject: Bug in cut.POSIXt
Newsgroups: gmane.comp.lang.r.general
Date: 2009-10-15 15:47:48 GMT (1 hour and 29 minutes ago)

Hello Everyone,

Before reporting decided to post here first:

tt <- structure(c(1254238817, 1254238859, 1254238969, 1254239080), class =
c("POSIXt",
  "POSIXct"),
tzone = "")

cut.POSIXt(tt, 2)
#Error in `levels<-.factor`(`*tmp*`, value = character(0)) :
#  number of levels differs

cut.POSIXt(tt, 2, labels=c("a1", "a2"))
#[1] a1 a1 a2 a2
#Levels: a1 a2

cut(tt, "2 mins")
#[1] 2009-09-29 17:40:00 2009-09-29 17:40:00 2009-09-29 17:42:00
2009-09-29 17:44:00
#Levels: 2009-09-29 17:40:00 2009-09-29 17:42:00 2009-09-29 17:44:00

> sessionInfo()
R version 2.9.2 Patched (2009-09-24 r50069)
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  utils datasets  grDevices methods   base
>

Vitalie.


==

  I would agree that this is a bug ... this patch gets rid of the error,
but leaves the labels very ugly -- given enough hours I might be able to
figure out how to make the labels nice, but someone else can probably do
it quicker (see comments in code below)


  It would probably also be worth adding something like

cut(Dates,2)

  around line 5067 of reg-tests-1.R


--- datetime.R  2009-10-15 13:01:15.0 -0400
***
*** 764,770 
}
  } else stop("invalid specification of 'breaks'")
  res <- cut(unclass(x), unclass(breaks), labels = labels, right =
right, ...)
! if(is.null(labels)) levels(res) <-
as.character(breaks[-length(breaks)])
  res
  }

--- 764,782 
}
  } else stop("invalid specification of 'breaks'")
  res <- cut(unclass(x), unclass(breaks), labels = labels, right =
right, ...)
! if(is.null(labels)) {
!   if (is.numeric(breaks) && length(breaks) == 1L)
! levels(res) <- as.character(breaks[-length(breaks)])
!   } else {
! ## ?? what should happen here?
! ## this version simply leaves the break values
! ## as numeric (and very ugly)
! ## I don't know how to safely convert the breakpoints
! ## back to a character format (e.g.
! ## levels(res) = [1970-01-01 00:00:00,1970-01-01 12:00:00)
! ## instead of [18000,61200)
!   }
! }
  res
  }


-- 
Ben Bolker
Associate professor, Biology Dep't, Univ. of Florida
bol...@ufl.edu / www.zoology.ufl.edu/bolker
GPG key: www.zoology.ufl.edu/bolker/benbolker-publickey.asc



signature.asc
Description: OpenPGP digital signature
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] let R and Rscript infer paths from their own location (PR#14007)

2009-10-15 Thread pkensche
Full_Name: Philip R. Kensche
Version: 2.9.1
OS: Linux
Submission from: (NULL) (131.174.146.252)


Use case:
Run R scripts using bin/Rscript or "bin/R --no-restore --file=
--args " in a heterogeneous computing grid in which it is not possible to
predict the actual installation directory of the R binaries.

Problem:
The script bin/R and the wrapper bin/Rscript contain hardcoded paths. Thus,
currently, it is not possible to install R in a local directory tree, install
packages and finally run this installation on a heterogeneous computing grid.
The configure option --disable-rpath doesn't have any influence on whether
hardcoded paths are used in these programs.

Proposed solution:
Let bin/R and bin/Rscript infer their own positions using something like
$(dirname $(readlink -f "$0")) (for bin/R) and set the other paths (such as
R_HOME_DIR in bin/R) relative to these.

The start of bin/R could look something like this:


if test -z "${R_HOME_DIR}"; then
R_HOME_DIR=$(dirname $(readlink -f "$0"))/../lib/R
fi

case "linux-gnu" in
linux*)
run_arch=`uname -m`
case "$run_arch" in
x86_64|mips64|ppc64|powerpc64|sparc64|s390x)
libnn=lib64
libnn_fallback=lib
;;
*)
libnn=lib
libnn_fallback=lib64
;;
esac
if [ -x "${R_HOME_DIR}/../../${libnn}/R/bin/exec/R" ]; then
R_HOME_DIR="${R_HOME_DIR}/../../${libnn}/R"
elif [ -x "${R_HOME_DIR}/../../${libnn_fallback}/R/bin/exec/R" ]; then
R_HOME_DIR="${R_HOME_DIR}/../../${libnn_fallback}/R"
## else -- leave alone (might be a sub-arch)
fi
;;
esac


if test -n "${R_HOME}" && \
test "${R_HOME}" != "${R_HOME_DIR}"; then
echo "WARNING: ignoring environment value of R_HOME"
fi
R_HOME="${R_HOME_DIR}"
export R_HOME
R_SHARE_DIR="${R_HOME}/share"
export R_SHARE_DIR
R_INCLUDE_DIR="${R_HOME}/include"
export R_INCLUDE_DIR
R_DOC_DIR="${R_HOME}/doc"
export R_DOC_DIR

...


There are some things that I don't understand about the original script, though.
Why does it start with a test that always succeeds? Why does it ignore R_HOME? I
didn't change this stuff. In any case, the changes above did the job for me.

Greetings,

Philip

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


[Rd] Eigenvalue Bug in "psych" "principal" (PR#14010)

2009-10-15 Thread kyler
Full_Name: Kyle Roberts
Version: 2.9.2
OS: Windows XP
Submission from: (NULL) (129.119.244.130)


In 2.9.2, the Eigenvalues from a principal components analysis using "principal"
in the "psych" package no longer works. It still works in 2.8 and 2.7, but no
longer in 2.9.2. For example:

> library(MBESS)
> data(HS.data)
> library(psych)

>  Subset the dataset to include only 8 variables
> new.data<-subset(HS.data, select=c(deduct, numeric, problemr, arithmet, 
  paragrap, sentence, wordc, wordm))

> pc2<-principal(new.data, nfactors=2, rotate="varimax")
> pc2
Principal Components Analysis
Call: principal(r = new.data, nfactors = 2, rotate = "varimax")
 item  PC1  PC2   h2   u2
deduct  1  0.68 0.52 0.48
numeric 2  0.82 0.69 0.31
problemr3 0.45 0.54 0.49 0.51
arithmet4  0.67 0.54 0.46
paragrap5 0.84  0.76 0.24
sentence6 0.89  0.83 0.17
wordc   7 0.76  0.65 0.35
wordm   8 0.81 0.30 0.75 0.25

PC1  PC2
SS loadings3.09 2.13
Proportion Var 0.39 0.27
Cumulative Var 0.39 0.65

Test of the hypothesis that 2 factors are sufficient.

The degrees of freedom for the model is 13  and the objective function was  0.36

The number of observations was  301  with Chi Square =  104.87  with prob < 
1.9e-16 

Fit based upon off diagonal values = 0.97
Measures of factor score adequacy 
  PC1 PC2
Correlation of scores with factors  1   1
Multiple R square of scores with factors1   1
Minimum correlation of factor score estimates   1   1
> 
>   ## Eigenvalues
>   pc2$values
NULL


It still works in the principal axis factoring package in "psych", but no longer
with "principal".

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


Re: [Rd] Eigenvalue Bug in "psych" "principal" (PR#14010)

2009-10-15 Thread Duncan Murdoch

On 10/15/2009 3:15 PM, ky...@smu.edu wrote:

Full_Name: Kyle Roberts
Version: 2.9.2
OS: Windows XP
Submission from: (NULL) (129.119.244.130)


In 2.9.2, the Eigenvalues from a principal components analysis using "principal"
in the "psych" package no longer works. It still works in 2.8 and 2.7, but no
longer in 2.9.2. For example:


This is not a bug report about R.  You should contact the maintainers of 
the packages involved.


Duncan Murdoch




library(MBESS)
data(HS.data)
library(psych)



 Subset the dataset to include only 8 variables
new.data<-subset(HS.data, select=c(deduct, numeric, problemr, arithmet, 

  paragrap, sentence, wordc, wordm))


pc2<-principal(new.data, nfactors=2, rotate="varimax")
pc2

Principal Components Analysis
Call: principal(r = new.data, nfactors = 2, rotate = "varimax")
 item  PC1  PC2   h2   u2
deduct  1  0.68 0.52 0.48
numeric 2  0.82 0.69 0.31
problemr3 0.45 0.54 0.49 0.51
arithmet4  0.67 0.54 0.46
paragrap5 0.84  0.76 0.24
sentence6 0.89  0.83 0.17
wordc   7 0.76  0.65 0.35
wordm   8 0.81 0.30 0.75 0.25

PC1  PC2
SS loadings3.09 2.13
Proportion Var 0.39 0.27
Cumulative Var 0.39 0.65

Test of the hypothesis that 2 factors are sufficient.

The degrees of freedom for the model is 13  and the objective function was  0.36

The number of observations was  301  with Chi Square =  104.87  with prob < 
1.9e-16 


Fit based upon off diagonal values = 0.97
Measures of factor score adequacy 
  PC1 PC2

Correlation of scores with factors  1   1
Multiple R square of scores with factors1   1
Minimum correlation of factor score estimates   1   1


  ## Eigenvalues
  pc2$values

NULL


It still works in the principal axis factoring package in "psych", but no longer
with "principal".

__
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] R RSS feed

2009-10-15 Thread Yihui Xie
I do not think the problem was caused by DTD. I checked the content of
the RSS feed and found there were several places containing characters
that were not converted to HTML entities (e.g. "&" should be "&"),
or opening tags without corresponding closing tags (e.g.  without
, a typical problem I found, at least in
http://developer.r-project.org/blosxom.cgi/R-devel/NEWS/index.rss).

These problems will make the browsers choke but I also find Google
Reader does not mind at all -- you can still read the RSS messages
normally there. I'm not sure how other RSS readers deal with those
non-standard HTML content.

Regards,
Yihui
--
Yihui Xie 
Phone: 515-294-6609 Web: http://yihui.name
Department of Statistics, Iowa State University
3211 Snedecor Hall, Ames, IA



On Thu, Oct 15, 2009 at 2:15 PM, Duncan Murdoch  wrote:
> On 10/15/2009 2:46 PM, Paul Gilbert wrote:
>>
>> I was trying to subscribe to an RSS feed from
>>  but IE chokes on DTDs and
>> Firefox also has trouble with this feed. (I'm not sure if it has trouble
>> with DTDs in general.)
>> I went to one of our web developers to see what I should use to read the
>> feed, and he pointed out that the mix of RSS 2.00 and rss-0.91 looks
>> like a mistake:
>>
>> 
>> > "http://www.rssboard.org/rss-0.91.dtd";>
>>
>> and that DTDs are a little bit unusual in RSS feeds (but said it is not
>> impossible). I'm a complete novice in this, just pointing it out in case
>> it is a bug.
>
> I agree it's a bug, but I'm also a novice here (even though I set up the
> feed!)
>
> If your web developer (or anyone else on this list) can suggest what the
> header should look like, I'll fix it.
>
> Duncan Murdoch
>
>>
>> Paul
>>
>>

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


[Rd] Question when compiling source code with VC++

2009-10-15 Thread cstrato

Dear Duncan,

In your document "readme.packages.txt" you have a very helpful chapter 
on "Using Visual C++".
Please allow me to ask you one question: Why do you propose the option 
"/MT" instead of option "/MD"?
(To my knowledge usually option "/MD" is used when compiling programs 
with VC++.)


Best regards
Christian
_._._._._._._._._._._._._._._._._._
C.h.r.i.s.t.i.a.n   S.t.r.a.t.o.w.a
V.i.e.n.n.a   A.u.s.t.r.i.a
e.m.a.i.l:cstrato at aon.at
_._._._._._._._._._._._._._._._._._

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


Re: [Rd] R RSS feed

2009-10-15 Thread Duncan Murdoch

On 15/10/2009 4:31 PM, Yihui Xie wrote:

I do not think the problem was caused by DTD. I checked the content of
the RSS feed and found there were several places containing characters
that were not converted to HTML entities (e.g. "&" should be "&"),
or opening tags without corresponding closing tags (e.g.  without
, a typical problem I found, at least in
http://developer.r-project.org/blosxom.cgi/R-devel/NEWS/index.rss).


Thanks, will fix those.

Duncan Murdoch



These problems will make the browsers choke but I also find Google
Reader does not mind at all -- you can still read the RSS messages
normally there. I'm not sure how other RSS readers deal with those
non-standard HTML content.

Regards,
Yihui
--
Yihui Xie 
Phone: 515-294-6609 Web: http://yihui.name
Department of Statistics, Iowa State University
3211 Snedecor Hall, Ames, IA



On Thu, Oct 15, 2009 at 2:15 PM, Duncan Murdoch  wrote:

On 10/15/2009 2:46 PM, Paul Gilbert wrote:

I was trying to subscribe to an RSS feed from
 but IE chokes on DTDs and
Firefox also has trouble with this feed. (I'm not sure if it has trouble
with DTDs in general.)
I went to one of our web developers to see what I should use to read the
feed, and he pointed out that the mix of RSS 2.00 and rss-0.91 looks
like a mistake:


http://www.rssboard.org/rss-0.91.dtd";>

and that DTDs are a little bit unusual in RSS feeds (but said it is not
impossible). I'm a complete novice in this, just pointing it out in case
it is a bug.

I agree it's a bug, but I'm also a novice here (even though I set up the
feed!)

If your web developer (or anyone else on this list) can suggest what the
header should look like, I'll fix it.

Duncan Murdoch


Paul




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


Re: [Rd] Question when compiling source code with VC++

2009-10-15 Thread Duncan Murdoch

On 15/10/2009 5:01 PM, cstrato wrote:

Dear Duncan,

In your document "readme.packages.txt" you have a very helpful chapter 
on "Using Visual C++".
Please allow me to ask you one question: Why do you propose the option 
"/MT" instead of option "/MD"?
(To my knowledge usually option "/MD" is used when compiling programs 
with VC++.)


I didn't write that: I've got no experience with VC++.  It was Brian 
Ripley who wrote it, and the log says he wrote it in 1999.  So I'd guess 
that it isn't bad advice (having lasted 10 years without a change), but 
I guess it's possible that it is no longer optimal.


Duncan Murdoch

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


Re: [Rd] R RSS feed

2009-10-15 Thread Yihui Xie
I guess this package might be of help:
http://www.omegahat.org/RTidyHTML/ (by the other Duncan :-)

Regards,
Yihui
--
Yihui Xie 
Phone: 515-294-6609 Web: http://yihui.name
Department of Statistics, Iowa State University
3211 Snedecor Hall, Ames, IA



On Thu, Oct 15, 2009 at 4:41 PM, Duncan Murdoch  wrote:
> On 15/10/2009 4:31 PM, Yihui Xie wrote:
>>
>> I do not think the problem was caused by DTD. I checked the content of
>> the RSS feed and found there were several places containing characters
>> that were not converted to HTML entities (e.g. "&" should be "&"),
>> or opening tags without corresponding closing tags (e.g.  without
>> , a typical problem I found, at least in
>> http://developer.r-project.org/blosxom.cgi/R-devel/NEWS/index.rss).
>
> Thanks, will fix those.
>
> Duncan Murdoch
>

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


[Rd] post-installation startup problem with 2.10.0

2009-10-15 Thread Mark.Bravington
I've just installed R2.10.0 v50082, and found the problem described below the 
first few times I launched it. Did not occur with v49613 (the previous most 
recent version I have). The problem has now gone away, and is therefore 
non-reproducible, but there seems to be something up with parameter processing 
or environment variable checking or loading of .RData files immediately after 
installation. Just thought you'd like to know.

I always start R in the same folder, where there's a ".RData" file that 
contains a '.First' function whose first lines are as follows:

function( skip.First=Sys.getenv( 'NOFIRST') != '') {
  if( skip.First) { # useful for command line startup when bugs in .First
cat( 'Skipping .First\n')
return( invisible( NULL)) }
   ...
   
When I launched v50082 (simply by changing the path of R in the Windows 
"properties" box-- no other changes to what I normally do), it printed the 
"Skipping .First" message-- so '.First' was running, but deciding to abort. 
However, the NOFIRST environment variable was definitely not set. The other R 
versions that I have installed (latest v49613) didn't skip .First when launched 
in exactly the same way.

I modified the .First to first-of-all print 'skip.First', called 
'save.image()', tried it in my other R versions, and relaunched v50082. This 
time, everything worked. I took out the print line, saved again, and relaunched 
v50082. Everything still worked! And has continued to since.

System info below-- the search path is of course what results _after_ '.First' 
has run, so it would have been different when I was having problems.

Mark

--
Mark Bravington
CSIRO Mathematical & Information Sciences
Marine Laboratory
Castray Esplanade
Hobart 7001
TAS

ph (+61) 3 6232 5118
fax (+61) 3 6232 5012
mob (+61) 438 315 623



--please do not edit the information below--

Version:
 platform = i386-pc-mingw32
 arch = i386
 os = mingw32
 system = i386, mingw32
 status = beta
 major = 2
 minor = 10.0
 year = 2009
 month = 10
 day = 14
 svn rev = 50082
 language = R
 version.string = R version 2.10.0 beta (2009-10-14 r50082)

Windows XP Professional x64 (build 3790) Service Pack 2

Locale:
LC_COLLATE=English_Australia.1252;LC_CTYPE=English_Australia.1252;LC_MONETARY=English_Australia.1252;LC_NUMERIC=C;LC_TIME=English_Australia.1252

Search Path:
 .GlobalEnv, package:grDevices, package:ad, package:chstuff, package:handy2, 
package:tweedie, package:statmod, package:handy, package:debug, 
package:mvbutils, mvb.session.info, package:tools, package:tcltk, 
package:stats, package:graphics, package:utils, package:methods, Autoloads, 
package:base

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