Skip to content

Commit de2fed4

Browse files
author
Tyler Rinker
committed
bumped to next version, added code of conduct, ran goodpractice::gp() and made fixes
1 parent aba16ab commit de2fed4

55 files changed

Lines changed: 794 additions & 599 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ inst/maintenance.R
2323
Thumbs.db
2424
inst/make_data
2525
inst/supporting_docs
26+
^CODE_OF_CONDUCT\.md$

CODE_OF_CONDUCT.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Contributor Code of Conduct
2+
3+
As contributors and maintainers of this project, we pledge to respect all people who
4+
contribute through reporting issues, posting feature requests, updating documentation,
5+
submitting pull requests or patches, and other activities.
6+
7+
We are committed to making participation in this project a harassment-free experience for
8+
everyone, regardless of level of experience, gender, gender identity and expression,
9+
sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
10+
11+
Examples of unacceptable behavior by participants include the use of sexual language or
12+
imagery, derogatory comments or personal attacks, trolling, public or private harassment,
13+
insults, or other unprofessional conduct.
14+
15+
Project maintainers have the right and responsibility to remove, edit, or reject comments,
16+
commits, code, wiki edits, issues, and other contributions that are not aligned to this
17+
Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed
18+
from the project team.
19+
20+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by
21+
opening an issue or contacting one or more of the project maintainers.
22+
23+
This Code of Conduct is adapted from the Contributor Covenant
24+
(http://contributor-covenant.org), version 1.0.0, available at
25+
http://contributor-covenant.org/version/1/0/0/

DESCRIPTION

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
Package: textshape
22
Title: Tools for Reshaping Text
3-
Version: 1.5.3
4-
Authors@R: c(person("Tyler", "Rinker", email = "tyler.rinker@gmail.com", role = c("aut", "cre")), person("Joran",
5-
"Elias", role = "ctb"), person("Matthew", "Flickinger", role = "ctb"), person('Paul', 'Foster', role =
6-
"ctb"))
3+
Version: 1.6.0
4+
Authors@R: c(
5+
person("Tyler", "Rinker", email = "tyler.rinker@gmail.com", role = c("aut", "cre")),
6+
person("Joran", "Elias", role = "ctb"),
7+
person("Matthew", "Flickinger", role = "ctb"),
8+
person('Paul', 'Foster', role = "ctb")
9+
)
710
Maintainer: Tyler Rinker <tyler.rinker@gmail.com>
811
Description: Tools that can be used to reshape and restructure text data.
912
Depends: R (>= 3.4.0)
@@ -27,7 +30,6 @@ Collate:
2730
'flatten.R'
2831
'from_to.R'
2932
'mtabulate.R'
30-
'set_output.R'
3133
'split_index.R'
3234
'split_match.R'
3335
'split_match_regex_to_transcript.R'

NEWS

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ And constructed with the following guidelines:
1717
* Bug fixes and misc changes bumps the patch
1818

1919

20-
textshape 1.5.1 -
20+
textshape 1.5.1 - 1.6.0
2121
----------------------------------------------------------------
2222

2323
BUG FIXES
@@ -31,18 +31,13 @@ NEW FEATURES
3131
using the concatenated list/atomic vector names as the names of the single
3232
tiered list.
3333

34-
* `unnest_text` added to located and unnest nested text columns in a data.frame.
35-
36-
MINOR FEATURES
34+
* `unnest_text` added to located and un-nest nested text columns in a data.frame.
3735

3836
IMPROVEMENTS
3937

4038
* `tidy_dtm`/`tidy_tdm` did not order unnamed matrices as expected (e.g.,
4139
`{1, 2, ..., 1}` was ordered as `{1, 10, 2, ...}`). This has been corrected.
4240

43-
CHANGES
44-
45-
4641

4742

4843

NEWS.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ And constructed with the following guidelines:
1717
* Bug fixes and misc changes bumps the patch
1818

1919

20-
textshape 1.5.1 -
20+
textshape 1.5.1 - 1.6.0
2121
----------------------------------------------------------------
2222

2323
**BUG FIXES**
@@ -31,18 +31,13 @@ textshape 1.5.1 -
3131
using the concatenated list/atomic vector names as the names of the single
3232
tiered list.
3333

34-
* `unnest_text` added to located and unnest nested text columns in a data.frame.
35-
36-
**MINOR FEATURES**
34+
* `unnest_text` added to located and un-nest nested text columns in a data.frame.
3735

3836
**IMPROVEMENTS**
3937

4038
* `tidy_dtm`/`tidy_tdm` did not order unnamed matrices as expected (e.g.,
4139
`{1, 2, ..., 1}` was ordered as `{1, 10, 2, ...}`). This has been corrected.
4240

43-
**CHANGES**
44-
45-
4641

4742

4843

R/bind_list.R

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,14 @@
4040
#' }
4141
bind_list <- function(x, id.name= "id", content.name = "content", ...){
4242

43-
warning("Deprecated, use textshape::tidy_list() instead.", call. = FALSE)
43+
warning(
44+
paste0(
45+
"Deprecated, use textshape::tidy_list() instead.\n`bind_list()` ",
46+
"will be removed in the next version."
47+
),
48+
call. = FALSE
49+
)
50+
4451

4552
if (is.data.frame(x[[1]])){
4653
bind_list_df(x = x, id.name = id.name)
@@ -60,7 +67,7 @@ bind_list_df <- function (x, id.name = "id"){
6067
if (is.null(names(x))) {
6168
names(x) <- seq_along(x)
6269
}
63-
list.names <- rep(names(x), sapply(x, nrow))
70+
list.names <- rep(names(x), sapply2(x, nrow))
6471
x <- lapply(x, data.table::as.data.table)
6572
x[['fill']] <- TRUE
6673
out <- data.frame(list.names, do.call(rbind, x),
@@ -74,7 +81,7 @@ bind_list_vector <- function(x, id.name= "id", content.name = "content"){
7481
names(x) <- seq_along(x)
7582
}
7683
dat <- data.frame(
77-
rep(names(x), sapply(x, length)),
84+
rep(names(x), sapply2(x, length)),
7885
unlist(x, use.names = FALSE),
7986
stringsAsFactors = FALSE,
8087
check.names = FALSE,

R/bind_table.R

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,16 @@
1818
#' }
1919
bind_table <- function(x, id.name= "id", content.name = "content", ...){
2020

21-
warning("Deprecated, use textshape::tidy_table() instead.", call. = FALSE)
21+
warning(
22+
paste0(
23+
"Deprecated, use textshape::tidy_table() instead.\n`bind_table()` ",
24+
"will be removed in the next version."
25+
),
26+
call. = FALSE
27+
)
2228

2329
stopifnot(is.table(x))
30+
2431
out <- data.table::data.table(x = names(x), y = unname(c(x)))
2532
data.table::setnames(out, c(id.name, content.name))
2633
out

R/bind_vector.R

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,16 @@
1818
#' }
1919
bind_vector <- function(x, id.name= "id", content.name = "content", ...){
2020

21-
warning("Deprecated, use textshape::tidy_vector() instead.", call. = FALSE)
21+
warning(
22+
paste0(
23+
"Deprecated, use textshape::tidy_vector() instead.\n`bind_vector()` ",
24+
"will be removed in the next version."
25+
),
26+
call. = FALSE
27+
)
2228

2329
stopifnot(is.atomic(x))
30+
2431
if (is.null(names)) {
2532
out <- data.table::as.data.table(x)
2633
data.table::setnames(out, id.name)

R/change_index.R

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#' Indexing of Changes in Runs
22
#'
3-
#' Find the indices of changes in runs in a vector. This function pairs well with
4-
#' \code{split_index} and is the default for the \code{indices} in all \code{split_index}
5-
#' functions that act on atomic vectors.
3+
#' Find the indices of changes in runs in a vector. This function pairs well
4+
#' with \code{split_index} and is the default for the \code{indices} in all
5+
#' \code{split_index} functions that act on atomic vectors.
66
#'
77
#' @param x A vector.
88
#' @param \ldots ignored.
9-
#' @return Returns a vector of integer indices of where a vector initially changes.
9+
#' @return Returns a vector of integer indices of where a vector initially
10+
#' changes.
1011
#' @export
1112
#' @seealso \code{\link[textshape]{split_index}}
1213
#' @examples

R/cluster_matrix.R

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
#' @param x A matrix.
66
#' @param dim The dimension to reorder (cluster); must be set to "row", "col",
77
#' or "both".
8-
#' @param method The agglomeration method to be used (see \code{\link[stats]{hclust}}).
8+
#' @param method The agglomeration method to be used (see
9+
#' \code{\link[stats]{hclust}}).
910
#' @param \ldots ignored.
1011
#' @return Returns a reordered matrix.
1112
#' @export
@@ -28,7 +29,12 @@
2829
#' scale_fill_viridis(name = expression(r[xy])) +
2930
#' theme(
3031
#' axis.text.y = element_text(size = 8) ,
31-
#' axis.text.x = element_text(size = 8, hjust = 1, vjust = 1, angle = 45),
32+
#' axis.text.x = element_text(
33+
#' size = 8,
34+
#' hjust = 1,
35+
#' vjust = 1,
36+
#' angle = 45
37+
#' ),
3238
#' legend.position = 'bottom',
3339
#' legend.key.height = grid::unit(.1, 'cm'),
3440
#' legend.key.width = grid::unit(.5, 'cm')
@@ -50,7 +56,12 @@
5056
#' scale_fill_viridis(name = expression(r[xy])) +
5157
#' theme(
5258
#' axis.text.y = element_text(size = 8) ,
53-
#' axis.text.x = element_text(size = 8, hjust = 1, vjust = 1, angle = 45),
59+
#' axis.text.x = element_text(
60+
#' size = 8,
61+
#' hjust = 1,
62+
#' vjust = 1,
63+
#' angle = 45
64+
#' ),
5465
#' legend.position = 'bottom',
5566
#' legend.key.height = grid::unit(.1, 'cm'),
5667
#' legend.key.width = grid::unit(.5, 'cm')

0 commit comments

Comments
 (0)