# Using RNode in RDataFrame

**URL:** <https://root-forum.cern.ch/t/using-rnode-in-rdataframe/32320>\
**Category:** ROOT\
**Tags:** rdataframe\
**Created:** [January 16, 2019, 4:26pm UTC](https://root-forum.cern.ch/t/using-rnode-in-rdataframe/32320 "2019-01-16T16:26:04Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [January 17, 2019, 9:56am UTC](https://root-forum.cern.ch/t/using-rnode-in-rdataframe/32320/4 "2019-01-17T09:56:21Z")

</div>

Hi,  
note that there is no more recent _release_ of ROOT (for now: v6.16 is coming soon, with all the RNode goodness). But you can get a nightly build of ROOT master branch from the LCG releases on cmvs, if it’s available on your cluster: `source /cvmfs/sft-nightlies.cern.ch/lcg/views/dev3/latest/x86_64-slc6-gcc7-opt/setup.sh` – they are _kind of_ stable, ok to use most of the time.

Otherwise, depending on what you actually need to do with RNode, you can use a template function instead.  
With C++14 auto return types it’s pretty straightforward:

```auto
// c++14
template <typename RDF_t>
auto AddFilter(RDF_t node, string_view filterStr)
 {
    return node.Filter(filterStr);
 }

```

This becomes more awkward in C++11, where we have to specify the return type somehow (trailing return types to the rescue):

```auto
// c++11
template <typename RDF_t>
auto AddFilter(RDF_t node, string_view filterStr) -> decltype(node.Filter(filterStr))
 {
    return node.Filter(filterStr);
 }

```

Feel free to ask if you encounter any further problems.  
Cheers,  
Enrico

---

_[View the full topic](https://root-forum.cern.ch/t/using-rnode-in-rdataframe/32320)._
