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, ...)
?
In RStudio, click File -> New File -> R Script (or Ctrl+Shift+N) to create a script, which you can save like a text file. Copy-paste all your code into that and click Ctrl+A (to select all lines) and Ctrl+R to run all at once.
With dput
:
x =runif(5)
dput(x)
c(0.634340619435534, 0.833359521813691, 0.4804580679629, 0.119585362030193,
0.379494784167036)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With