Commit b29d1339 authored by Dirk Eddelbuettel's avatar Dirk Eddelbuettel

Import Upstream version 3.3.1

parent 99ac4ba5
Revision: 70573
Last Changed Date: 2016-05-03
Revision: 70800
Last Changed Date: 2016-06-21
Supposedly Educational
Bug in Your Hair
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for R 3.3.0.
# Generated by GNU Autoconf 2.69 for R 3.3.1.
#
# Report bugs to <https://bugs.r-project.org>.
#
......@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='R'
PACKAGE_TARNAME='R'
PACKAGE_VERSION='3.3.0'
PACKAGE_STRING='R 3.3.0'
PACKAGE_VERSION='3.3.1'
PACKAGE_STRING='R 3.3.1'
PACKAGE_BUGREPORT='https://bugs.r-project.org'
PACKAGE_URL='https://www.r-project.org'
......@@ -1663,7 +1663,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures R 3.3.0 to adapt to many kinds of systems.
\`configure' configures R 3.3.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1738,7 +1738,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of R 3.3.0:";;
short | recursive ) echo "Configuration of R 3.3.1:";;
esac
cat <<\_ACEOF
......@@ -1989,7 +1989,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
R configure 3.3.0
R configure 3.3.1
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -3141,7 +3141,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by R $as_me 3.3.0, which was
It was created by R $as_me 3.3.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -46481,7 +46481,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by R $as_me 3.3.0, which was
This file was extended by R $as_me 3.3.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -46548,7 +46548,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
R config.status 3.3.0
R config.status 3.3.1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......@@ -373,9 +373,9 @@ details.
----------------------------------
The 'bin/macosx' directory of a CRAN site contains a standard Apple
installer package to run on OS X 10.6 ('Snow Leopard') and later. Once
installer package to run on OS X 10.9 ('Mavericks') and later. Once
downloaded and executed, the installer will install the current release
of R and an R.app OS X GUI. This port of R for OS X is maintained by
of R and R.app, the OS X GUI. This port of R for OS X is maintained by
Simon Urbanek <Simon.Urbanek@R-project.org> (and previously by Stefano
Iacus). The "R for Mac OS X FAQ
(https://CRAN.R-project.org/bin/macosx/RMacOSX-FAQ.html) has more
......
R News
CHANGES IN R 3.3.1:
BUG FIXES:
* R CMD INSTALL and hence install.packages() gave an internal error
installing a package called description from a tarball on a
case-insensitive file system.
* match(x, t) (and hence x %in% t) failed when x was of length one,
and either character and x and t only differed in their Encoding
or when x and t where complex with NAs or NaNs. (PR#16885.)
* unloadNamespace(ns) also works again when ns is a 'namespace', as
from getNamespace().
* rgamma(1,Inf) or rgamma(1, 0,0) no longer give NaN but the
correct limit.
* length(baseenv()) is correct now.
* pretty(d, ..) for date-time d rarely failed when "halfmonth" time
steps were tried (PR#16923) and on 'inaccurate' platforms such as
32-bit windows or a configuration with --disable-long-double; see
comment #15 of PR#16761.
* In text.default(x, y, labels), the rarely(?) used default for
labels is now correct also for the case of a 2-column matrix x
and missing y.
* as.factor(c(a = 1L)) preserves names() again as in R < 3.1.0.
* strtrim(""[0], 0[0]) now works.
* Use of Ctrl-C to terminate a reverse incremental search started
by Ctrl-R in the readline-based Unix terminal interface is now
supported for readline >= 6.3 (Ctrl-G always worked). (PR#16603)
* diff(<difftime>) now keeps the "units" attribute, as subtraction
already did, PR#16940.
CHANGES IN R 3.3.0:
SIGNIFICANT USER-VISIBLE CHANGES:
......
......@@ -5,6 +5,53 @@
\title{R News}
\encoding{UTF-8}
\section{\Rlogo CHANGES IN R 3.3.1}{
\subsection{BUG FIXES}{
\itemize{
\item \command{R CMD INSTALL} and hence \code{install.packages()}
gave an internal error installing a package called
\pkg{description} from a tarball on a case-insensitive file system.
\item \code{match(x, t)} (and hence \code{x \%in\% t}) failed
when \code{x} was of length one, and either \code{character} and \code{x}
and \code{t} only differed in their \code{Encoding} or when
\code{x} and \code{t} where \code{complex} with \code{NA}s or \code{NaN}s.
(\PR{16885}.)
\item \code{unloadNamespace(ns)} also works again when \code{ns} is a
\sQuote{namespace}, as from \code{getNamespace()}.
\item \code{rgamma(1,Inf)} or \code{rgamma(1, 0,0)} no longer give
\code{NaN} but the correct limit.
\item \code{length(baseenv())} is correct now.
\item \code{pretty(d, ..)} for date-time \code{d} rarely failed
when \code{"halfmonth"} time steps were tried (\PR{16923}) and
on \sQuote{inaccurate} platforms such as 32-bit windows or
a configuration with \command{--disable-long-double}; see comment
#15 of \PR{16761}.
\item In \code{text.default(x, y, labels)}, the rarely(?) used
default for \code{labels} is now correct also for the case of a
2-column matrix \code{x} and missing \code{y}.
\item \code{as.factor(c(a = 1L))} preserves \code{names()} again
as in \R < 3.1.0.
\item \code{strtrim(""[0], 0[0])} now works.
\item Use of \code{Ctrl-C} to terminate a reverse incremental
search started by \code{Ctrl-R} in the \code{readline}-based Unix
terminal interface is now supported for \code{readline} >= 6.3
(\code{Ctrl-G} always worked). (\PR{16603})
\item \code{diff(<difftime>)} now keeps the \code{"units"}
attribute, as subtraction already did, \PR{16940}.
}
}
}
\section{\Rlogo CHANGES IN R 3.3.0}{
\subsection{SIGNIFICANT USER-VISIBLE CHANGES}{
\itemize{
......@@ -324,7 +371,7 @@
\item \code{gzcon()} gains a new option \code{text}, which marks
the connection as text-oriented (so e.g.\sspace{}\code{pushBack()}
works). It is still always opened in binary mode.
\item The \code{import()} namespace directive now accepts an
argument \code{except} which names symbols to exclude from the
imports. The \code{except} expression should evaluate to a
......@@ -576,7 +623,7 @@
\item \code{install.packages()} could give false errors when
\code{options("pkgType")} was \code{"binary"}. (Reported by
Jose Claudio Faria.)
\item A bug fix in \R 3.0.2 fixed problems with \code{locator()}
in X11, but introduced problems in Windows. Now both should be
fixed. (\PR{15700})
......@@ -584,7 +631,7 @@
\item \code{download.file()} with \code{method = "wininet"}
incorrectly warned of download file length difference when
reported length was unknown. (\PR{16805})
\item \code{diag(NULL, 1)} crashed because of missed type
checking. (\PR{16853})
}
......
No preview for this file type
......@@ -7,6 +7,70 @@
<h2>R News</h2>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.3.1</h3>
<h4>BUG FIXES</h4>
<ul>
<li> <p><code>R CMD INSTALL</code> and hence <code>install.packages()</code>
gave an internal error installing a package called
<span class="pkg">description</span> from a tarball on a case-insensitive file system.
</p>
</li>
<li> <p><code>match(x, t)</code> (and hence <code>x %in% t</code>) failed
when <code>x</code> was of length one, and either <code>character</code> and <code>x</code>
and <code>t</code> only differed in their <code>Encoding</code> or when
<code>x</code> and <code>t</code> where <code>complex</code> with <code>NA</code>s or <code>NaN</code>s.
(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16885">PR#16885</a>.)
</p>
</li>
<li> <p><code>unloadNamespace(ns)</code> also works again when <code>ns</code> is a
&lsquo;namespace&rsquo;, as from <code>getNamespace()</code>.
</p>
</li>
<li> <p><code>rgamma(1,Inf)</code> or <code>rgamma(1, 0,0)</code> no longer give
<code>NaN</code> but the correct limit.
</p>
</li>
<li> <p><code>length(baseenv())</code> is correct now.
</p>
</li>
<li> <p><code>pretty(d, ..)</code> for date-time <code>d</code> rarely failed
when <code>"halfmonth"</code> time steps were tried (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16923">PR#16923</a>) and
on &lsquo;inaccurate&rsquo; platforms such as 32-bit windows or
a configuration with <code>--disable-long-double</code>; see comment
#15 of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16761">PR#16761</a>.
</p>
</li>
<li><p> In <code>text.default(x, y, labels)</code>, the rarely(?) used
default for <code>labels</code> is now correct also for the case of a
2-column matrix <code>x</code> and missing <code>y</code>.
</p>
</li>
<li> <p><code>as.factor(c(a = 1L))</code> preserves <code>names()</code> again
as in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> &lt; 3.1.0.
</p>
</li>
<li> <p><code>strtrim(""[0], 0[0])</code> now works.
</p>
</li>
<li><p> Use of <code>Ctrl-C</code> to terminate a reverse incremental
search started by <code>Ctrl-R</code> in the <code>readline</code>-based Unix
terminal interface is now supported for <code>readline</code> &gt;= 6.3
(<code>Ctrl-G</code> always worked). (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16603">PR#16603</a>)
</p>
</li>
<li> <p><code>diff(&lt;difftime&gt;)</code> now keeps the <code>"units"</code>
attribute, as subtraction already did, <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16940">PR#16940</a>.
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.3.0</h3>
......
This diff is collapsed.
......@@ -473,9 +473,9 @@ See the @url{https://CRAN.R-project.org/bin/windows/base/@/rw-FAQ.html,
@subsection How can R be installed (Mac)
The @file{bin/macosx} directory of a @CRAN{} site contains a standard
Apple installer package to run on OS X 10.6 (`Snow Leopard') and later.
Apple installer package to run on OS X 10.9 (`Mavericks') and later.
Once downloaded and executed, the installer will install the current
release of R and an R.app OS X @acronym{GUI}. This port of R for OS X
release of R and R.app, the OS X @acronym{GUI}. This port of R for OS X
is maintained by @email{Simon.Urbanek@@R-project.org, Simon Urbanek}
(and previously by Stefano Iacus). The
@url{https://CRAN.R-project.org/bin/macosx/RMacOSX-FAQ.html, ``R for Mac
......
......@@ -1075,7 +1075,9 @@ from @acronym{CRAN} to run on 32- or 64-bit Windows (XP or later) on
@cputype{ix86} and @cputype{x86_64} @acronym{CPU}s.
Your file system must allow long file names (as is likely except
perhaps for some network-mounted systems).
perhaps for some network-mounted systems). If it doesn't also support
conversion to short name equivalents (a.k.a. DOS 8.3 names), then R
@emph{must} be installed in a path that does not contain spaces.
Installation is @emph{via} the installer
@file{@value{RWVERSION}-win.exe}. Just double-click on the icon and
......@@ -2153,8 +2155,8 @@ using the @command{make} variables @code{BINPREF} (and in some cases
@code{BINPREF64}). The library location is set using @command{make}
variable @code{LOCAL_SOFT}, to give an equivalent of @file{/usr/local}
on a Unix-alike. All of these can be set in
@file{src/gnuwin/MkRules.local} when @R{} is built from sources (see
the comments in @file{src/gnuwin/MkRules.dist}), or in
@file{src/gnuwin32/MkRules.local} when @R{} is built from sources (see
the comments in @file{src/gnuwin32/MkRules.dist}), or in
file@footnote{or by adding it in a file such as
@file{etc/i386/Makevars.site}, which does not exist by default.}
@file{etc/i386/Makeconf} or @file{etc/x64/Makeconf} for an installed
......@@ -3144,9 +3146,10 @@ really do not want these you will need to explicitly configure @R{}
without X11, using @option{--with-x=no}.
The command-line editing (and command completion) depends on the
@acronym{GNU} @code{readline} library: version 4.2 or later is needed
for all the features to be enabled. Otherwise you will need to
configure with @option{--with-readline=no} (or equivalent).
@acronym{GNU} @code{readline} library (including its headers): version
4.2 or later is needed for all the features to be enabled. Otherwise
you will need to configure with @option{--with-readline=no} (or
equivalent).
A suitably comprehensive @code{iconv} function is essential. The @R{}
usage requires @code{iconv} to be able to translate between
......@@ -4725,12 +4728,13 @@ offer the installation of the command-line tools. If you have installed
Xcode, this provides the command-line tools. The tools will need to be
reinstalled when OS X is upgraded, as upgrading partially removes them.)
You need @code{readline} (or to configure using
@option{--without-readline}), and a Fortran compiler. Those and other
binary components are available from
@uref{https://r.research.att.com/libs}: you are likely to need
@code{pcre} and @code{xz} (recent OS X provides libs but not headers for
these).
You need @code{readline}@footnote{Apple provides a partial emulation of
GNU readline 4.2 based on the NetBSD @code{editline} library. That is
not recommended but for the time being @R{}'s installation scripts will
make use of it.} and a Fortran compiler. Those and other binary
components are available from @uref{https://r.research.att.com/libs}:
you are likely to need @code{pcre} and @code{xz} (recent OS X provides
libraries but not headers for these).
An X sub-system is required unless configuring using
@option{--without-x}: see @uref{https://xquartz.macosforge.org/}.
......
......@@ -7536,9 +7536,12 @@ Windows versions of @R{} have somewhat simpler command-line editing: see
file @file{README.Rterm} for command-line editing under
@code{Rterm.exe}.
When using @R{} with @strong{readline} capabilities, the functions
described below are available, as well as others (probably) documented
in @command{man readline} or @command{info readline} on your system.
When using @R{} with GNU@footnote{It is possible to build @R{} using an
emulation of GNU @strong{readline}, such as one based on NetBSD's
@strong{editline}, it which case only a subset of the capabilities may
be provided.} @strong{readline} capabilities, the functions described
below are available, as well as others (probably) documented in
@command{man readline} or @command{info readline} on your system.
Many of these use either Control or Meta characters. Control
characters, such as @kbd{Control-m}, are obtained by holding the
......@@ -7554,6 +7557,10 @@ type @key{ESC}@key{b}. The @kbd{ESC} character sequences are also
allowed on terminals with real Meta keys. Note that case is significant
for Meta characters.
Some but not all versions@footnote{In particular, not versions 6.3 or
later: this is worked around as from @R{} 3.4.0.} of @strong{readline}
will recognize resizing of the terminal window so this is best avoided.
@appendixsection Editing actions
The @R{} program keeps a history of the command lines you type,
......@@ -7583,7 +7590,8 @@ Go to the previous command (backwards in the history).
@item C-n
Go to the next command (forwards in the history).
@item C-r @var{text}
Find the last command with the @var{text} string in it.
Find the last command with the @var{text} string in it. This can be
cancelled by @code{C-g} (and on some versions of @R{} by @code{C-c}).
@end table
On most terminals, you can also use the up and down arrow keys instead
......
......@@ -611,7 +611,7 @@ which is traversed once the search reaches the global environment.
@cindex namespace
Namespaces are environments associated with packages (and once again
the base package is special and will be considered separately). A
package @code{@var{pkg}} with a namespace defines two environments
package @code{@var{pkg}} defines two environments
@code{namespace:@var{pkg}} and @code{package:@var{pkg}}: it is
@code{package:@var{pkg}} that can be @code{attach}ed and form part of
the search path.
......@@ -1428,20 +1428,20 @@ objects without needing to know their internal `metaname' (although
@node S4 methods, Mechanics of S4 dispatch, S4 classes, S4 objects
@subsection S4 methods
Details of methods are stored in S4 objects of class
@code{"MethodsList"}. They have a non-syntactic name of the form
@code{.__M__@var{generic}:@var{package}} for all methods defined in the
current environment for the named generic derived from a specific
package (which might be @code{.GlobalEnv}).
Details of the methods are stored in environments (typically hidden in the
respective namespace) with a non-syntactic name of the form
@code{.__T__@var{generic}:@var{package}} containing objects of class
@code{MethodDefinition} for all methods defined in the current environment
for the named generic derived from a specific package (which might be @code{.GlobalEnv}).
This is sometimes referred to as a `methods table'.
There is also environment @code{.__T__@var{generic}:@var{package}} which
has names the signatures of the methods defined, and values the
corresponding method functions. This is often referred to as a `methods
table'.
When a package without a namespace is attached these objects become
visible on the search path. @code{library} calls
@code{methods:::cacheMetaData} to update the internal tables.
For example,
@example
length(nM <- asNamespace("Matrix") ) # 941 for Matrix 1.2-6
length(meth <- grep("^[.]__T__", names(nM), value=TRUE))# 107 generics with methods
length(meth.Ops <- nM$`.__T__Ops:base`) # 71 methods for the 'Ops' (group)generic
head(sort(names(meth.Ops))) ## "abIndex#abIndex" ... "ANY#ddiMatrix" "ANY#ldiMatrix" "ANY#Matrix"
@end example
During an @R{} session there is an environment associated with each
non-primitive generic containing objects @code{.AllMTable},
......@@ -1456,8 +1456,8 @@ directive @code{exportMethods} will export all the methods defined in
the namespace for a specified generic: the code also adds to the list
of generics any that are exported directly. For generics which are
listed via @code{exportMethods} or exported themselves, the
corresponding @code{"MethodsList"} and environment are exported and so
will appear (as hidden objects) in the package environment.
corresponding environment is exported and so
will appear (as hidden object) in the package environment.
Methods for primitives which are internally S4 generic (see below) are
always exported, whether mentioned in the @file{NAMESPACE} file or not.
......@@ -1471,7 +1471,7 @@ methods defined on generics in other packages. Since methods for a
generic could be imported from several different packages, the methods
tables are merged.
When a package with a namespace is attached
When a package is attached
@code{methods:::cacheMetaData} is called to update the internal tables:
only the visible methods will be cached.
......@@ -1495,7 +1495,7 @@ space there will be two functions called @code{myfn} on the search
paths, and which will be called depends on which search path is in use.
This is starkest for functions in the base namespace, where the
original will be found ahead of the newly created function from any
other package with a namespace.
other package.
Primitive functions are treated quite differently, for efficiency
reasons: this results in different semantics. @code{setGeneric} is
......
......@@ -238,6 +238,84 @@
@Article{beath:,
author = {Dr Ken J. Beath},
title = {metaplus: An R Package for the Analysis of Robust Meta-Analysis and Meta-Regression},
journal = {The R Journal},
year = ,
volume = ,
number = ,
pages = {},
month = ,
url = {http://journal.r-project.org/archive/-/beath.pdf}
@Article{leeper:,
author = {Thomas J. Leeper},
title = {Crowdsourced Data Preprocessing with R and Amazon Mechanical Turk},
journal = {The R Journal},
year = ,
volume = ,
number = ,
pages = {},
month = ,
url = {http://journal.r-project.org/archive/-/leeper.pdf}
@Article{na-pebesma-heuvelink:,
author = {Benedikt Gräler and Edzer Pebesma and Gerard Heuvelink},
title = {Spatio-Temporal Geostatistics using gstat},
journal = {The R Journal},
year = ,
volume = ,
number = ,
pages = {},
month = ,
url = {http://journal.r-project.org/archive/-/na-pebesma-heuvelink.pdf}
@Article{keyes-rudis-jacobs:,
author = {Oliver Keyes and Bob Rudis and Jay Jacobs},
title = {R Packages to Aid in Handling Web Access Logs},
journal = {The R Journal},
year = ,
volume = ,
number = ,
pages = {},
month = ,
url = {http://journal.r-project.org/archive/-/keyes-rudis-jacobs.pdf}
@Article{yozgatligil-dag:,
author = {Osman Dag and Ceylan Yozgatligil},
title = {GMDH: An R Package for Short Term Forecasting via GMDH - Type Neural Network Algorithms},
journal = {The R Journal},
year = ,
volume = ,
number = ,
pages = {},
month = ,
url = {http://journal.r-project.org/archive/-/yozgatligil-dag.pdf}
@Article{scrucca-fop-murphy-etal:,
author = {Luca Scrucca and Michael Fop and T. Brendan Murphy and Adrian E. Raftery},
title = {mclust 5: Clustering, Classification and Density Estimation Using Gaussian Finite Mixture Models},
journal = {The R Journal},
year = ,
volume = ,
number = ,
pages = {},
month = ,
url = {http://journal.r-project.org/archive/-/scrucca-fop-murphy-etal.pdf}
@Article{RJournal:2009-1:Chambers,
author = {John M. Chambers},
title = {Facets of {R}},
......
......@@ -38,16 +38,11 @@
<div class="download">
<p><a href="@RWVER@-win.exe">Download R-Devel build for Windows</a> <span>(62 megabytes, 32/64 bit)</span></p>
<ul>
<li>This build of R-Devel uses the gcc 4.9.3 toolchain produced
by Jeroen Ooms. For details, see <a href="https://github.com/rwinlib/r-base">the Github page</a>.</li>
<li><a href="../../windows/base/README.@RWVER@">Installation and other instructions</a></li>
<li><a href="NEWS.@RWVER@.html">New features in this version</a></li>
</ul>
<p><a href="@RWVER@-493-win.exe">Experimental R-Devel build for Windows</a> </p>
<ul>
<li>This is a build of R-Devel, using a new gcc 4.9.3 toolchain produced
by Jeroen Ooms. For details, see <a href="https://github.com/rwinlib/r-base">the Github page</a>.
It is not compatible with binary packages on CRAN that include C++ code, so it defaults
to source installs of packages.
</ul>
</div>
......
......@@ -25,7 +25,7 @@
#endif
#ifndef NO_C_HEADERS
// same as Rmath.h: needed for cospi etc
/* same as Rmath.h: needed for cospi etc */
# ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
# endif
......
nlme_3.1-127.tar.gz
\ No newline at end of file
nlme_3.1-128.tar.gz
\ No newline at end of file
survival_2.39-2.tar.gz
\ No newline at end of file
survival_2.39-4.tar.gz
\ No newline at end of file
......@@ -543,6 +543,11 @@ print.difftime <- function(x, digits = getOption("digits"), ...)
val
}
diff.difftime <- function(x, ...)
## assume class is preserved (it is in diff.default):
structure(NextMethod("diff"), units = attr(x, "units"))
Ops.difftime <- function(e1, e2)
{
coerceTimeUnit <- function(x)
......
# File src/library/base/R/factor.R
# Part of the R package, https://www.R-project.org
#
# Copyright (C) 1995-2015 The R Core Team
# Copyright (C) 1995-2016 The R Core Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -56,6 +56,7 @@ as.factor <- function(x) {
levels <- sort(unique.default(x)) # avoid array methods
f <- match(x, levels)
levels(f) <- as.character(levels)
if(!is.null(nx <- names(x))) names(f) <- nx
class(f) <- "factor"
f
} else factor(x)
......
# File src/library/base/R/format.R
# Part of the R package, https://www.R-project.org
#
# Copyright (C) 1995-2015 The R Core Team
# Copyright (C) 1995-2016 The R Core Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -358,11 +358,10 @@ prettyNum <-
stop("'input.d.mark' has no characters")
x.sp <- strsplit(x, input.d.mark, fixed=TRUE)
## can have "1.005.987" here, if all *.mark == "."
if(any((lx.sp <- lengths(x.sp)) > 2)) { # partly more than two parts
if(any(lengths(x.sp) > 2)) { # partly more than two parts
x.sp <- lapply(x.sp, function(xs) {
lx <- length(xs)
if(lx <= 2) xs else c(paste(xs[1:(lx-1)], collapse=input.d.mark),
xs[lx])
if(lx <= 2) xs else c(paste(xs[-lx], collapse=input.d.mark), xs[lx])
})
}
B. <- vapply(x.sp, `[`, "", 1L) # Before input.d.mark (".")
......
......@@ -702,7 +702,9 @@ topenv <- function(envir = parent.frame(),
unloadNamespace <- function(ns)
{
if (any(ns == loadedNamespaces())) { # not to load & unload
## check, so we do not load & unload:
if ((is.character(ns) && any(ns == loadedNamespaces())) ||
(is.environment(ns) && any(getNamespaceName(ns) == loadedNamespaces()))) {
## only used to run .onUnload
runHook <- function(hookname, env, ...) {
if (!is.null(fun <- env[[hookname]])) {
......
......@@ -74,7 +74,10 @@ system2 <- function(command, args = character(),
if(is.null(stdout)) stdout <- FALSE
if(is.null(stderr)) stderr <- FALSE