Skip to content

Commit b08c2b0

Browse files
authored
Merge pull request #94 from TidierOrg/fix-to-n-in-mutate
Bumped version to 0.15.1. `n()` pulls a single value and not a vector of values.`rand()` is no longer auto-vectorized.
2 parents 5122587 + 7db27e5 commit b08c2b0

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# TidierData.jl updates
22

3+
## v0.15.1 - 2024-03-08
4+
- Bugfix: `n()` pulls a single value and not a vector of values
5+
- `rand()` is no longer auto-vectorized
6+
37
## v0.15.0 - 2024-02-25
48
- Add support for `begin-end` blocks for all macros accepting multiple expressions
59
- Bug fix to add support for expressions inside of `@group_by()`, as in `@group_by(b = a + 1)`

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "TidierData"
22
uuid = "fe2206b3-d496-4ee9-a338-6a095c4ece80"
33
authors = ["Karandeep Singh"]
4-
version = "0.15.0"
4+
version = "0.15.1"
55

66
[deps]
77
Chain = "8be319e6-bccf-4806-a6f7-6fae938471bc"

src/TidierData.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ const code = Ref{Bool}(false) # output DataFrames.jl code?
2828
const log = Ref{Bool}(false) # output tidylog output? (not yet implemented)
2929

3030
# The global do-not-vectorize "list"
31-
const not_vectorized = Ref{Vector{Symbol}}([:esc, :Ref, :Set, :Cols, :collect, :(:), :, :lag, :lead, :ntile, :repeat, :across, :desc, :mean, :std, :var, :median, :first, :last, :minimum, :maximum, :sum, :length, :skipmissing, :quantile, :passmissing, :cumsum, :cumprod, :accumulate, :is_float, :is_integer, :is_string, :cat_rev, :cat_relevel, :cat_infreq, :cat_lump, :cat_reorder, :cat_collapse, :cat_lump_min, :cat_lump_prop, :categorical, :as_categorical, :is_categorical])
31+
const not_vectorized = Ref{Vector{Symbol}}([:getindex, :rand, :esc, :Ref, :Set, :Cols, :collect, :(:), :, :lag, :lead, :ntile, :repeat, :across, :desc, :mean, :std, :var, :median, :first, :last, :minimum, :maximum, :sum, :length, :skipmissing, :quantile, :passmissing, :cumsum, :cumprod, :accumulate, :is_float, :is_integer, :is_string, :cat_rev, :cat_relevel, :cat_infreq, :cat_lump, :cat_reorder, :cat_collapse, :cat_lump_min, :cat_lump_prop, :categorical, :as_categorical, :is_categorical])
3232

3333
# The global do-not-escape "list"
3434
# `in`, `∈`, and `∉` should be vectorized in auto-vec but not escaped
35-
const not_escaped = Ref{Vector{Symbol}}([:where, :esc, :in, :, :, :Ref, :Set, :Cols, :collect, :(:), :, :(=>), :across, :desc, :mean, :std, :var, :median, :first, :last, :minimum, :maximum, :sum, :length, :skipmissing, :quantile, :passmissing, :startswith, :contains, :endswith])
35+
const not_escaped = Ref{Vector{Symbol}}([:n, :row_number, :where, :esc, :in, :, :, :Ref, :Set, :Cols, :collect, :(:), :, :(=>), :across, :desc, :mean, :std, :var, :median, :first, :last, :minimum, :maximum, :sum, :length, :skipmissing, :quantile, :passmissing, :startswith, :contains, :endswith])
3636

3737
# Includes
3838
include("docstrings.jl")

src/parsing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ function parse_interpolation(var_expr::Union{Expr,Symbol,Number,String};
446446
return :end
447447
else
448448
found_n = true # do not move this -- this leads to creation of new column
449-
return :TidierData_n
449+
return :(getindex(TidierData_n, 1))
450450
end
451451
elseif fn == :row_number
452452
found_row_number = true

0 commit comments

Comments
 (0)