Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reprex does not allow invalid whitespace? #137

Closed
pgensler opened this issue Nov 20, 2017 · 1 comment
Closed

reprex does not allow invalid whitespace? #137

pgensler opened this issue Nov 20, 2017 · 1 comment

Comments

@pgensler
Copy link

This dataframe will not render properly in a reprex, the encoding is UTF-8, not "unknown"

image

which results in this reprex:

x <- tibble::tribble(
  ~id,                                                                                           ~value,
  390639,  "RATINGS: 4   MEAN: 3.83/5.0   WEIGHTED AVG: 3.39/5   IBU: 35   EST. CALORIES: 204   ABV: 6.8%",
  99472,                           "RATINGS: 89   WEIGHTED AVG: 3.64/5   EST. CALORIES: 188   ABV: 6.25%",
  361258,   "RATINGS: 8   MEAN: 3.7/5.0   WEIGHTED AVG: 3.45/5   IBU: 85   EST. CALORIES: 213   ABV: 7.1%"
)
#Returns UTF-8
Encoding(x$value)
#> [1] "unknown" "unknown" "unknown"

Is there a preferred way of sharing data like this? GitHub gists won't preserve this with the whitespace missing (indicated by the red space in RStudio).

@jennybc
Copy link
Member

jennybc commented Nov 20, 2017

This seems related to an issue I opened on knitr: yihui/knitr#1415. Is your issue about the incorrect reporting of encoding, i.e. the "unknown"'s? It seems so, i.e. the reprex looks ok. If so, then I think there's nothing I can do here in reprex, which essentially puts code into a template and submits to knitr.

@jennybc jennybc closed this as completed Jan 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants