Skip to content
Prev 369563 / 398503 Next

Reversing one dimension of an array, in a generalized case

Thank you.  That ignores certain standards in the communities I work in,  it also ignore the fact that whether I decide to always return increasing or decreasing latitudes,  if the sources aren't consistent,  then I need to reverse some of the data,  no matter which way I decide.

Increasing latitudes  (and longitudes) among other things  have the nice property that the array indices are also increasing in the same way. I do a lot of mapping in R, and a number of the mapping routines actually require you to  "melt" the data to long-form  in which case the order of the latitudes in the array is irrelevant,  as long as the mapping is correct.


-Roy
**********************
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
**********************
Roy Mendelssohn
Supervisory Operations Research Analyst
NOAA/NMFS
Environmental Research Division
Southwest Fisheries Science Center
***Note new street address***
110 McAllister Way
Santa Cruz, CA 95060
Phone: (831)-420-3666
Fax: (831) 420-3980
e-mail: Roy.Mendelssohn at noaa.gov www: http://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected" 
"the arc of the moral universe is long, but it bends toward justice" -MLK Jr.