8

I have a vector I'd like to copy paste into code to be able to produce a minimal working example.

Problem is, when I try to print the vector it produces output like

> head(residuals_list)
            1         2         3         4         5         6
    0.1833777 7.1833777 1.1833777 4.1833777 5.1833777 0.1833777

How do I get r to print c(0.1833777, 7.1833777, ...)?

The Unfun Cat
  • 29,987
  • 31
  • 114
  • 156

2 Answers2

29

With dput :

x =runif(5)
dput(x)

c(0.634340619435534, 0.833359521813691, 0.4804580679629, 0.119585362030193, 
0.379494784167036)
Victorp
  • 13,636
  • 2
  • 51
  • 55
0

Try str(residuals_list) to get a string version of the object

sharoz
  • 6,157
  • 7
  • 31
  • 57