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 consult the current selection on RStudio Cloud #369

Closed
23ava opened this issue Mar 20, 2021 · 1 comment
Closed

Reprex does not consult the current selection on RStudio Cloud #369

23ava opened this issue Mar 20, 2021 · 1 comment

Comments

@23ava
Copy link

23ava commented Mar 20, 2021

I would like to use reprex on RStudio Cloud

The reprex manual says:

When the clipboard is structurally unavailable, e.g., on RStudio
Server or RStudio Cloud, reprex() consults the current selection
instead of the clipboard

However, when I select my code in the script on RStudio Cloud and type reprex::reprex() in the console I get the following message:

No user-supplied code found … so we’ve made some up. You’re welcome!

``` r
sprintf("Happy %s!", weekdays(Sys.Date()))
#> [1] "Happy Thursday!"
```

<sup>Created on 2021-03-18 by the [reprex package](https://reprex.tidyverse.org) (v1.0.0)</sup>

I get following error in the console if I copy the code into the clipboard and/or select it the script:

    > reprex::reprex()

    ! No input provided and clipboard is not available.

`reprex({rnorm(10)])` works

I originally posted this question here

Thank you for your help!

@jennybc
Copy link
Member

jennybc commented Mar 20, 2021

This is a feature of dev reprex, so it is not yet on CRAN. Therefore, I suspect this is a version issue. (The pkgdown site reflects dev capabilities.)

I will release these features to CRAN reprex soon.

@jennybc jennybc closed this as completed Apr 2, 2021
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