7

Specifically i am trying to create a reproducible example with a data.frame of [1376,6] dimensions using dput() but run out of space in the output window to copy and paste the results.

Is there a way of increasing the buffer size of the output window OR Could anyone suggest an alternative method here ?

Thanks

Barry

barryq
  • 185
  • 1
  • 1
  • 8
  • save to txt file and upload that to google drive, dropbox, etc. post link to file. – Ricardo Saporta Nov 30 '12 at 07:23
  • 3
    Some other possibilities: Take the top 20 or 30 rows with `dput(head(dat, n=20))`. Randomly sample the rows with `dput(dat[sample(1:nrow(dat), 30, replace=FALSE), ])`. Build an entirely made up data.frame with functions like `rnorm`, `rpois`, `sample`, `rep`, `seq`, etc. – bdemarest Nov 30 '12 at 07:35

1 Answers1

11

You can always write the result of dput to a file:

dput(rnorm(20), 'test.txt')

See ?dput for details.

Thilo
  • 8,827
  • 2
  • 35
  • 56
  • 1
    I require the complete dataframe to be used in the reproducible example as the issue is R is hanging in a monte carlo simulation so i think writing to a text file and dropboxing is my best solution. Many thanks for all the good suggestions though. – barryq Nov 30 '12 at 07:54