Codebase list gtools / 38e0edb
Import Debian changes 3.4.1-1 gtools (3.4.1-1) unstable; urgency=low * New upstream release Dirk Eddelbuettel 5 years ago
11 changed file(s) with 111 addition(s) and 22 deletion(s). Raw diff Collapse all Expand all
0 2014-05-28 warnes
1
2 * [r1815] tests/smartbind_Dates.R: Add test to ensure smartbind()
3 properly handles Date columns.
4 * [r1814] R/smartbind.R: smartbind: Convert non-native type columns
5 (except factor) to character.
6
7 2014-04-18 arnima
8
9 * [r1813] R/ASCIIfy.R, man/ASCIIfy.Rd: Main arg is 'x' like
10 showNonASCII(x), preformatted notes instead of verb
11
012 2014-04-17 warnes
113
14 * [r1810] man/ASCIIfy.Rd: Update ASCIIfy man page to match source
15 code and add keywords
16 * [r1809] inst/NEWS: Update NEWS for gtools 3.4.0
217 * [r1808] DESCRIPTION, NAMESPACE, R/ASCIIfy.R, man/ASCIIfy.Rd: Add
318 ASCIIfy function posted to RDevel by Arni Magnusson
419
00 Package: gtools
11 Title: Various R programming tools
22 Description: Various R programming tools
3 Version: 3.4.0
4 Date: 2014-04-15
3 Version: 3.4.1
4 Date: 2014-05-27
55 Author: Gregory R. Warnes, Ben Bolker, and Thomas Lumley
66 Maintainer: Gregory R. Warnes <greg@warnes.net>
77 License: LGPL-2.1
8 Packaged: 2014-04-17 17:35:30 UTC; warnes
8 Packaged: 2014-05-28 00:24:58 UTC; warnes
99 NeedsCompilation: yes
1010 Repository: CRAN
11 Date/Publication: 2014-04-18 01:42:53
11 Date/Publication: 2014-05-28 09:52:04
0 a671dd37fc365721275942aed975d7f9 *ChangeLog
1 38744921883b836dbfba56d0bbff8668 *DESCRIPTION
0 d9acafea0ae89a962d136c4714fa6e88 *ChangeLog
1 3339377e32f1c247e472340e800d09dc *DESCRIPTION
22 eaba4455ced37627eb4ad325c2038794 *NAMESPACE
3 b0106b6f2c8d042bb58f4399528ede0b *NEWS
4 174deee96772a2b017b9144766223109 *R/ASCIIfy.R
3 a8644a8081da8428987ac599a8287f32 *NEWS
4 40be776640196133aebff67618b08dec *R/ASCIIfy.R
55 9eb418fd95aa09ba85aed159545dea61 *R/RSCompat.S
66 a86a74ba04089ad58ea22e3a994a9b14 *R/addLast.R
77 c4ae0d6b5867f6751981e9f93cd2f619 *R/ask.R
2727 02390191f23321a34fcfc41719d66dc6 *R/running.R
2828 a5ea32bab219fd7c634f034dddada96b *R/scat.R
2929 e5ddc84d8a502feed32f7f6b1b5e25ab *R/setTCPNoDelay.R
30 3d0ac64f38d5b91d4ef8adc2344d5875 *R/smartbind.R
30 f6c7ff23b703889d580383ea3e7205d8 *R/smartbind.R
3131 ef22fb4007dec9fb62eb5ed947292fa3 *R/stars.pval.R
3232 e8f510e73bd2cd820c384c00d75b0080 *R/strmacro.R
3333 d2d2d0444a049d74694203974624835c *data/ELISA.rda
34 a671dd37fc365721275942aed975d7f9 *inst/ChangeLog
35 b0106b6f2c8d042bb58f4399528ede0b *inst/NEWS
36 c8908e4db48abf721d73ca9fe210af0a *man/ASCIIfy.Rd
34 d9acafea0ae89a962d136c4714fa6e88 *inst/ChangeLog
35 a8644a8081da8428987ac599a8287f32 *inst/NEWS
36 05087d9c7f92db0ac048dec226e7bc3a *man/ASCIIfy.Rd
3737 904304f52b08ec847904ac2aa5be9aef *man/ELISA.Rd
3838 c5b7124f5fdbcc83f2e283314df95858 *man/ask.Rd
3939 ecbe8481bdcff0d8abd1a47cc64ca7b2 *man/binsearch.Rd
6060 7ba286fa2b1bc994de1c6ec78883cdc8 *man/stars.pval.Rd
6161 8d4158b8eb92153e2d3f581682b2a3c1 *src/Makevars.win
6262 bb28a3858ac5a6152565d3b8cef8c70c *src/setTCPNoDelay.c
63 6c36d5eac8884ab13c200c1113cf9236 *tests/smartbind_Dates.R
6364 b859dff6a12425f4ba692dc7706e99ed *tests/test_binsearch.R
6465 33c5986481c62f046106b02abc4d0c74 *tests/test_mixedorder.R
0 gtools 3.4.1 - 2014-05-27
1 -------------------------
2
3 Bug fixes:
4
5 - smartbind() now converts all non-atomic type columns (except factor)
6 to type character instead of generating an opaque error message.
7
8 Other changes:
9
10 - the argument to ASCIIfy() is now named 'x' instead of 'string'.
11
12 - minor formatting changes to ASCIIfy() man page.
13
014 gtools 3.4.0 - 2014-04-14
115 -------------------------
216
0 ASCIIfy <- function(string, bytes=2, fallback="?")
0 ASCIIfy <- function(x, bytes=2, fallback="?")
11 {
22 bytes <- match.arg(as.character(bytes), 1:2)
33 convert <- function(char) # convert to ASCII, e.g. "z", "\xfe", or "\u00fe"
2222 return(ascii)
2323 }
2424
25 if(length(string) > 1)
25 if(length(x) > 1)
2626 {
27 sapply(string, ASCIIfy, bytes=bytes, fallback=fallback, USE.NAMES=FALSE)
27 sapply(x, ASCIIfy, bytes=bytes, fallback=fallback, USE.NAMES=FALSE)
2828 }
2929 else
3030 {
31 input <- unlist(strsplit(string,"")) # "c" "a" "f" "<\'e>"
31 input <- unlist(strsplit(x,"")) # "c" "a" "f" "<\'e>"
3232 output <- character(length(input)) # "" "" "" ""
3333 for(i in seq_along(input))
3434 output[i] <- convert(input[i]) # "c" "a" "f" "\\u00e9"
6262 " End:", end,
6363 " Column:", col,
6464 "\n", sep="")
65
6566 if ("factor" %in% classVec)
6667 {
6768 newclass <- "character"
6869 }
6970 else
70 newclass <- classVec
71 newclass <- classVec[1]
72
73 ## Coerce everything that isn't a native type to character
74 if(! (newclass %in% c("logical", "integer", "numeric",
75 "complex", "character", "raw") ))
76 {
77 newclass <- "character"
78 warning("Converting non-atomic type column '", col,
79 "' to type character.")
80 }
7181
7282 retval[[col]] <- as.vector(rep(fill,nrows), mode=newclass)
7383 }
7484
75 retval[[col]][start:end] <- as.vector(block[,col],
76 mode=class(retval[[col]]))
85 mode <- class(retval[[col]])
86 if(mode=="character")
87 vals <- as.character(block[,col])
88 else
89 vals <- block[,col]
90
91 retval[[col]][start:end] <- as.vector(vals, mode=mode)
7792 }
7893 start <- end+1
7994 blockIndex <- blockIndex+1
0 gtools (3.4.1-1) unstable; urgency=low
1
2 * New upstream release
3
4 -- Dirk Eddelbuettel <edd@debian.org> Wed, 28 May 2014 22:07:23 -0500
5
06 gtools (3.4.0-1) unstable; urgency=low
17
28 * New upstream release
0 2014-05-28 warnes
1
2 * [r1815] tests/smartbind_Dates.R: Add test to ensure smartbind()
3 properly handles Date columns.
4 * [r1814] R/smartbind.R: smartbind: Convert non-native type columns
5 (except factor) to character.
6
7 2014-04-18 arnima
8
9 * [r1813] R/ASCIIfy.R, man/ASCIIfy.Rd: Main arg is 'x' like
10 showNonASCII(x), preformatted notes instead of verb
11
012 2014-04-17 warnes
113
14 * [r1810] man/ASCIIfy.Rd: Update ASCIIfy man page to match source
15 code and add keywords
16 * [r1809] inst/NEWS: Update NEWS for gtools 3.4.0
217 * [r1808] DESCRIPTION, NAMESPACE, R/ASCIIfy.R, man/ASCIIfy.Rd: Add
318 ASCIIfy function posted to RDevel by Arni Magnusson
419
0 gtools 3.4.1 - 2014-05-27
1 -------------------------
2
3 Bug fixes:
4
5 - smartbind() now converts all non-atomic type columns (except factor)
6 to type character instead of generating an opaque error message.
7
8 Other changes:
9
10 - the argument to ASCIIfy() is now named 'x' instead of 'string'.
11
12 - minor formatting changes to ASCIIfy() man page.
13
014 gtools 3.4.0 - 2014-04-14
115 -------------------------
216
55 single-byte (\samp{\x00}) or two-byte (\samp{\u0000}) codes.
66 }
77 \usage{
8 ASCIIfy(string, bytes = 2, fallback = "?")
8 ASCIIfy(x, bytes = 2, fallback = "?")
99 }
1010 \arguments{
11 \item{string}{a character vector, possibly containing non-ASCII
11 \item{x}{a character vector, possibly containing non-ASCII
1212 characters.}
1313 \item{bytes}{either \code{1} or \code{2}, for single-byte
1414 (\samp{\x00}) or two-byte (\samp{\u0000}) codes.}
2222 \author{Arni Magnusson \email{arnima@hafro.is}}
2323 \note{
2424 To render single backslashes, use these or similar techniques:
25 \verb{
25 \preformatted{
2626 write(ASCIIfy(x), "file.txt")
2727 cat(paste(ASCIIfy(x), collapse="\n"), "\n", sep="")}
2828
0 library(gtools)
1
2 today <- Sys.Date()
3 tenweeks <- seq(today, length.out=10, by="1 week")
4
5 df1 <- data.frame(dates=tenweeks, chars=letters[1:10], ints=1:10, numeric=1.1:10.1)
6 df2 <- data.frame(chars=letters[11:20], ints=11:20, numeric=11.1:20.1)
7
8 smartbind(df1, df2)