ns am brand-new to R programming and I acquired hit v this error as soon as I tried to run the code. This just creates a pie chart with some data. Can anyone describe to me why ns am gaining this error and what the means?

1) ns am running windows2) version 3.4.03) ns am using RGui desktop4) R version 3.4.0

# produce data because that the graph.x

*

What carry out you acquire when you execute dev.cur() ~ pie(...)? and also have girlfriend tried come close R and open it again and also then run the code? does the error persist?
*

I had this situation and also resolved that by running the following 2 or 3 times:

dev.set(dev.next())The console should at some point spit out:

quartz_off_screen 3Once you see this, the plots will render.

P.S. You have the right to probably use dev.set(dev.prev()) in the same way.

You are watching: Error in dev.off() : cannot shut down device 1 (the null device)


*

*

In my situation the factor for the error was likewise quite silly. In situation anyone runs right into the same issue...

dev.offwill result in:

function (which = dev.cur()) if (which == 1) stop("cannot closeup of the door down an equipment 1 (the null device)") .External(C_devoff, as.integer(which)) dev.cur()Do not forget the function brackets:

dev.off()

*

Turns out that the only difficulty with this was through where the file was do the efforts to save to. I altered the code to save to a different directory and also it functioned fine


When I had this issue, i was attempting to operation dev_off() also with an attempted record being created from the Rchunk ns was dealing with. To fix it, ns highlighted the whole chunk and also tried to rerun it. That didn"t say that above so I wanted to add as a feasible help come the concern if needed.


Thanks because that contributing an answer to ridge Overflow!

Please be sure to answer the question. Administer details and share her research!

But avoid

Asking for help, clarification, or responding to various other answers.Making statements based on opinion; ago them up with recommendations or personal experience.

See more: Bsod Kernel Security Check Failure Windows 10 Reddit, Kernel Security Check Failure On Windows 10/8/7

To discover more, see our tips on writing an excellent answers.


short article Your answer Discard

By clicking “Post your Answer”, friend agree to our terms of service, privacy policy and also cookie policy


site style / logo design © 2021 ridge Exchange Inc; user contributions licensed under cc by-sa. Rev2021.10.28.40592


your privacy

By click “Accept all cookies”, girlfriend agree ridge Exchange deserve to store cookies on your device and disclose information in accordance through our Cookie Policy.