Skip to content

Commit

Permalink
merged from main
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/branches/WinMake@30094 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
ripley committed Jun 30, 2004
1 parent 0120d00 commit 3b28265
Show file tree
Hide file tree
Showing 18 changed files with 146 additions and 95 deletions.
36 changes: 32 additions & 4 deletions BUGS
Expand Up @@ -642,10 +642,6 @@ Date: Fri, 21 May 2004 15:24:05 +0200 (CEST)
Subject: Crash in OSX
From: murray.pung@studentmail.newcastle.edu.au
Date: Sat, 5 Jun 2004 04:36:52 +0200 (CEST)
* PR# 6982 *
Subject: out-of-date information in R for Mac OS X FAQ
From: d.firth@warwick.ac.uk
Date: Tue, 15 Jun 2004 12:50:38 +0200 (CEST)

Directory: Misc

Expand Down Expand Up @@ -907,3 +903,35 @@ Date: Fri, 25 Jun 2004 11:03:31 +0200
Subject: RE:znvvbi,UPTD - NEW stock pick - last pick up 200% - Set to explode on Monday
From: "Kelvin " <sbekoau@tiscali.fr>
Date: Sat, 26 Jun 2004 22:23:11 -0300
* PR# 7027 *
Subject: Problem with hasArg and the ... argument
From: j.j.goeman@lumc.nl
Date: Mon, 28 Jun 2004 11:12:27 +0200 (CEST)
* PR# 7028 *
Subject: how are you?
From: "Katelyn Nova" <cfhqw8mctd@nni.com>
Date: Tue, 29 Jun 2004 04:30:58 +0100
* PR# 7029 *
Subject: lowCost meds
From: "Helen " <FGSBNMEWALIVBP@dallas.net>
Date: Tue, 29 Jun 2004 11:03:17 +0600
* PR# 7030 *
Subject: input file and console command size limit
From: jerome.mutterer@ibmp-ulp.u-strasbg.fr
Date: Tue, 29 Jun 2004 09:00:36 +0200 (CEST)
* PR# 7031 *
Subject: vfont and title()
From: "Warnes, Gregory R" <gregory_r_warnes@groton.pfizer.com>
Date: Tue, 29 Jun 2004 10:23:47 -0400
* PR# 7032 *
Subject: Best and very cheeap-warez 0ffers! Let's se our prices.. here. irreconcilable
From: <Clara@cocolee.net>
Date: Tue, 29 Jun 2004 22:10:48 +0400
* PR# 7033 *
Subject: WE SEND OUT ORIGINAL SOFTWARES AT CHEAP (FROM $20) TO WORLDWIDE let
From: "Valene Tanna" <zis4ps@ultimanet.com>
Date: Tue, 29 Jun 2004 11:38:44 -0700
* PR# 7034 *
Subject: ky Windows 2003 Server Datacenter
From: "Lacy Aragon" <Roafvss@ixpres.com>
Date: Tue, 29 Jun 2004 14:44:02 -0600
9 changes: 7 additions & 2 deletions NEWS
Expand Up @@ -121,9 +121,9 @@ NEW FEATURES
o There is a new atomic vector type, class "raw". See ?raw for
full details including the operators and utility functions provided.

o The png() and jpeg() devices (and the bmp() device under Windows)
o The png() and jpeg() devices (and the bmp() device under Windows)
now allow a nominal resolution to be recorded in the file.

o ls.str() and lsf.str() now return an object of class "ls_str" which
has a print method.

Expand All @@ -141,6 +141,8 @@ NEW FEATURES
o make.names() has a new argument allow_, which if false allows
its behaviour in R 1.8.1 to be reproduced.

o rank() has two new 'ties.method's, "min" and "max".


UTILITIES

Expand Down Expand Up @@ -271,6 +273,9 @@ BUG FIXES
o window() failed if both start and end were outside the time
range of the original series (possible if extend = TRUE).

o coplot(..) doesn't give an extraneous warning anymore when called
on a fresh device.



