datapasta icon indicating copy to clipboard operation
datapasta copied to clipboard

dmdclip() does not paste as markdown

Open dholstius opened this issue 4 years ago • 1 comments

The example given in the intro:

iris %>%
     head() %>%
     dmdclip()

results in this:

data.frame(
  Sepal.Length = c(5.1, 4.9, 4.7, 4.6, 5, 5.4),
   Sepal.Width = c(3.5, 3, 3.2, 3.1, 3.6, 3.9),
  Petal.Length = c(1.4, 1.4, 1.3, 1.5, 1.4, 1.7),
   Petal.Width = c(0.2, 0.2, 0.2, 0.2, 0.2, 0.4),
           Species = as.factor(c("setosa",
                                 "setosa","setosa","setosa","setosa","setosa"))
    )

... rather than markdown-formatted output.

dholstius avatar Sep 12 '19 20:09 dholstius

It's not meant to be a markdown table, it's meant to have extra indentation so that it is parsed as block, which I think has worked correctly here. This is handy if you paste a lot of these into stack overflow.

I fully appreciate that the description of the function could be misleading, sorry.

MilesMcBain avatar Dec 04 '19 11:12 MilesMcBain