Skip to content

Commit

Permalink
version 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey authored and gaborcsardi committed Feb 21, 2013
1 parent f700e29 commit 9688f1b
Show file tree
Hide file tree
Showing 66 changed files with 2,739 additions and 1,667 deletions.
16 changes: 10 additions & 6 deletions DESCRIPTION
Expand Up @@ -2,23 +2,27 @@ Package: Kmisc
Type: Package
Title: Miscellaneous functions intended to improve the R coding
experience
Version: 0.3.0
Date: 2013-01-22
Version: 0.4.0
Date: 2013-02-21
Author: Kevin Ushey
Maintainer: Kevin Ushey <kevinushey@gmail.com>
Description: A collection of functions for common data reshaping
operations, as well as functions for table and plot generation
for R Markdown documents.
License: GPL (>= 2)
LazyData: TRUE
Depends: lattice, grid
Suggests: Rcpp, ggplot2, knitr, googleVis
LinkingTo: Rcpp
Depends: R (< 3.0.0), lattice, grid, Rcpp (>= 0.10.1)
Suggests: ggplot2, knitr, googleVis, testthat
ByteCompile: TRUE
Collate: 'misc.R' 'html.R' 'package_description.R' 'html_prep.R'
'in_interval.R' 'str_rev.R' 'str_slice.R' 'clean_doc.R'
'str_sort.R' 'extract_rows.R' 'is_sorted.R' 'pMerge.R'
'par.reset.R' 'anat.R' 'bwplot2.R' 'Rcpp_gen_makevars.R'
'rcpp_apply_generator.R' 'grid.text2.R' 'update_date.R'
Packaged: 2013-01-23 03:46:19 UTC; kevinushey
'RcppExports.R' 'split_runs.R' 'stack_list.R' 'html_attach.R'
'pp_plot.R' 'pad.R' 'remove_char_digit.R' 'regex.R'
Packaged: 2013-02-21 15:16:03 UTC; kevinushey
NeedsCompilation: yes
Repository: CRAN
Date/Publication: 2013-01-23 06:50:55
Date/Publication: 2013-02-21 17:09:01
104 changes: 64 additions & 40 deletions MD5
@@ -1,59 +1,72 @@
d051fcd1c217c85483d0ad136e521d20 *DESCRIPTION
6eabd1423b1188bcf5d49fa7097d9b9f *NAMESPACE
c4d87cfcff76c9826e6c33b8a94fce36 *NEWS
44af709cf98711e2bea7faf5ceaef986 *R/Rcpp_gen_makevars.R
039b962759109a300f06303b6fc65c21 *R/anat.R
ef192bd3c10096a567a40bc1d5d4445a *R/bwplot2.R
4412fb37e53e723e527edcb93873ac94 *R/clean_doc.R
a0d9529d6b82d6fa7ffe87cdf3859da2 *DESCRIPTION
b91ed682ba0d7b872bba4cc2c9f921ea *NAMESPACE
0a58e4a0c03857f1419252115ac36821 *NEWS
818848d4ad0871f1a32c2156fbb10ca4 *R/RcppExports.R
f2ecbc1ce4f8eff22f06a37be8d88db0 *R/Rcpp_gen_makevars.R
493a5981c59926f99b1bd8a72f98e1dc *R/anat.R
d2645538cac4a1f6ffe13adb92e638ac *R/bwplot2.R
f3dd8244db809089c39d092bdb195c6c *R/clean_doc.R
b4ac9d4abf259bf556c245d69a0e1b7b *R/extract_rows.R
89594e7962c03c0ccb1bb68840cf0f79 *R/grid.text2.R
e4ef18a38248fa0344b5059d659fae01 *R/html.R
7fac0e28eb3bf439a11fb57fa9b93bf8 *R/grid.text2.R
6b3e4ca5ebe12fd4699359212feb1f71 *R/html.R
1f6919f4e0afde5b8b57c55be3da897f *R/html_attach.R
74fc55316d443959bfed3056136336d6 *R/html_prep.R
022e587d368154c29fe681361bb7e2a9 *R/in_interval.R
818d7a039b1139ba550d241b185f7d6b *R/is_sorted.R
66d39b7646c5b055e5616300277f5022 *R/misc.R
068126d434f2934437111b56f0cddb43 *R/pMerge.R
b2183d2ab5cab88acd2c3d76ed9b9976 *R/in_interval.R
85f9965675d76c3a23d850c28fcaf12f *R/is_sorted.R
227f017d6d2cf507936d0d76b983a279 *R/misc.R
87ce400f85eae93c84c2f67cb603c202 *R/pMerge.R
ce49e3fa93008e820deefdf3af1970d1 *R/package_description.R
a2b49c78a903fc6ca83fc6dfef074037 *R/par.reset.R
3e244e2c036be91a06c4da0c00a49f1b *R/rcpp_apply_generator.R
ab80fe66ea17740fee112941e4fedccc *R/str_rev.R
b567cf2a205607c08b51527584371110 *R/pad.R
f1031c1269e01b01c9462fdb7a0dc1d0 *R/par.reset.R
9acf38ceeba93565c9c05d0df5f988fd *R/pp_plot.R
4b28b5de0a31b5f6358b315f07d101ac *R/rcpp_apply_generator.R
5e1d96fe32bb3750b4afb391cd9cbcbd *R/regex.R
3f93882eda215ad94bf1e13bdf3814d0 *R/remove_char_digit.R
bb29a27bda8c213b2623500a70ef2e0c *R/split_runs.R
d708fdb5fe2b275d199ca8c295938895 *R/stack_list.R
60083bd8af3505c9752c3165b3ae4749 *R/str_rev.R
0a30c09b816fdd671c4b653a8ff388c9 *R/str_slice.R
928ffacf5c28fdcacf50de917cc17b0c *R/str_sort.R
77000cad77c7d5e921a861241f5c1434 *R/update_date.R
04da0ceb8300eb2d52b6748bf1cb5b1d *R/update_date.R
ebf28208fe036ca96203676a657a488a *data/html.rda
30c813fb5da2590ef8fdaaf579594b59 *data/html.txt.gz
899e1e8f41772c27c37d1aa416220e40 *inst/doc/example.Rmd
2d58c35a154b2246e0b004f56f91e8ff *inst/doc/markdown.css
c2ea25c075accadfcb4f4e8336398415 *man/HTML.Rd
086d74d7e966a9fbf35367b7d1416c7f *man/HTML_env.Rd
2475ba8e1d32c4bd2024a0ac3aa0ab9c *data/html.txt.gz
4f5ea17e3e11da398a200d4569df7e68 *inst/doc/Kmisc-intro.Rmd
21d93b55ea55d4da3caebfcb35f2b3bc *inst/doc/markdown.css
741f45e335a0cc5b53728d6d21f13003 *inst/tests/test-char_to_factor.R
84a3857b8d57c974e28450818ffd078d *inst/tests/test-factor_to_char.R
ec239eacbddd55dffbcb52e8a9470a97 *inst/tests/test-kMerge.R
127f739e8766c7ec34e9091cf9d40d49 *inst/tests/test-stack_list.R
3c6368ee7f9a47ecc04c148caad8995e *man/Kmisc.Rd
7202053dc2a46427fe78fa5a0b84e33e *man/Rcpp_gen_makevars.Rd
70dba699f009251bcae259974806312a *man/anat.Rd
de38fc4c2d9b1bb84e0ec8f7520ffe9d *man/anatomy.Rd
dc68d60299955c10d545ddfb2179b8ce *man/Rcpp_gen_makevars.Rd
b7227e35d0805b209a939255855ed12e *man/anat.Rd
976c1cf5a111e086d01611635166b0f4 *man/attachHTML.Rd
2a4b7c44fd0430d242f1265f97cb5c50 *man/bwplot2.Rd
717fa6f77cd32f0f80840b448283217c *man/cat.cb.Rd
e287e37a9bb2b1e2af4bf1d2ebbef46e *man/cat.cb.Rd
3ede9486f5a7a45141ae39ebcc938916 *man/cd.Rd
6f3e26f406a42afa8fa6741f30424fa8 *man/char_to_factor.Rd
1ae477ca50555126635ec02a74ea2d23 *man/char_to_factor.Rd
773bf53e3c471ab116af0a904e889eec *man/clean_doc.Rd
c9643e41400bebc29b7b58cd279a3533 *man/dapply.Rd
2a6851f7436d00e65d7248475fa7c7a6 *man/detachHTML.Rd
9a55c39decb0c0bbd326239950b35a04 *man/extract.Rd
199dc8387975961550a7f866ef944f6f *man/extract.re.Rd
9db8aa56eb8a4519a688183d320a1395 *man/extract_rows.re.Rd
3ddf9a3b195b181a156c0a3ac878933b *man/factor_to_char.Rd
0ce3b4c661de3abe53fe2eba165e9877 *man/factor_to_char.Rd
46936b72ad08e126aeed97a966b37cce *man/fgrep.Rd
179abe48e9220666653e1200ae6bcec8 *man/getObjects.Rd
d424e8157405e62f930b541ad283f1a8 *man/gradient.Rd
7e63770afdc2af69ae2681dea8ad7b73 *man/grid.text2.Rd
19e99011cd02b1ad3bc6fa518cf251bf *man/hImg.Rd
3986ee265fafd3d178ca2469a422cfde *man/hImg.Rd
61896a383b9ee735e604c34ee3dd1f84 *man/hSvg.Rd
c2ea25c075accadfcb4f4e8336398415 *man/html.Rd
b68ed753e61d9e48d204ce18dc7d1011 *man/html_tags.Rd
50077d9285598bfc290ed5f2fa83ad9c *man/in_interval.Rd
a70505acd549ff5915baa1784e5a9c02 *man/in_interval.Rd
06f1a0351f9dca5b14f8706f5952601b *man/is.sorted.Rd
bc623291c54eb69f21acc9c287fa4f81 *man/kAnova.Rd
c85ddab543498afba7a74d86ceb8c360 *man/kAnova.Rd
11acb8ef16ba4a2fa6441719f81f588c *man/kCoef.Rd
6327d810177407ae22e64e5f2cac123b *man/kFivenum.Rd
b1804a2bdadf6baee9275cdce38b6ead *man/kImg.Rd
a96522c4ca666738d01b614160a853c7 *man/kLoad.Rd
5ae9b4562ac730a0bc1daa35fffeb105 *man/kMerge.Rd
09cba76a793326eb6ac5c7ccaefbe109 *man/kLoad.Rd
aaacb64a92a463fe0b9c41c5f245862f *man/kMerge.Rd
026e6ae95aa0872b38fbd50b65aab820 *man/kSave.Rd
b199e03994ba69eee5ab9f49ae5d6206 *man/kSvg.Rd
da3bd5e3f65ebba6bc0383924e9e7b24 *man/kTable.Rd
Expand All @@ -63,33 +76,44 @@ ac18fd7cad1d5700f1f35fd138ba301a *man/lu.Rd
fba9ef7786f5a626b250e28dbe9a37de *man/makeHTMLTable.Rd
f18d8b5d0b0f64ac1ad909cfc02f8e96 *man/makeHTMLTag.Rd
7e5c929ce3633e3cd3fe934d691f5e9c *man/make_dummy.Rd
da97da7793f69182a44f0f41a20a2161 *man/ngrep.Rd
0cbf5941fb222356035260e2c10d0f95 *man/ngrep.Rd
ef66f54e5cff74db5f0817a73eaab93b *man/nin.Rd
dcb9d1c037fee96335a8c64c0ba0d2d1 *man/p1t.Rd
222895a69f0e35b078036082ed3d35ff *man/pMerge.Rd
652bf2ea31f16c3cb1062bd1c60427d7 *man/pad.Rd
5f8e39914a4f260123aa1686a4be69a1 *man/par.reset.Rd
e7b382c0b6b4173dd05e34ceef79f1b5 *man/pp_plot.Rd
aef7dcd12e7ac933db134cf3ed0be690 *man/print.kHTML.Rd
54a021c9e708b1639b15308765a0895d *man/pxt.Rd
28296bd63b430047c348fa5b12dd9bf1 *man/rcpp_apply_generator.Rd
c7d522b77518ca7f9bc845be689ae1f2 *man/rcpp_apply_generator.Rd
3ef643d1711203a6b36fd0bad51a092a *man/re.exists.Rd
2c30cc711a4d7293ea00bda75d1fd92f *man/read.cb.Rd
4417b41f29c3e25b507e3343151be389 *man/remove_chars.Rd
69ab2d884a15445bb2467775fadf79fc *man/remove_digits.Rd
54cb0c1d85be927a8b658888484eef3d *man/scan.cb.Rd
bf326787f77b42613ce209df7c2bd925 *man/stack_list.Rd
b7323fa923b2bf65a4484153fb26ca9a *man/split_runs.Rd
87e3cf39c7aa6ccf76db8928e3c400d4 *man/stack_list.Rd
f2ceee5cd98c70770ad3ca94a10badbe *man/str_rev.Rd
78648a5a7b2d14e7b6780aba6e0207bf *man/str_rev2.Rd
d408bf892f9f3a7c2209d4207dcd74be *man/str_slice.Rd
250873fa0a6b79d377923a4230bd5084 *man/str_slice2.Rd
e74bb3b1889c462f942e498291170fa6 *man/str_sort.Rd
3778d9d64ee9f4997d363ad9882518a4 *man/str_split.Rd
080ced2f2e9d7805eb3b43e15165d242 *man/str_split.Rd
c8cf3c86adf6c9329e4fc1c8b93b6f37 *man/strip_extension.Rd
c7c83a3ec3cb70a7a4865ea113357825 *man/swap.Rd
65c571b5868a58871f355156a323090a *man/swap.Rd
c6c904c98a1c19d1ee7cef0e516a82c0 *man/u.Rd
e144c310a2bf5f96bef4290277eba18e *man/update_date.Rd
8e4695b88d6684777d6fdc193b91e19d *man/update_date.Rd
26256c9b8e5cf77f16e367dcaab367dc *man/us.Rd
816590badc02754c576740ea4d3e571f *man/without.Rd
58cf48dd4269674b9e3ad81749d681f9 *man/without.re.Rd
895ffef0ebd424e5d933a715c086dd6f *man/without_rows.re.Rd
aaede6f0beb049c0331e80a1f3675ed3 *man/write.cb.Rd
000cb62843db8e6726142d04e7175985 *src/in_interval.c
c5d7ce740296e10d653251e35ade4960 *src/Makevars
01c8b9eff67b8822e7cbfb73af7a8e40 *src/Makevars.win
bc22dd49638adfb371924af560d0e6cd *src/RcppExports.cpp
d3c3a782ae972709e82b5f1442e2eba8 *src/factor_to_char.c
f48f4fbb4a7d09a486e47ffb9d93bada *src/in_interval.c
825a56afd1158a48410aed55266b3f81 *src/split_runs.cpp
37d314eb745c9c9e6b7b539bbb8d10e3 *src/stack_list.cpp
5ad838182340b27df1205a1a77420533 *src/str_rev.c
eafcc17b8d2c33b4964f9a4318f0665b *src/str_slice.c
11 changes: 11 additions & 0 deletions NAMESPACE
@@ -1,15 +1,20 @@
export("%nin%")
export(anat)
export(anatomy)
export(attachHTML)
export(bwplot2)
export(cat.cb)
export(cd)
export(char_to_factor)
export(clean_doc)
export(dapply)
export(detachHTML)
export(extract_rows.re)
export(extract.re)
export(extract)
export(factor_to_char)
export(fgrep)
export(getload)
export(getObjects)
export(gradient)
export(grid.text2)
Expand All @@ -33,13 +38,19 @@ export(makeHTMLTable)
export(makeHTMLTag)
export(ngrep)
export(p1t)
export(pad)
export(par.reset)
export(pMerge)
export(pp_plot)
export(pxt)
export(rcpp_apply_generator)
export(Rcpp_apply_generator)
export(re.exists)
export(read.cb)
export(remove_chars)
export(remove_digits)
export(scan.cb)
export(split_runs)
export(stack_list)
export(str_rev)
export(str_rev2)
Expand Down
91 changes: 59 additions & 32 deletions NEWS
@@ -1,42 +1,69 @@
Version 0.4.0
------------------------------------------------------------
* Package now requires Rcpp.
* 'factor_to_char' now has a fast C implementation
* Added 'split_runs', an Rcpp function for splitting a
numeric or character vector by the runs observed.
* Made an Rcpp implementation of 'stack_list', for fast
stacking of lists of data.frames.
* Fixed bug in 'swap' function.
* Added 'grid.text2', a function that generates text with
a simple background. Useful for overlaying simple
formulas / results on a plot.
* Fixed bugs with 'kMerge'.