CHANGES IN R VERSION 1.9.1
Expand Down
2 changes: 1 addition & 1 deletion date-stamp
@@ -1 +1 @@
2004/06/28
2004/06/30
6 changes: 3 additions & 3 deletions src/extra/pcre/Makefile.win
Expand Up @@ -3,10 +3,10 @@ include ../../gnuwin32/MkRules

CFLAGS = -I../../include -I. -O2 -DWIN32

all: libRpcre.a
all: libpcre.a

pcre.o: pcre.c chartables.h
libRpcre.a: get.o maketables.o pcre.o study.o
libpcre.a: get.o maketables.o pcre.o study.o

## this can't be used if cross-building, so ship the file
ifneq ($(strip $(BUILD)),CROSS)
Expand All @@ -19,7 +19,7 @@ chartables.h: chartables.h.win
endif

clean:
$(RM) *.o *~ libRpcre.a
$(RM) *.o *~ libpcre.a

distclean: clean
$(RM) chartables.h dftables.exe
4 changes: 2 additions & 2 deletions src/extra/xdr/Makefile.win
Expand Up @@ -3,9 +3,9 @@ include ../../gnuwin32/MkRules

CFLAGS=-O2 -I. -DWIN32 -D_X86_

xdr.a: xdr.o xdr_float.o xdr_stdio.o xdr_mem.o
libxdr.a: xdr.o xdr_float.o xdr_stdio.o xdr_mem.o

clean:
$(RM) *.o *~
distclean: clean
$(RM) xdr.a
$(RM) libxdr.a
64 changes: 19 additions & 45 deletions src/gnuwin32/fixed/Makefile
@@ -1,77 +1,51 @@
include ../MkRules

all: profiles fixh fixhtml fixbin fixetc fixshare
R_HOME = ../../..

profiles: ../../../library/base/R/Rprofile
all: profiles fixhtml fixbin fixetc fixshare

../../../library/base/R/Rprofile: ../../library/profile/Common.R \
profiles: $(R_HOME)/library/base/R/Rprofile

$(R_HOME)/library/base/R/Rprofile: ../../library/profile/Common.R \
../../library/profile/Rprofile.windows
@$(ECHO) -------- Building $@ from $^--------
mkdir -p ../../../library/base/R
mkdir -p $(R_HOME)/library/base/R
@$(CAT) $^ > $@


fixh: h/config.h h/psignal.h
@$(CP) -p ./h/config.h ./h/psignal.h ../../include
@$(ECHO) done > fixh

../../../bin/massage-Examples: ../../../share/perl/massage-Examples.pl
$(SED) -e 's/"contr.poly")/"contr.poly"), pager="console"/' $< > $@

../../../bin/check: ../../scripts/check.in
$(SED) -e 1d $< > $@

../../../bin/build: ../../scripts/build.in
$(SED) -e 1d $< > $@

../../../bin/Sd2Rd: ../../scripts/Sd2Rd.in
$(SED) -e 1d $< > $@

../../../bin/Rdconv: ../../scripts/Rdconv.in
$(SED) -e 1d -e s/\"unix\"/\"windows\"/ $< > $@

../../../bin/Rdiff.sh: ../../scripts/Rdiff
$(SED) -e 1d -e 's/\$${EGREP}/grep -E/' $< > $@

../../../bin/Rprof: ../../scripts/Rprof.in
$(SED) -e 1d $< > $@

fixbin: ../../../bin/massage-Examples ../../../bin/build \
../../../bin/check ../../../bin/Rdconv \
../../../bin/Sd2Rd ../../../bin/Rdiff.sh ../../../bin/Rprof cp2bin
fixbin: cp2bin
@$(ECHO) done > fixbin

