Learn R Programming

oce (version 1.4-0)

lon360: Alter longitudes from -180:180 to 0:360 convention

Description

For numerical input, including vectors, matrices and arrays, lon360() simply calls ifelse() to add 360 to any negative values. For '>section objects, it changes longitude in the metadata slot and then calls itself to handle the '>ctd objects stored as as the entries in station within the data slot. For this '>ctd object, and indeed for all non-'>section objects, lon360() changes longitude values in the metadata slot (if present) and also in the data slot (again, if present). This function is not useful for dealing with coastline data; see coastlineCut() for such data.

Usage

lon360(x)

Arguments

x

either a numeric vector or array, or an '>oce object.

Examples

Run this code
# NOT RUN {
lon360(c(179, -179))
# }

Run the code above in your browser using DataLab