Codebase list gtools / b8a9feb
Import Upstream version 3.4.2 Dirk Eddelbuettel 5 years ago
13 changed file(s) with 254 addition(s) and 18 deletion(s). Raw diff Collapse all Expand all
0 2015-04-09 warnes
1
2 * [r1920] DESCRIPTION, NAMESPACE, R/loadedPackages.R,
3 R/na.replace.R, inst/ChangeLog, inst/NEWS, man/loadedPackages.Rd,
4 man/na.replace.Rd: Move first()/last()/left()/right() to gdata.
5 Add new functions na.replace() and loadedPackages().
6 Add more text to package description.
7
8 2015-04-08 warnes
9
10 * [r1919] NAMESPACE, R/first.R, man/first.Rd, man/left.Rd: Move
11 first/last/left/right to from gtools to gdata
12
13 2015-04-06 warnes
14
15 * [r1918] man/dirichlet.Rd: Correct URL
16 * [r1917] inst/ChangeLog, inst/NEWS: Update NEWS and ChangeLog for
17 gtools 3.5.0
18 * [r1916] inst/ChangeLog: Add ChangeLog files to repository
19 * [r1915] R/keywords.R: Implement fix to keywords() needed for
20 R-3.4.1, as suggested by Kurt
21 Hornik.
22 * [r1914] NAMESPACE, R/first.R: - Export S3 methods for first(),
23 last(), left() and right().
24 - Ensure code matches man page for first(), last(), left(), and
25 right().
26
27 2014-10-09 warnes
28
29 * [r1897] DESCRIPTION, inst/NEWS: Update for 3.5.0 release of
30 gtools
31 * [r1896] R/first.R: Make right() and left() S3 methods for classes
32 data.frame and matrix
33
34 2014-08-27 warnes
35
36 * [r1872] man/first.Rd: Fix man page
37 * [r1871] DESCRIPTION, NAMESPACE, R/first.R, man/first.Rd,
38 man/left.Rd: Finish adding first(), last(), left(), and right().
39 * [r1870] R/first.R: Add functions first(), last(), left(), and
40 right().
41
042 2014-05-28 warnes
143
44 * [r1816] DESCRIPTION, inst/NEWS: Update for gtools 3.4.1
245 * [r1815] tests/smartbind_Dates.R: Add test to ensure smartbind()
346 properly handles Date columns.
447 * [r1814] R/smartbind.R: smartbind: Convert non-native type columns
00 Package: gtools
1 Title: Various R programming tools
2 Description: Various R programming tools
3 Version: 3.4.1
4 Date: 2014-05-27
1 Title: Various R Programming Tools
2 Description: Functions to assist in R programming, including:
3 - assist in developing, updating, and maintaining R and R packages ('ask', 'checkRVersion',
4 'getDependencies', 'keywords', 'scat'),
5 - calculate the logit and inverse logit transformations ('logit', 'inv.logit'),
6 - test if a value is missing, empty or contains only NA and NULL values ('invalid'),
7 - manipulate R's .Last function ('addLast'),
8 - define macros ('defmacro'),
9 - detect odd and even integers ('odd', 'even'),
10 - convert strings containing non-ASCII characters (like single quotes) to plain ASCII ('ASCIIfy'),
11 - perform a binary search ('binseach'),
12 - sort strings containing both numeric and character components ('mixedsort'),
13 - create a factor variable from the quantiles of a continuous variable ('quantcut'),
14 - enumerate permutations and combinations ('combinations', 'permutation'),
15 - calculate and convert between fold-change and log-ratio ('foldchange',
16 'logratio2foldchange', 'foldchange2logratio'),
17 - calculate probabilities and generate random numbers from Dirichlet distributions
18 ('rdirichlet', 'ddirichlet'),
19 - apply a function over adjacent subsets of a vector ('running'),
20 - Modify the TCP\_NODELAY ('de-Nagle') flag for socket objects,
21 - Efficient 'rbind' of data frames, even if the column names don't match ('smartbind'),
22 - Generate significance stars from p-values ('stars.pval').
23 Version: 3.4.2
24 Date: 2015-04-06
525 Author: Gregory R. Warnes, Ben Bolker, and Thomas Lumley
626 Maintainer: Gregory R. Warnes <greg@warnes.net>
727 License: LGPL-2.1
8 Packaged: 2014-05-28 00:24:58 UTC; warnes
28 Packaged: 2015-04-10 12:37:28 UTC; gwarnes1
929 NeedsCompilation: yes
1030 Repository: CRAN
11 Date/Publication: 2014-05-28 09:52:04
31 Date/Publication: 2015-04-10 14:48:31
+12
-8
MD5 less more
0 d9acafea0ae89a962d136c4714fa6e88 *ChangeLog
1 3339377e32f1c247e472340e800d09dc *DESCRIPTION
2 eaba4455ced37627eb4ad325c2038794 *NAMESPACE
3 a8644a8081da8428987ac599a8287f32 *NEWS
0 8ce65e8748f62a15a845d463ef9dc4ce *ChangeLog
1 799ef0349c13933fc12a76ecb5f602c8 *DESCRIPTION
2 f8ec272fd1610ad963b6fc8fb5469b64 *NAMESPACE
3 4b56bef437760c3635aaf7a0b28b33c7 *NEWS
44 40be776640196133aebff67618b08dec *R/ASCIIfy.R
55 9eb418fd95aa09ba85aed159545dea61 *R/RSCompat.S
66 a86a74ba04089ad58ea22e3a994a9b14 *R/addLast.R
1616 1da2198e1d194c705ca89381159b7b63 *R/foldchange.R
1717 e759eb4772cb9ce930a0c570279155b3 *R/getDependencies.R
1818 71212f4c14003458fc3e30638f339629 *R/invalid.R
19 11fc8cb8e4bd7c93cd8edefe54b9c64c *R/keywords.R
19 3f3921bb8ada00eb6fbf7332d689e108 *R/keywords.R
2020 f00dfc3263a5854151f244493b3f04d0 *R/lastAdd.R
21 66f7bacaa290264693ee1b4cbe4cadc8 *R/loadedPackages.R
2122 2bb525e1930ec3ba2afefa2ff43d74e0 *R/logit.R
2223 a3ec77919e3a6792f88a0aa39fae4841 *R/mixedsort.R
24 429ab819b15f97c8dd6e62db278336d9 *R/na.replace.R
2325 93a46a6ef5937bdd112468daceac00a6 *R/newVersionAvailable.R
2426 07cd779ab7e64f697604b8b4fa4c9d70 *R/oddeven.R
2527 1d016a924dd59daa78ea62d986da2929 *R/permute.R
3133 ef22fb4007dec9fb62eb5ed947292fa3 *R/stars.pval.R
3234 e8f510e73bd2cd820c384c00d75b0080 *R/strmacro.R
3335 d2d2d0444a049d74694203974624835c *data/ELISA.rda
34 d9acafea0ae89a962d136c4714fa6e88 *inst/ChangeLog
35 a8644a8081da8428987ac599a8287f32 *inst/NEWS
36 8ce65e8748f62a15a845d463ef9dc4ce *inst/ChangeLog
37 4b56bef437760c3635aaf7a0b28b33c7 *inst/NEWS
3638 05087d9c7f92db0ac048dec226e7bc3a *man/ASCIIfy.Rd
3739 904304f52b08ec847904ac2aa5be9aef *man/ELISA.Rd
3840 c5b7124f5fdbcc83f2e283314df95858 *man/ask.Rd
4042 e1a3f01f01db3e883397eaa49037af6f *man/checkRVersion.Rd
4143 0b2fba4b1456254689640add6afec843 *man/combinations.Rd
4244 1c240ef01582dd99e3a2e432e7dfb2ba *man/defmacro.Rd
43 22b71a514ea7acc360552527394ce9c1 *man/dirichlet.Rd
45 3ac18878a63f7ca4913f66d5ecb72a4a *man/dirichlet.Rd
4446 74868a3948263db0fbc2519b792acba2 *man/foldchange.Rd
4547 c208ca0a5e9c38fcb903cfd7656d5375 *man/getDependencies.Rd
4648 aa98190531ff93721b715e61000f76a4 *man/gtools-defunct.Rd
4850 01c743eee2dbb9dc14d02035fa05063c *man/invalid.Rd
4951 8d8b5429047edd4ed52f8f8f6b11f807 *man/keywords.Rd
5052 67b9c146bd8470b1dd5ddcac782c2071 *man/lastAdd.Rd
53 8ab31f5f313c145e05601fd8afc7b59b *man/loadedPackages.Rd
5154 3c207d731ad8ead62af138afe2e20c5f *man/logit.Rd
5255 422c16f570c15590fa83e1a71506757f *man/mixedsort.Rd
56 8d5842217510c21d95fb697caee3e6c6 *man/na.replace.Rd
5357 f4d6f8222b9448ef039d9cbf582ee29e *man/oddeven.Rd
5458 f911c6c34412df66c1ff0d6376f46c3f *man/permute.Rd
5559 30ac79ee93340f4174ddf91022154c0c *man/quantcut.Rd
1818 invalid,
1919 keywords,
2020 lastAdd,
21 loadedPackages,
2122 logit,
2223 logratio2foldchange,
2324 mixedorder,
2425 mixedsort,
26 na.replace,
2527 odd,
2628 permutations,
2729 permute,
0 gtools 3.4.2 - 2015-04-06
1 -------------------------
2
3 New features:
4
5 - New function loadedPackages() to display name, version, and path of
6 loaded packages (package namespaces).
7
8 - New function: na.replace() to replace missing values within a
9 vector with a specified value.`
10
11 Bug fixes:
12
13 - Modify keywords() to work properly in R 3.4.X and later.
14
15
016 gtools 3.4.1 - 2014-05-27
117 -------------------------
218
3131
3232 item <- paste("^",topic,"$", sep="")
3333
34 topics <- function(k) help.search(keyword=k)$matches[,"topic"]
34 topics <- function(k)
35 {
36 matches <- help.search(keyword=k)$matches
37 matches[ , match("topic", tolower(colnames(matches)))]
38 }
3539 matches <- lapply(kw, topics)
3640 names(matches) <- kw
3741
0 loadedPackages <- function(silent=FALSE)
1 {
2 packageNames <- loadedNamespaces()
3 packageVersions <- sapply(packageNames, function(package) paste(packageVersion(package), sep=".") )
4 packagePaths <- find.package(packageNames)
5 inSearchPath <- match(packageNames, gsub('^package:', '', grep('^package:', search(), value=TRUE)))
6 retval <- data.frame(Name=packageNames, Version=packageVersions, Path=packagePaths, SearchPath=inSearchPath)
7 retval$SearchPath <- na.replace(retval$SearchPath, '-')
8 retval <- retval[order(inSearchPath),]
9 if(!silent) print(retval)
10 retval
11 }
0 na.replace <- function(x, replace)
1 {
2 x[is.na(x)] <- replace
3 x
4 }
0 2015-04-09 warnes
1
2 * [r1920] DESCRIPTION, NAMESPACE, R/loadedPackages.R,
3 R/na.replace.R, inst/ChangeLog, inst/NEWS, man/loadedPackages.Rd,
4 man/na.replace.Rd: Move first()/last()/left()/right() to gdata.
5 Add new functions na.replace() and loadedPackages().
6 Add more text to package description.
7
8 2015-04-08 warnes
9
10 * [r1919] NAMESPACE, R/first.R, man/first.Rd, man/left.Rd: Move
11 first/last/left/right to from gtools to gdata
12
13 2015-04-06 warnes
14
15 * [r1918] man/dirichlet.Rd: Correct URL
16 * [r1917] inst/ChangeLog, inst/NEWS: Update NEWS and ChangeLog for
17 gtools 3.5.0
18 * [r1916] inst/ChangeLog: Add ChangeLog files to repository
19 * [r1915] R/keywords.R: Implement fix to keywords() needed for
20 R-3.4.1, as suggested by Kurt
21 Hornik.
22 * [r1914] NAMESPACE, R/first.R: - Export S3 methods for first(),
23 last(), left() and right().
24 - Ensure code matches man page for first(), last(), left(), and
25 right().
26
27 2014-10-09 warnes
28
29 * [r1897] DESCRIPTION, inst/NEWS: Update for 3.5.0 release of
30 gtools
31 * [r1896] R/first.R: Make right() and left() S3 methods for classes
32 data.frame and matrix
33
34 2014-08-27 warnes
35
36 * [r1872] man/first.Rd: Fix man page
37 * [r1871] DESCRIPTION, NAMESPACE, R/first.R, man/first.Rd,
38 man/left.Rd: Finish adding first(), last(), left(), and right().
39 * [r1870] R/first.R: Add functions first(), last(), left(), and
40 right().
41
042 2014-05-28 warnes
143
44 * [r1816] DESCRIPTION, inst/NEWS: Update for gtools 3.4.1
245 * [r1815] tests/smartbind_Dates.R: Add test to ensure smartbind()
346 properly handles Date columns.
447 * [r1814] R/smartbind.R: smartbind: Convert non-native type columns
0 gtools 3.4.2 - 2015-04-06
1 -------------------------
2
3 New features:
4
5 - New function loadedPackages() to display name, version, and path of
6 loaded packages (package namespaces).
7
8 - New function: na.replace() to replace missing values within a
9 vector with a specified value.`
10
11 Bug fixes:
12
13 - Modify keywords() to work properly in R 3.4.X and later.
14
15
016 gtools 3.4.1 - 2014-05-27
117 -------------------------
218
0 % $Id: dirichlet.Rd 1433 2010-05-01 22:03:03Z warnes $
0 % $Id: dirichlet.Rd 1918 2015-04-06 22:09:54Z warnes $
11 %
22 \name{rdirichlet}
33 \alias{rdirichlet}
3232 }
3333 \author{
3434 Code original posted by Ben Bolker to R-News on Fri Dec 15 2000. See
35 \url{http://www.r-project.org/nocvs/mail/r-help/2000/3865.html}. Ben
36 attributed the code to Ian Wilson \email{i.wilson@maths.abdn.ac.uk}.
35 \url{https://stat.ethz.ch/pipermail/r-help/2000-December/009561.html}.
36 Ben attributed the code to Ian Wilson \email{i.wilson@maths.abdn.ac.uk}.
3737 Subsequent modifications by Gregory R. Warnes
3838 \email{greg@warnes.net}.
3939 }
0 \name{loadedPackages}
1 \alias{loadedPackages}
2 \title{
3 Provide Name, Version, and Path of Loaded Package Namespaces
4 }
5 \description{
6 Provide name, version, and path of loaded package namespaces
7 }
8 \usage{
9 loadedPackages(silent = FALSE)
10 }
11 \arguments{
12 \item{silent}{Logical indicating whether the results should be printed}
13 }
14 \value{
15 Data frame containing one row per loaded package namespace, with columns:
16 \item{Package}{Package name}
17 \item{Version}{Version string}
18 \item{Path}{Path to package files}
19 \item{SearchPath}{Either the index of the package namespace in the current
20 search path, or '-' if the package namespace is not in the search
21 path. '1' corresponds to the top of the search path (the first namespace
22 searched for values). }
23 }
24 \author{
25 Gregory R. Warnes \email{greg@warnes.net}
26 }
27 \seealso{
28 \code{\link[base]{loadedNamespaces}},
29 \code{\link[utils]{packageVersion}},
30 \code{\link[base]{search}},
31 \code{\link[base]{find.package}}
32 }
33 \examples{
34 loadedPackages()
35 }
36 \keyword{package}
0 \name{na.replace}
1 \alias{na.replace}
2 \title{
3 Replace Missing Values
4 }
5 \description{
6 Replace missing values
7 }
8 \usage{
9 na.replace(x, replace)
10 }
11 \arguments{
12 \item{x}{vector possibly contining missing (\code{NA}) values.}
13 \item{replace}{scalar replacement value}
14 }
15 \details{
16 This is a convenience function that is the same as
17 x[is.na(x)] <- replace
18 }
19 \value{
20 Vector with missing values (\code{NA}) replaced by the
21 value of \code{replace}.
22 }
23 \author{
24 Gregory R. Warnes \email{greg@warnes.net}
25 }
26 \seealso{
27 \code{\link[base]{is.na}}, \code{\link[stats]{na.omit}}
28 }
29 \examples{
30 x <- c(1,2,3,NA,6,7,8,NA,NA)
31 na.replace(x, '999')
32 }
33 \keyword{ manip }