cp2bin: $(filter-out ./bin/CVS, $(wildcard ./bin/*))
ifeq ($(strip $(BUILD)),CROSS)
@zip -ql bins $^
@unzip -oq bins -d ../../..
@unzip -oq bins -d $(R_HOME)
else
@zip -q bins $^
@unzip -oaq bins -d ../../..
@unzip -oaq bins -d $(R_HOME)
endif
@$(RM) bins.zip

fixhtml: $(wildcard ./html/*.html) ../../../doc/html/search/SearchEngine.html
$(CP) -p ./html/*.html ../../../doc/html
$(CP) -p ./html/rwin.html ../../../doc/html/index.html
fixhtml: html/rwin.html $(R_HOME)/doc/html/search/SearchEngine.html
$(CP) -p html/rwin.html $(R_HOME)/doc/html
$(CP) -p html/rwin.html $(R_HOME)/doc/html/index.html
@$(ECHO) done > fixhtml

fixetc: $(filter-out ./etc/CVS, $(wildcard ./etc/*))
$(CP) -p $^ ../../../etc
$(CP) -p $^ $(R_HOME)/etc
@$(ECHO) done > fixetc

fixshare: ./share/tests.mk
$(MKDIR) -p ../../../share/make
$(CP) -p $^ ../../../share/make/wintests.mk
fixshare: share/tests.mk
$(MKDIR) -p $(R_HOME)/share/make
$(CP) -p $^ $(R_HOME)/share/make/wintests.mk
@$(ECHO) done > fixshare

clean:
$(RM) *~ */*~ fixhtml fixh fixbin fixetc fixshare
$(RM) *~ */*~ fixhtml fixbin fixetc fixshare

distclean:

../../../doc/html/search/SearchEngine.html: ../../../doc/html/search/SearchEngine-head.html ../../../doc/html/search/SearchEngine-foot.html ../../../doc/KEYWORDS.db
(cd ../../../doc; \
$(R_HOME)/doc/html/search/SearchEngine.html: $(R_HOME)/doc/html/search/SearchEngine-head.html $(R_HOME)/doc/html/search/SearchEngine-foot.html $(R_HOME)/doc/KEYWORDS.db
(cd $(R_HOME)/doc; \
cat html/search/SearchEngine-head.html > html/search/SearchEngine.html; \
perl ../tools/keywords2html.pl KEYWORDS.db >> html/search/SearchEngine.html; \
cat html/search/SearchEngine-foot.html >> html/search/SearchEngine.html)
11 changes: 6 additions & 5 deletions src/gnuwin32/help/Makefile
Expand Up @@ -6,32 +6,33 @@ CP=cp
RM=rm
MKDIR=mkdir

R_HOME = ../../..
RHOME=$(shell perl ../pwd.pl ../../..)
PKGDIR=../../library
RLIB=$(RHOME)/library

indices:
@PERL5LIB=$(RHOME)/share/perl $(PERL) \
../../../share/perl/build-help-windows.pl ${DOS} -htmllists
$(R_HOME)/share/perl/build-help-windows.pl ${DOS} -htmllists

pkg-% help-%:
@if test -d $(PKGDIR)/$*/man ; then \
PERL5LIB=$(RHOME)/share/perl $(PERL) \
../../../share/perl/build-help-windows.pl ${DOS} \
$(R_HOME)/share/perl/build-help-windows.pl ${DOS} \
-txt -html -example -latex $(PKGDIR)/$* $(RLIB) '$(DPKG)' $* ; \
fi

pkgfake-%:
@if test -d $(PKGDIR)/$*/man ; then \
PERL5LIB=$(RHOME)/share/perl $(PERL) \
../../../share/perl/build-help-windows.pl ${DOS} \
$(R_HOME)/share/perl/build-help-windows.pl ${DOS} \
-latex $(PKGDIR)/$* $(RLIB) '$(DPKG)' $* ; \
fi

chm-%:
@if test -d $(PKGDIR)/$*/man ; then \
PERL5LIB=$(RHOME)/share/perl $(PERL) \
../../../share/perl/build-help-windows.pl ${DOS} \
$(R_HOME)/share/perl/build-help-windows.pl ${DOS} \
-chm $(PKGDIR)/$* $(RLIB) '$(DPKG)' $* ; \
$(MAKE) --no-print-directory -C $(PKGDIR)/$*/chm \
-f $(RHOME)/src/gnuwin32/help/Makefile $*.chm ; \
Expand All @@ -52,7 +53,7 @@ latex-%:
@$(MAKE) --no-print-directory -C $(RLIB)/$* \
-f $(RHOME)/src/gnuwin32/help/Makefile PKG=$* unzipit
PERL5LIB=$(RHOME)/share/perl $(PERL) \
../../../share/perl/build-help-windows.pl ${DOS} \
$(R_HOME)/share/perl/build-help-windows.pl ${DOS} \
-latex $(PKGDIR)/$* $(RLIB)

clean:
Expand Down
9 changes: 5 additions & 4 deletions src/gnuwin32/installer/Makefile
@@ -1,9 +1,9 @@
# Makefile for R for Windows Installers

include ../MkRules
include ../../../share/make/vars.mk

R_HOME = ../../..
include $(R_HOME)/share/make/vars.mk

RPREFIX = $(shell perl ../fixed/rwver.pl $(R_HOME)/VERSION)
LIBFILES = $(foreach i, $(R_PKGS_BASE) $(R_PKGS_RECOMMENDED), $(R_HOME)/library/$i) $(R_HOME)/library/R.css

Expand All @@ -28,7 +28,7 @@ imagedir:
$(MKDIR) -p $(RPREFIX)/library
$(CP) -pr $(LIBFILES) $(RPREFIX)/library
# morley.tab is needed for R-intro Appendix A
$(CP) -p ../../library/base/data/morley.tab $(RPREFIX)/library/base/data
$(CP) -p $(R_HOME)/src/library/base/data/morley.tab $(RPREFIX)/library/base/data
$(RM) $(RPREFIX)/*/Makefile.in
$(MKDIR) -p $(RPREFIX)/etc
$(CP) -p $(foreach i,$(ETC_FILES),$(R_HOME)/etc/$i) $(RPREFIX)/etc
Expand All @@ -37,7 +37,9 @@ imagedir:
$(CP) -pr $(R_HOME)/doc/html $(RPREFIX)/doc
$(CP) -p $(R_HOME)/doc/manual/*.html $(R_HOME)/doc/manual/*.pdf \
$(RPREFIX)/doc/manual
# html copies of these are in doc/html, and we don't have PDFs on menus
$(RM) $(RPREFIX)/doc/manual/R-FAQ.html $(RPREFIX)/doc/manual/R-FAQ.pdf
$(RM) $(RPREFIX)/doc/manual/R-admin.html $(RPREFIX)/doc/manual/R-admin.pdf
#
$(CP) -p $(foreach i,$(INFO_FILES),$(R_HOME)/$i) $(RPREFIX)
$(CP) -p $(foreach i,$(GW_INFO_FILES),../$i) $(RPREFIX)
Expand Down Expand Up @@ -68,7 +70,6 @@ endif
(cd ..; $(MAKE) --no-print-directory -C installer/$(RPREFIX)/src/gnuwin32/help clean)
$(CP) -pr $(R_HOME)/include $(R_HOME)/lib $(RPREFIX)
$(CP) -pr $(foreach i,$(SHARE_DIRS),$(R_HOME)/share/$i) $(RPREFIX)/share
$(CP) -p ../graphapp/graphapp.h ../graphapp/ga.h $(RPREFIX)/include
(cd ..; $(MAKE) --no-print-directory PKGDIR=. pkgclean-windlgs)
$(CP) -pr ../windlgs $(RPREFIX)/src/library
#
Expand Down
1 change: 0 additions & 1 deletion src/gnuwin32/windlgs/src/Makevars

This file was deleted.

25 changes: 17 additions & 8 deletions src/include/Makefile.win
Expand Up @@ -5,30 +5,39 @@ R_HOME=../..
## keep these in step with ./Makefile.in
SRC_HEADERS = R.h S.h Rdefines.h Rdevices.h Rgraphics.h Rinternals.h
OBJ_HEADERS = Rconfig.h Rmath.h Rversion.h
GW32_HEADERS = config.h psignal.h

all: fixh
@echo 'installing C headers'
@mkdir -p $(R_HOME)/include/R_ext
@cp -p $(SRC_HEADERS) $(OBJ_HEADERS) $(R_HOME)/include
@cp -p R_ext/*.h $(R_HOME)/include/R_ext
@cp -p ../gnuwin32/graphapp/graphapp.h ../gnuwin32/graphapp/ga.h \
$(R_HOME)/include

version: Rversion.h

fixh: $(OBJ_HEADERS)
fixh: $(GW32_HEADERS) $(OBJ_HEADERS)
@$(ECHO) done > fixh

config.h: ../gnuwin32/fixed/h/config.h
@cp $< $@

psignal.h: ../gnuwin32/fixed/h/psignal.h
@cp $< $@

Rconfig.h: config.h $(R_HOME)/tools/GETCONFIG
$(SED) -e 1d $(R_HOME)/tools/GETCONFIG > GC
sh GC > Rconfig.h
$(RM) GC
@$(SED) -e 1d $(R_HOME)/tools/GETCONFIG > GC
@sh GC > Rconfig.h
@$(RM) GC

Rversion.h: $(R_HOME)/date-stamp $(R_HOME)/VERSION
$(SED) -e 1d $(R_HOME)/tools/GETVERSION > $(R_HOME)/tools/GV
sh $(R_HOME)/tools/GV > $@
$(RM) $(R_HOME)/tools/GV
@$(SED) -e 1d $(R_HOME)/tools/GETVERSION > $(R_HOME)/tools/GV
@sh $(R_HOME)/tools/GV > $@
@$(RM) $(R_HOME)/tools/GV

Rmath.h0: Rmath.h0.in $(R_HOME)/VERSION
$(SED) -e 's/@RMATH_HAVE_LOG1P@/# define HAVE_LOG1P 1/' \
@$(SED) -e 's/@RMATH_HAVE_LOG1P@/# define HAVE_LOG1P 1/' \
-e /@RMATH_HAVE_EXPM1@/d \
-e 's/@RMATH_HAVE_WORKING_LOG1P@/# define HAVE_WORKING_LOG1P 1/' \
-e "s/@PACKAGE_VERSION@/`sed 's/\([^ ]*\).*/\1/' < $(R_HOME)/VERSION`/" $< > Rmath.h0
Expand Down
6 changes: 4 additions & 2 deletions src/library/base/R/rank.R
@@ -1,9 +1,11 @@
rank <- function(x, na.last = TRUE, ties.method=c("average", "first", "random"))
rank <- function(x, na.last = TRUE,
ties.method=c("average", "first", "random", "max", "min"))
{
nas <- is.na(x)
ties.method <- match.arg(ties.method)
y <- switch(ties.method,
"average" = .Internal(rank( x[!nas])),
"average"= , "min"= , "max" =
.Internal(rank( x[!nas], ties.method)),
"first" = sort.list(sort.list(x[!nas])),
"random" = sort.list(order( x[!nas], runif(sum(!nas)))))
if(!is.na(na.last) && any(nas)) {
Expand Down
13 changes: 11 additions & 2 deletions src/library/base/man/rank.Rd
Expand Up @@ -6,7 +6,8 @@
Ties, i.e., equal values, result in ranks being averaged, by default.
}
\usage{
rank(x, na.last = TRUE, ties.method = c("average", "first", "random"))
rank(x, na.last = TRUE,
ties.method = c("average", "first", "random", "max", "min"))
}
\arguments{
\item{x}{a numeric vector.}
Expand All @@ -30,7 +31,10 @@ rank(x, na.last = TRUE, ties.method = c("average", "first", "random"))
the result at the corresponding indices. The \code{"first"} method
results in a permutation with increasing values at each index set of
ties. The \code{"random"} method puts these in random order whereas the
default, \code{"average"}, replaces them by their mean.
default, \code{"average"}, replaces them by their mean, and
\code{"max"} and \code{"min"} replaces them by their maximum and
minimum respectively, the latter being the typical \dQuote{sports}
ranking.
}
\seealso{\code{\link{order}} and \code{\link{sort}}.}
\examples{
Expand All @@ -46,5 +50,10 @@ stopifnot(rank(r1) == r1, rank(r2) == r2)
rank(x2, ties.method= "first") # first occurrence wins
rank(x2, ties.method= "random") # ties broken at random
rank(x2, ties.method= "random") # and again

## keep ties ties, no average
(rma <- rank(x2, ties.method= "max")) # as used classically
(rmi <- rank(x2, ties.method= "min")) # as in Sports
stopifnot(rma + rmi == round(r2 + r2))
}
\keyword{univar}

0 comments on commit 3b28265

Please sign in to comment.