Skip to content

Commit 2afdd7c

Browse files
committed
prepare for CRAN
1 parent 20a9831 commit 2afdd7c

27 files changed

+88
-74
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Package: wrapr
22
Type: Package
33
Title: Wrap R Tools for Debugging and Parametric Programming
44
Version: 1.5.1
5-
Date: 2018-07-04
5+
Date: 2018-07-07
66
Authors@R: c(
77
person("John", "Mount", email = "[email protected]", role = c("aut", "cre")),
88
person("Nina", "Zumel", email = "[email protected]", role = c("aut")),

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# wrapr 1.5.1 2018-07-04
2+
# wrapr 1.5.1 2018-07-07
33

44
* make pipe_impl public (but keyworld internal).
55
* fix draw_frame quoting.

R/cf.R

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ build_frame <- function(..., cf_eval_environment = parent.frame()) {
172172
#' print(x)
173173
#' cat(draw_frame(x))
174174
#'
175+
#'
175176
#' @export
176177
#'
177178
draw_frame <- function(x,
@@ -192,22 +193,30 @@ draw_frame <- function(x,
192193
preserve.width = "individual",
193194
zero.print = NULL,
194195
drop0trailing = FALSE)
196+
x_s <- substitute(x)
195197
for(oi in names(formatC_options)) {
196198
formatC_args[[oi]] <- formatC_options[[oi]]
197199
}
200+
if(!is.data.frame(x)) {
201+
stop("draw_frame x needs to be a data.frame")
202+
}
198203
nrow <- nrow(x)
199204
if(nrow<1) {
200-
stop("draw_frame need at least 1 row")
205+
stop("draw_frame x needs at least 1 row")
201206
}
202207
ncol <- ncol(x)
203208
if(ncol<1) {
204-
stop("draw_frame need at least 1 column")
209+
stop("draw_frame x needs at least 1 column")
205210
}
206211
# convert to character matrix
207212
xq <- x
208213
qts <- function(v) {
209-
# could also try capturing dput() output
210-
shQuote(v)
214+
# wayts to quote: dput(), shQuote(), deparse()
215+
vapply(as.character(v),
216+
function(vi) {
217+
deparse(vi)
218+
},
219+
character(1))
211220
}
212221
for(ci in colnames(x)) {
213222
if("POSIXt" %in% class(x[[ci]])) {
@@ -272,6 +281,9 @@ draw_frame <- function(x,
272281
rlist <- paste0(" ", rlist)
273282
res <- paste(rlist, collapse = "\n")
274283
res <- paste0("wrapr::build_frame(\n", res, "\n")
284+
if(is.name(x_s)) {
285+
res <- paste0(as.character(x_s), " <- ", res)
286+
}
275287
res
276288
}
277289

cran-comments.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
## Test environments
44

55
* Windows
6+
* using R Under development (unstable) (2018-07-01 r74950)
7+
* using platform: x86_64-w64-mingw32 (64-bit)
68

79
* OSX
810
* using R version 3.5.0 (2018-04-23)
@@ -15,11 +17,9 @@
1517
* checking extension type ... Package
1618
* this is package ‘wrapr’ version ‘1.5.1’
1719
* package encoding: UTF-8
18-
* checking CRAN incoming feasibility ... NOTE
20+
* checking CRAN incoming feasibility ... Note_to_CRAN_maintainers
1921
Maintainer: ‘John Mount <[email protected]>
20-
21-
Number of updates in past 6 months: 7
22-
Status: 1 NOTE
22+
Status: OK
2323

2424
## Downstream dependencies
2525

docs/articles/CornerCases.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/articles/DebugFnW.html

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/articles/FrameTools.html

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/articles/Named_Arguments.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/articles/SubstitutionModes.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/articles/dot_pipe.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)