Since you want the volume in cubic yards, (yards yards yards) you need all three dimensions in yards. There are 3 feet in a yard and 36 inches in a yard and hence
4 inches is 4/36 yards
18 feet is 18/3 yards and
27 feet is 27/3 yards
Thus the volume is
4/36 18/3 27/3 = 6 cubic yards.