TidierOrg / Tidier.jl

Meta-package for data analysis in Julia, modeled after the R tidyverse.
MIT License
524 stars 14 forks source link

Example not Working #111

Closed stensmo closed 1 year ago

stensmo commented 1 year ago

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

kdpsingh commented 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?

stensmo commented 1 year ago

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

stensmo commented 1 year ago

After restarting Julia it works

kdpsingh commented 1 year ago

Glad to hear! Will close this issue.