RROR: UndefVarError: insertcolafter not defined in JuliaDB

I am using Julia 1.5 in windows 10. I am just reading and practicing JuliaDB

> t = table([0.01, 0.05], [2,1], [3,4], names=[:t, :x, :y], pkey=:t)
> 
> insertcolafter(t, :t, :w, [0,1])
> ERROR: UndefVarError: insertcolafter not defined
> Stacktrace:
>  [1] top-level scope at REPL[215]:1
>  [2] include_string(::Function, ::Module, ::String, ::String) at .\loading.jl:1088

I don’t know why I am getting this error, I am getting the same error for the “insertcol”

julia> using JuliaDB

julia> t = table([0.01, 0.05], [2,1], [3,4], names=[:t, :x, :y], pkey=:t)
Table with 2 rows, 3 columns:
t     x  y
──────────
0.01  2  3
0.05  1  4

julia> insertcolsafter(t, :t, :w => [0,1])
Table with 2 rows, 4 columns:
t     w  x  y
─────────────
0.01  0  2  3
0.05  1  1  4

Slightly wrong syntax. You may always have a look with:

help?> insertcolsafter
search: insertcolsafter

  insertcolsafter(t, after, map::Pair...)

  For each pair name => col in map, insert a column col named name after after. Returns a new table.

  Example
  ≡≡≡≡≡≡≡≡≡

  t = table([0.01, 0.05], [2,1], [3,4], names=[:t, :x, :y], pkey=:t)
  insertcolsafter(t, :t, :w => [0,1])

pressing ? and using TAB completion is of great help here.

thank you so much .

1 Like