Closed stensmo closed 1 year ago
Tidier doesn’t require DataFramesMeta to be installed so I’m not sure why that would be the case. Additionally, Tidier re-exports the @chain
macro directly from Chain.jl so you shouldn’t need to grab the macro using DataFramesMeta.
I notice that the M
in @mutate
is capitalized. Is that the cause of the error?
Can you share what error you are getting?
julia> movies = dataset("ggplot2", "movies");
julia>
julia> @chain movies begin
@mutate(Budget = Budget / 1_000_000)
@filter(Budget >= mean(skipmissing(Budget)))
@select(Title, Budget)
@slice(1:5)
end
ERROR: LoadError: UndefVarError: @chain
not defined
in expression starting at REPL[5]:1
After restarting Julia it works
Glad to hear! Will close this issue.
In the example below, using a fresh install (no DataFramesMeta package), I had to install DataFramesMeta and then add: import DataFramesMeta.Chain
using Tidier using RDatasets
movies = dataset("ggplot2", "movies");
@chain movies begin @mutate(Budget = Budget / 1_000_000) @filter(Budget >= mean(skipmissing(Budget))) @select(Title, Budget) @slice(1:5) end