R Assign1 solutions