# How to perform linear transformation of Directional data

I just wanted to know if its possible to perform linear transformation of a directional data (circular/ spherical) e.g- wind direction, earths magnetism, etc. It would be great if anyone can share relevant links. And also is it possible to implement it in r?

TIA!

Regards, Lesnar

• What do you mean by 'linear transformation'? Mar 17 '16 at 8:33
• @Kees Mulder By 'linear transformation', I mean that is it possible to make a directional data linear or euclidean? Mar 19 '16 at 5:17

For data on the circle, simply take x and y as the cosine and sine of your angle, respectively.

For higher dimensions, see Wikipedia

https://en.m.wikipedia.org/wiki/Spherical_coordinate_system

https://en.m.wikipedia.org/wiki/N-sphere#Spherical_coordinates

You can simply plot a circular variable as a linear plot. For that, you don't need to do any transformation! For example -

library(circular); View(wind)

You can plot the original data without telling R that it is a circular data.

plot(wind, pch=16)

Now you are telling R that it is a circular data class and these are the specifications. Like - these data points are basically angles, measured in radians and in clockwise direction.

windc <- circular(wind, type="angles",units="radians", zero = pi/2, rotation = "clock")

Now plot. It will generate a circular plot.

plot(windc, cex=1.5, bin=720, stack=TRUE, sep=0.030, shrink=1)