# NOT RUN {
#Data
data(double_data_1)
data(double_data_2)
data.1 <- double_data_1
data.2 <- double_data_2
#Landmarks
land.a=55
land.b=49
land.c=54
land.d =4
land.e=22
land.f=21
land.g=2
land.h=11
# We can rigidly rotate each structure relative to each other in multiple
# angles (e.g. 0, 15, 45, 90, or 120 degrees)
rotation_0 = double.rotation(data.1, data.2, land.a, land.b, land.c, land.d,
land.e, land.f, land.g, land.h, 0)
rotation_15 = double.rotation(data.1, data.2, land.a, land.b, land.c, land.d,
land.e, land.f, land.g, land.h, 15)
rotation_45 = double.rotation(data.1, data.2, land.a, land.b, land.c, land.d,
land.e, land.f, land.g, land.h, 45)
rotation_90 = double.rotation(data.1, data.2, land.a, land.b, land.c, land.d,
land.e, land.f, land.g, land.h, 90)
rotation_120 = double.rotation(data.1, data.2, land.a, land.b, land.c,
land.d, land.e, land.f, land.g, land.h, 120)
# The function returns a list of two objects that correspond to each rotated
# structure
rotation_0$rotated1 #rotated dataset 1 #(e.g. skull)
rotation_0$rotated2 #rotated dataset 2 #(e.g. mandible)
# The two datasets can be joined with the function join.arrays()
head_0degrees <- join.arrays(rotation_0$rotated1, rotation_0$rotated2)
# }
Run the code above in your browser using DataLab