Version 0.3.0
------------------------------------------------------------------------------
------------------------------------------------------------

* Fixed compatibility issues with old versions of R (no calls to paste0()).
* Added str_rev2(), for reversing of UTF-8 strings (str_rev() remains for
speed reasons when using ASCII characters). Similarily with str_slice()
* Fixed compatibility issues with old versions of R (no
calls to paste0()).
* Added str_rev2(), for reversing of UTF-8 strings
(str_rev() remains for speed reasons when using
ASCII characters). Similarily with str_slice()
and str_slice2().
* Added str_sort(), a function for sorting a (UTF-8) string lexically.
* Added str_sort(), a function for sorting a (UTF-8)
string lexically.
* Updated documentation on extract() / without().
* Improved error checking in extract() / without() - now ensures that the
symbols passed to ... are atomic
* Added extract_rows.re() and without_rows.re() for extracting rows from a
dataframe whereby some variable in the data frame (default: rownames)
matches a regex pattern
* Added anat() / anatomy() functions for fast str()-like calling on large
data.frames
* Added clean_doc(), a helper function that deletes all documentation in
the current working directory - used for cleaning up orphaned docs,
assuming you're writing documentation with roxygen2
* Added is.sorted(), which is really just !is.unsorted() but seems the
more 'logical' question in many cases
* Added 'rcpp_apply_generator', a function for generating Rcpp-apply
* Improved error checking in extract() / without() - now
ensures that the symbols passed to ... are atomic
* Added extract_rows.re() and without_rows.re() for
extracting rows from a dataframe whereby some variable
in the data frame (default: rownames) matches a regex
pattern
* Added anat() / anatomy() functions for fast str()-like
calling on large data.frames
* Added clean_doc(), a helper function that deletes all
documentation in the current working directory - used
for cleaning up orphaned docs, assuming you're
writing documentation with roxygen2
* Added is.sorted(), which is really just !is.unsorted()
but seems the more 'logical' question in many cases
* Added 'rcpp_apply_generator', a function for generating
fast apply-type functions through Rcpp

