# how to import tables from .docx documents via R snippet

**URL:** <https://forum.knime.com/t/how-to-import-tables-from-docx-documents-via-r-snippet/19284>\
**Category:** KNIME Extensions\
**Tags:** text-processing\
**Created:** [November 6, 2019, 2:44pm UTC](https://forum.knime.com/t/how-to-import-tables-from-docx-documents-via-r-snippet/19284 "2019-11-06T14:44:40Z")\
**Posts on this page:** 1\
**Showing post:** 8

<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:** [November 10, 2019, 11:34am UTC](https://forum.knime.com/t/how-to-import-tables-from-docx-documents-via-r-snippet/19284/8 "2019-11-10T11:34:50Z")

</div>

First thing would be to make sure R does function at all. I wrote a lengthy piece about that; maybe you could check it out.

> [@Install R alongside KNIME on Windows and MacOS](https://forum.knime.com/t/install-r-alongside-knime-on-windows-and-macos/13287):
>
> Over the last months I have collected a few entries about the installation of [R](https://www.r-project.org) alongside KNIME that contain some maybe useful hints how to overcome certain obstacles while installing them. I want to bring them together here. (If you are looking for a basic guide about how to install R in the first place you might look [here](https://medium.com/@GalarnykMichael/install-r-and-rstudio-on-windows-5f503f708027) or [here](https://www.dummies.com/programming/r/how-to-install-r/)). A few maybe unnecessary remarks upfront. Yes it takes some effort to get KNIME and R up and running but in the end you will be rewarded with the whole world of pos…

The about .rds and .RData. With ads you can store a single object from R and later reload it, that is what I used to store the tibble object (“datalist”) and reload it in the second R Snippet. RData stores the whole active environment (save.image() and load()). I deactivated some lines with hashtags (´#´) that are not currently needed you can reactivate them by removing the hashtags.

With getwd() and setwd() you set the working directory of R. By default that is on a user’s space somewhere and you ca see it by getwd(). In this case I used the folder of the KNIME workflow. But you might change that.

> [@jjdata](#):
>
> # big\_data = do.call(rbind, datalist)

This would transfer all the collected tables from the docx into a single table but since the structure is different that will not work in this case.

---

_[View the full topic](https://forum.knime.com/t/how-to-import-tables-from-docx-documents-via-r-snippet/19284)._
