# Result of the snippet node

**URL:** <https://forum.knime.com/t/result-of-the-snippet-node/33056>\
**Category:** KNIME Extensions\
**Tags:** scripting\
**Created:** [May 19, 2021, 9:41pm UTC](https://forum.knime.com/t/result-of-the-snippet-node/33056 "2021-05-19T21:41:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gfranco2021](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/g/dbc845/32.png) [@Gfranco2021](https://forum.knime.com/u/Gfranco2021)\
**Post date:** [May 19, 2021, 9:41pm UTC](https://forum.knime.com/t/result-of-the-snippet-node/33056/1 "2021-05-19T21:41:20Z")

</div>

How to create a table from the result of the snippet node “R Std Output”?

Regards

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [May 20, 2021, 8:04am UTC](https://forum.knime.com/t/result-of-the-snippet-node/33056/2 "2021-05-20T08:04:32Z")

</div>

@Gfranco2021 welcome to the KNIME forum

Could you specify what what node you are dealing with. I have some [R examples](https://hub.knime.com/search?q=knime_example_r&type=Workflow) on the [KNIME hub](https://hub.knime.com/site/about) so you could try to check them out or maybe give us more details.

> **[Basic R Usage – mark\_ortmann](https://hub.knime.com/knime/spaces/Examples/latest/07_Scripting/02_R/01_Example_of_R_Snippet~lc8PFcTAmnlC2rsE)**
>
> Here it is demonstrated how different R nodes are used together. The data is read via the R Source node and afterwards different R nodes are applied.

> **[use R and KNIME to make a random forest – mlauber71](https://hub.knime.com/mlauber71/spaces/Public/latest/kn_example_r_iris~BEc4mEVyO07SDveM)**
>
> Simple example to make a random forest model with R in KNIME using the iris dataset. And saving an reusing the model with PMML

If you start with R and KNIME there is the [official guide](https://docs.knime.com/latest/r_installation_guide/index.html) that could help you and I also have a [collection about more advanced issues](https://hub.knime.com/mlauber71/spaces/Public/latest/_r_installation_on_knime_collection~tj5tS_6gYvqOSPlk#externalresources) and problems that might occur.

---

<div class="post-metadata">

**Author:** ![Gfranco2021](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/g/dbc845/32.png) [@Gfranco2021](https://forum.knime.com/u/Gfranco2021)\
**Post date:** [May 24, 2021, 4:34pm UTC](https://forum.knime.com/t/result-of-the-snippet-node/33056/3 "2021-05-24T16:34:44Z")

</div>

Hello, I’m trying to do it from the same R snippet node, with the code “knime.out ← data.frame (knime.stdout)”.

However, I get complicated when separating the columns and rows.

I share the image of the result that I want to pass to a table automatically:

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/3/1/3173a8d23f219aa68cdfeaa4ac9801213357e1e2.png)

Regards

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [May 24, 2021, 5:22pm UTC](https://forum.knime.com/t/result-of-the-snippet-node/33056/4 "2021-05-24T17:22:01Z")

</div>

only idea I could derive from this information is that you might have to use

`as.data.frame(<your r data>)`

Otherwise you might want to provide us with more details maybe [an example](https://forum.knime.com/t/reproducible-minimal-workflow-example/24482) of a log file.

---

<div class="post-metadata">

**Author:** ![Gfranco2021](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/g/dbc845/32.png) [@Gfranco2021](https://forum.knime.com/u/Gfranco2021)\
**Post date:** [May 25, 2021, 7:10pm UTC](https://forum.knime.com/t/result-of-the-snippet-node/33056/5 "2021-05-25T19:10:00Z")

</div>

Hi, I share a hypothetical example.

[01\_Example\_of\_R\_Snippet v1.knwf](https://forum.knime.com/uploads/short-url/rgYfF6czVwiodkVbXCbIZJGQ5H1.knwf) (7.8 KB)

Regards,

---

<div class="post-metadata">

**Author:** ![Gfranco2021](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/g/dbc845/32.png) [@Gfranco2021](https://forum.knime.com/u/Gfranco2021)\
**Post date:** [May 25, 2021, 8:38pm UTC](https://forum.knime.com/t/result-of-the-snippet-node/33056/6 "2021-05-25T20:38:57Z")

</div>

mlauber,

this is the result that I want to display in table format

![image](https://forum-cdn.knime.com/uploads/default/original/3X/4/8/4807b921ee05f4a5bccb60ac1381a94670555628.png)

regards,

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [May 26, 2021, 4:40pm UTC](https://forum.knime.com/t/result-of-the-snippet-node/33056/7 "2021-05-26T16:40:54Z")

</div>

@Gfranco2021 you could easily convert the “nov1” to the dataset you want. The matrix “nov” would need some more converting though

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/8/7/870345c7b9c4a5684cb89f6e112457a03e9f87bd.jpeg)

> **[Basic R Usage – mlauber71](https://hub.knime.com/mlauber71/spaces/Forum/latest/2021/kn_forum_33056_r_matrix_to_table~Ws9nv2M0goOHcQHp)**
>
> Here it is demonstrated how different R nodes are used together. The data is read via the R Source node and afterwards different R nodes are applied.

---

<div class="post-metadata">

**Author:** ![Gfranco2021](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/g/dbc845/32.png) [@Gfranco2021](https://forum.knime.com/u/Gfranco2021)\
**Post date:** [May 26, 2021, 6:00pm UTC](https://forum.knime.com/t/result-of-the-snippet-node/33056/8 "2021-05-26T18:00:49Z")

</div>

Hi mlauber71,

Excellent, thank you very much.

Regards,

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [June 2, 2021, 6:00pm UTC](https://forum.knime.com/t/result-of-the-snippet-node/33056/9 "2021-06-02T18:00:53Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
