Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your chief concern seems to be making a reproducible example, so, in light of that, there are a couple solutions that come to mind.</p> <p>The first is to use <code>write.table</code>:</p> <pre><code>&gt; write.table(iris, row.names=F) "Sepal.Length" "Sepal.Width" "Petal.Length" "Petal.Width" "Species" 5.1 3.5 1.4 0.2 "setosa" 4.9 3 1.4 0.2 "setosa" 4.7 3.2 1.3 0.2 "setosa" </code></pre> <p>The second is to use <code>dput</code>:</p> <pre><code>&gt; dput(iris[1:2, ]) structure(list(Sepal.Length = c(5.1, 4.9), Sepal.Width = c(3.5, 3), Petal.Length = c(1.4, 1.4), Petal.Width = c(0.2, 0.2), Species = structure(c(1L, 1L), .Label = c("setosa", "versicolor", "virginica"), class = "factor")), .Names = c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", "Species"), row.names = 1:2, class = "data.frame") </code></pre> <p>Someone on StackOverflow could copy this output and assign it to a name:</p> <pre><code>&gt; my.data &lt;- structure(list(Sepal.Length = c(5.1, 4.9), Sepal.Width = c(3.5, 3), Petal.Length = c(1.4, 1.4), Petal.Width = c(0.2, 0.2), Species = structure(c(1L, 1L), .Label = c("setosa", "versicolor", "virginica"), class = "factor")), .Names = c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", "Species"), row.names = 1:2, class = "data.frame") &gt; my.data Sepal.Length Sepal.Width Petal.Length Petal.Width Species 1 5.1 3.5 1.4 0.2 setosa 2 4.9 3.0 1.4 0.2 setosa </code></pre> <p>You should probably take a look at this question: <a href="https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example">How to make a great R reproducible example?</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload