Talk:Introducing Julia/DataFrames

In the section Plotting Anscombe's Quartet, I run the code block beginning with using StatsPlots

I get this error ERROR: LoadError: UndefVarError: select not defined

this is my environment

baa@comp:~/Desktop $ date -u Sun 12 Apr 2020 01:14:39 PM UTC

baa@comp:~/Desktop $ uname -a Linux comp 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11) x86_64 GNU/Linux

baa@comp:~/Desktop $ julia --version julia version 1.4.0

baa@comp:~/Desktop $ julia -q (@v1.4) pkg> status Status `~/.julia/environments/v1.4/Project.toml` [336ed68f] CSV v0.6.1 [5a033b19] CurveFit v0.3.2 [a93c6f00] DataFrames v0.20.2 [7073ff75] IJulia v1.21.1 [d330b81b] PyPlot v2.9.0 [f3b207a7] StatsPlots v0.12.0 [24249f21] SymPy v1.0.18 [1986cc42] Unitful v1.0.0

Can anyone say what this error message means and/or how to correct it?

B A Andersen (discuss • contribs) 13:42, 12 April 2020 (UTC)

Hi there! This code works for me: using DataFrames anscombe = DataFrame(                    [10  10  10  8   8.04   9.14  7.46   6.58;         8   8   8   8   6.95   8.14  6.77   5.76;        13  13  13  8   7.58   8.74  12.74  7.71;        9   9   9   8   8.81   8.77  7.11   8.84;        11  11  11  8   8.33   9.26  7.81   8.47;        14  14  14  8   9.96   8.1   8.84   7.04;        6   6   6   8   7.24   6.13  6.08   5.25;        4   4   4   19  4.26   3.1   5.39   12.5;        12  12  12  8   10.84  9.13  8.15   5.56;        7   7   7   8   4.82   7.26  6.42   7.91;        5   5   5   8   5.68   4.74  5.73   6.89]);

names!(anscombe, [Symbol.(:X, 1:4); Symbol.(:Y, 1:4)])

using StatsPlots

@df anscombe scatter([:X1 :X2 :X3 :X4], [:Y1 :Y2 :Y3 :Y4],              smooth=true,               line = :red,               linewidth = 2,               title= ["X$i vs Y$i" for i in (1:4)'],               legend = false,               layout = 4,               xlimits = (2, 20),               ylimits = (2, 14))

The only package version difference I can see is that I've got StatsPlots v0.14.4... Cormullion (discuss • contribs) 14:07, 12 April 2020 (UTC)

@Cormullion Thanks. I updated and it works. Now I can continue the tutorial. I foolishly assumed that because I installed the package today then I would have the latest version. B A Andersen (discuss • contribs)