Skip to content

Commit

Permalink
Fixed more variable package access references
Browse files Browse the repository at this point in the history
  • Loading branch information
Symbolics committed Nov 19, 2021
1 parent b7f582f commit 6ea4d26
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions content/en/docs/Tasks/data-frame.md
Expand Up @@ -1043,7 +1043,7 @@ function. Using the `mtcars-small` data frame, defined in [export data
frames](/docs/tasks/data-frame/#export-data-frames) above:

```lisp
(column mtcars-small 'mpg)
(column mtcars-small 'mtcars:mpg)
;; #(21 21 22.8d0 21.4d0 18.7d0)
```

Expand All @@ -1068,7 +1068,7 @@ To get all the columns as a vector, use the `columns` function:
You can also return a subset of the columns by passing in a selection:

```lisp
(columns mtcars-small '(mpg wt))
(columns mtcars-small '(mtcars:mpg mtcars:wt))
;; #(#(21 21 22.8d0 21.4d0 18.7d0) #(2.62d0 2.875d0 2.32d0 3.215d0 3.44d0))
```

Expand Down Expand Up @@ -1529,10 +1529,18 @@ condition. For example if you want to know how many cars have a MPG
(miles-per-galleon) rating greater than 20, you could use:

```lisp
(count-rows mtcars 'mpg #'(lambda (x) (< 20 x)))
(use-package 'mtcars)
(count-rows mtcars 'mtcars:mpg #'(lambda (x) (< 20 x)))
; => 14
```

Notice the first line `(use-package 'mtcars)`. This makes all of the
symbols that name variables accessible in the LS-USER package. For
large projects, you might want to configure the data frame package,
for example importing `CL` and doing your work from there. This is
mostly useful when you have several large, complicated datasets and
want to work with all of them at the REPL.

### do-rows

`do-rows` applies a function on selected variables. The function must
Expand Down

0 comments on commit 6ea4d26

Please sign in to comment.