I did it using the code below thank you.
Will the fact I have used a ts object but the observations are not really
equally spaced invalidate the results?
vols=read.csv(file="C:/Documents and Settings/Hugh/My Documents/PhD/Swaption
vols.csv"
+ , header=TRUE, sep=",")