Skip to content

Commit 12b3eb5

Browse files
committed
[skip-ci][df] Fix rdf example in the documentation.
1 parent 9894b7a commit 12b3eb5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tree/dataframe/src/RDataFrame.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,10 +410,10 @@ Previously, when showing the different ways an RDataFrame can be created, we sho
410410
number of entries as a parameter. In the following example we show how to combine such an "empty" RDataFrame with Define()
411411
transformations to create a dataset on the fly. We then save the generated data on disk using the Snapshot() action.
412412
~~~{.cpp}
413-
RDataFrame d(100); // an RDF that will generate 100 entries (currently empty)
413+
ROOT::RDataFrame d(100); // an RDF that will generate 100 entries (currently empty)
414414
int x = -1;
415-
auto d_with_columns = d.Define("x", [&x] { return ++x; })
416-
.Define("xx", [&x] { return x*x; });
415+
auto d_with_columns = d.Define("x", []()->int { return ++x; })
416+
.Define("xx", []()->int { return x*x; });
417417
d_with_columns.Snapshot("myNewTree", "newfile.root");
418418
~~~
419419
This example is slightly more advanced than what we have seen so far. First, it makes use of lambda captures (a

0 commit comments

Comments
 (0)