Search code examples
rsavesharingdput

Using large dput output


I have a dataframe I want to share using dput. I want all of it and not just some of it.

When I use dput(), the result is so big that it does not all fit in the Rstudio Console.

I tried assigning the dput to a variable and saving that variable as a txt file but it did not work, the txt file was made of unreadable characters.

Does anyone know a way of copying the whole length of a dput eventhough it's huge so that I can then share it on here with a google doc link or whatever ?


Solution

  • You are looking for dump().

    try:

    dump("iris", "iris.txt")