Rendering reprex error...

I installed reprex 0.2.0 from Cran. I have this code in an r.script

x <- factor("a")
y <- factor("b")
c(x,y)

When I attempt the "Render reprex" selection from the Addins toolbar whether I choose the reprex source "on the clipboard" or "current selection" and choose any of the Target venue's (GitHub, Stack Overflow or R Scipt)

I get the following error:

Rendering reprex...
Error in process_initialize(self, private, command, args, stdout, stderr, :
Command not found

If I choose the "Reprex selection" option of the addins menu I get an R code execution error

image

I removed the package and then tried to reinstall using
devtools::install_github("tidyverse/reprex")

However I received this message
"Installation failed: Command failed (1)"

I currently have RStudio V1.1463 installed. Is this package still available?

Yes, it is definitely still available.

The dev version is still available, too, but let's try troubleshooting your first error with the CRAN version first. You can reinstall reprex with install.packages("reprex"). For good measure, why don't you install it with:

install.packages("reprex", dependencies = TRUE)

The error that you're getting,

#> Error in process_initialize(self, private, command, args, stdout, stderr…

seems to be coming from processx, and was implemented in these cases:

What happens if you copy code to your clipboard and render a reprex by running reprex::reprex() in the console?

Also, what operating system are you on?

Wow! Thank you everyone for such a prompt response. Much appreciated.

  • Response:
  1. In answer to Mara, I tried install.packages("reprex", dependencies = "TRUE") but was greeted with this error: "Error in install.packages : subscript out of bounds"
  2. Gabor, if I if copy code to your clipboard and render a reprex by running reprex::reprex() in the console, I get the "Error in process_initialize(self, private, command, args, stdout, stderr, : Command not found" error. Also, I my O/S is Windows 10

Sorry, my bad! It should be dependencies = TRUE (logical, not the string, "TRUE").

My bad too Mara. I should have caught that too. It did install but I am still getting the same error(s). Drat.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.