Re: opt vs theme

83 views
Skip to first unread message

maze maze

unread,
May 29, 2013, 2:42:13 AM5/29/13
to ggp...@googlegroups.com
Hi,

I just got a nice answer to my private mail address. It seems to be useful to make this publicly available. (Hope that Dennis agrees).

"""
The overhauled theming system in ggplot2 was introduced in 0.9.2,
where it was noted that the old system (using opts() and functions
starting in theme_) would be deprecated in 0.9.3 in favor of the new
one. Since your production computer is stuck in the old system, you
won't be able to make a 'smooth transition' - i.e., you're caught
between a rock and a hard place. The new system wasn't available in
0.9.1 and the old system was deprecated in 0.9.3. To make them
compatible, you'll either have to convince someone to upgrade the
production server or downgrade your ggplot2 to version 0.9.1 - the
latter is unappealing and the former seems to be a low probability
event, given your description of the problem. Bottom line: unless you
want to downgrade, you'll either have to live with the deprecation
warnings or manage two parallel blocks of code: one for the
development machine and another for the server. I don't see a happy
medium.

Dennis
""""

maze maze

unread,
May 29, 2013, 2:47:06 AM5/29/13
to ggp...@googlegroups.com
OK. T just wanted to make sure. 

So I will use somethink like:

if( packageVersion("ggplot2") <= '0.9.1' ){

}else{

}

should work. Is it possible to set an alias name for a function. Since opt and theme seem to behave (in my simple examples) exactly equivalent maybe I can
write somethinkg like "theme = opt" in the if-branch. I just don't know the R syntax for such a thing.

Has anyone an idea. Or hints what might be dangerous about this idea.

Matthias

Reply all
Reply to author
Forward
0 new messages