Version 0.2.0
------------------------------------------------------------------------------

* Added some useful string operations: str_rev() and str_slice(). These
functions are written in C for fast execution.
* Added in.interval(), a function for checking whether each element of
a vector x lies within an interval [lo, hi).
* Added extract.re(), without.re() for extracting named objects; objects with
names matching / not-matching the RE supplied are returned
* Fixed bug with HTML tag functions handling of functions as arguments
* Functions no longer depend on Rcpp - may be reintroduced in future
------------------------------------------------------------
* Added some useful string operations: str_rev() and
str_slice(). These functions are written in C for fast
execution.
* Added in.interval(), a function for checking whether
each element of a vector x lies within an interval
[lo, hi).
* Added extract.re(), without.re() for extracting named
objects; objects with names matching / not-matching
the RE supplied are returned
* Fixed bug with HTML tag functions handling of functions
as arguments
* Functions no longer depend on Rcpp - may be
reintroduced in future
* Minor changes to code for R <2.15.0 compatibility
* Updated documentation + DESCRIPTION for clarity
* Package now byte compiles by default
* Introduced attachHTML(), detachHTML() functions for attaching commonly
used HTML functions (ie, they do not mask any base package functions)
* Exported makeHTMLTag() function, added documentation + examples
* Introduced attachHTML(), detachHTML() functions for
attaching commonly used HTML functions (ie, they
do not mask any base package functions)
* Exported makeHTMLTag() function, added documentation +
examples
* Fixed bug in read.cb() for Mac systems
* Added scan.cb(), for getting non-tabular data from clipboard
* Added scan.cb(), for getting non-tabular data from
clipboard
19 changes: 19 additions & 0 deletions R/RcppExports.R
@@ -0,0 +1,19 @@
# This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

