Correctly set R default graphic device to quartz?

I tried to add the following line in my .Rprofile file:

options(device = quartz)

It produced an error:

Error in options(device = quartz) : object 'quartz' not found

Then I tried:

options(device = "quartz")

And it works.

However, both work in the regular R session. Can anyone tell me what is the reason for the difference in behavior?

1 Answer

The erro message says it all. There is no data-object named 'quartz' and the options function is not expecting (nor can it find) a function name as an argument value for the 'device'-node.

You are seeing the effect of the environment where .Rprofile is being evaluated because some of the usual packages (such as stats or graphics) are not yet loaded. Read more about this at ?Startup. You could avoid this by starting .Rprofile with require(grDevices)

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like