Skip to content

Commit a8ad00f

Browse files
tdhockToby Dylan Hocking
andauthored
melt doc fixes (#7400)
* typo of * nzchar() for consistency with vignette * switch ifelse yes no --------- Co-authored-by: Toby Dylan Hocking <[email protected]>
1 parent 681e0cb commit a8ad00f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

man/measure.Rd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ melt(who, measure.vars = measure(diagnosis, gender, ages, pattern="new_?(.*)_(.)
8383
print(melt(who, measure.vars = measure(
8484
diagnosis, gender, ages,
8585
ymin=as.numeric,
86-
ymax=function(y)ifelse(y=="", Inf, as.numeric(y)),
86+
ymax=function(y)ifelse(nzchar(y), as.numeric(y), Inf),
8787
pattern="new_?(.*)_(.)(([0-9]{2})([0-9]{0,2}))"
8888
)), class=TRUE)
8989
}

vignettes/datatable-reshape.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ melt(who, measure.vars = measure(
279279

280280
When using the `pattern` argument, it must be a Perl-compatible
281281
regular expression containing the same number of capture groups
282-
(parenthesized sub-expressions) as the number other arguments (group
282+
(parenthesized sub-expressions) as the number of other arguments (group
283283
names). The code below shows how to use a more complex regex with five
284284
groups, two numeric output columns, and an anonymous type conversion
285285
function,

0 commit comments

Comments
 (0)