Skip to content
Back to formatted view

Raw Message

Message-ID: <21091033.post@talk.nabble.com>
Date: 2008-12-19T13:16:30Z
From: Dan Kelley
Subject: how to manipulate ... within a function
In-Reply-To: <494AFA96.3000407@stats.uwo.ca>

Thanks very much, Duncan.  In case it's of interest to others who encounter
this thread later, I am pasting below the code I wrote.  It is for the 'oce'
package for oceanographic data, which explains the reversal of the y axis,
forming a so-called 'profile', in which the top of the graph represents the
top of the water column.

        args <- list(x=x$data$temperature, y=x$data$pressure,
                     xlim=range(x$data$temperature),
                     log="",
                     ylim=rev(range(x$data$pressure)),
                     xlab=expression(paste("Temperature [", degree, "C ]")),
                     ylab="p [dbar]", ...)
        if (!("type" %in% names(list(...)))) args <- c(args, type="p")
        if (!("cex"  %in% names(list(...)))) args <- c(args, cex=0.3)
        do.call(plot, args)


-- 
View this message in context: http://www.nabble.com/how-to-manipulate-...-within-a-function-tp21083637p21091033.html
Sent from the R help mailing list archive at Nabble.com.