I have a data set that contains slope aspect (azimuth) measure in degrees
(0--360). I would like to recode this variable into compass directions
(N,S,E,W, etc.) for use in plotting and analysis. I know that I can use
cut/cut2 to do this, but this a bit problematic because I want to divide
continuous vector into 4 intervals coded as follows:
N : 315 -- 45 degrees
E : 45 -- 135
S : 135 -- 225
W : 225 -- 315
So the only way I know how to do this is create 5 intervals and recode the
5th interval back to the 1st interval -- sort of clumsy. I'd also like to
be able to create directly the categories as 'N', 'E', 'S', 'W' rather than
1, 2, 3, 4. Does anyone know of an "elegant" way to do this recoding?
On a related topic, I am also looking for a way to preserve the continuous
nature of slope aspect for use in regression analysis rather than resorting
to a categorical representation. Does anyone have any clever suggestions
on how I might do this given that 359 degrees and 1 degrees are both
basically North?
Many thanks!
-Paul
Paul.Schwarz@Cornell.EDU
P.S. I'm in the process of re-subscribing to s-news, so I would appreciate
it if those of you with suggestions could cc: me directly because it may
take a day or two to get my subscription set up.
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news