Aspect is odd as a variable, as it is circular... i.e., the difference between 359 and 0 is 1 unit. Most people decompose aspect into "northing" and "easting," which creates two variables that are linear, and therefore more appropriate for analysis.
To follow up on Andrew Peterson's answer, aspect is really a direction vector in two dimensions and so is made up itself of two variables. These can be rather arbitrary but in ecological work "northness" = cos(aspect) and "eastness" = sin(aspect) are very useful variables.
Make sure that your aspect -- which is likely measured in degrees as from a DEM in a GIS or in the field as from a compass -- is in radians. R, ArcMap and even Excel trig functions expect arguments in radians and many an unknowing student and researcher have applied the functions without converting degrees to radians with disastrous results.
To see if your aspect is in degrees do a quick summary or histogram. Anything over about 6.5 is a sign that your aspect is in degrees -- if the range is 0 to 360 then you know for sure it's degrees. If it's 0 to about 6.28 then it's most likely radians.
To convert degrees to radians divide out the degrees with 180 then multiply in the radians with pi (3.14...):
rad = pi*degrees/180
Now applying the cosine function to the radians that came from geographic degrees will generate the "northness" variable and it will be between 1 (due north) and -1 (due south) with zero being neither north nor south in aspect (but rather east or west -- see below).
Applying the sine function to geographic radians gives "eastness", also between zero and one, with +1 directly east and -1 directly west.
Notice that because cos^2 + sin^2 = 1 that eastness^2 + northness^2 = 1, meaning that it's impossible to have northness = 1 and eastness be anything other than zero.
Hope that's not elaborating the obvious too much, but for most of us ecologists it's been too long since we studied trigonometry!
Compass directions have no true zero and their designation is in fact arbitrary. So they have to be converted to rectangular polar coordinates i.e. arc tan (tan-1) of the ratio of the mean of the sine (S) of all angles to the mean of the cosine (C) of all angles:
Vector mean direction = arc tan S/C, where S = (Σ sine θ)/n and C = (Σ cos θ)/n
Mean resultant vector length (or ‘strength’), R = (√ [S2 + C2])/n
where θ = angle and n = no. of angles
Then you have to decide if you want to transform the above ratios, since they are continuous variables, to categorical variables, depending on your analyses. I hope this helps :-)
Following up on this since someone asked (looking at you Kyle G!) what about flat spots?
These might be considered as spots with northness and eastness both zero and then we are in trouble, because they violate the "sum of their squares equals zero" trig identity.
What my students and I have done in the past is to take the slope, convert that to radians, find its sine, then make new variables:
Northness_exposure = sin(slope)*northness,
Eastness_exposure = sin(slope)*eastness,
where as before
northness= cos(geographic aspect in radians) and
eastness= singeographic aspect in radians)
So if a place is flat, then slope = zero and both northness.exposure and the equivalent eastness.exposure will now be zero.
In contrast, an icy, vertical north face in the Brooks Range of Alaska will have the maximum value of northness.exposure = 1
From here we devolve into a lot more issues like solar angle relative to the slope and aspect---I think that Paul Rich solved these issues and sold (?) the code to ESRI in the 1990s as the "Solar tool" to get some measure of a "solar value" or exposure at a given time or across times.
Sometimes I have used the solar tool for a given study area, then regressed the solar value from ESRI's "Solar tool" against Northness_exposure and Eastness_exposure finding high R^2 and so using the faster and simpler variables.