split_runs_numeric <- function(X) {
.Call('Kmisc_split_runs_numeric', PACKAGE = 'Kmisc', X)
}

split_runs_character <- function(X) {
.Call('Kmisc_split_runs_character', PACKAGE = 'Kmisc', X)
}

split_runs_one <- function(x) {
.Call('Kmisc_split_runs_one', PACKAGE = 'Kmisc', x)
}

stack_list_df <- function(X, classes, num_elem, make_row_names, name, keep_list_index, index_name) {
.Call('Kmisc_stack_list_df', PACKAGE = 'Kmisc', X, classes, num_elem, make_row_names, name, keep_list_index, index_name)
}

8 changes: 6 additions & 2 deletions R/Rcpp_gen_makevars.R
Expand Up @@ -2,7 +2,8 @@
#'
#' If you're building a package and want a simple set of
#' Makevars files to export, this function will handle it
#' for you.
#' for you. Borrowed from the Rcpp \code{rcpp.package.skeleton}
#' function.
#' @param src the location to output the Makevars.
Rcpp_gen_makevars <- function(src=file.path( getwd(), "src" )) {

Expand All @@ -20,4 +21,7 @@ Rcpp_gen_makevars <- function(src=file.path( getwd(), "src" )) {
message(" >> added Makevars.win file with Rcpp settings")
}

}
}

#' @rdname Rcpp_gen_makevars
rcpp_gen_makevars <- Rcpp_gen_makevars

0 comments on commit 9688f1b

Please sign in to comment.