MISY262 Lecture Notes - Lecture 1: Statistical Significance, Ford Model Y, Reference Question
Document Summary
Syntax: these are errors in our spelling, punctuation, and usage that keep our code from running. Logic: these are errors in what we ask r to do, they might run/execute without an error but they don"t do what we actually wanted. In the file menu, choose new document (mac) Write your code in the new script. Lists are variables that contain a set of values, all the same type: > d = c(1,2,3,4,6) Reference an element of a list by naming the list and counting the elements: >d[5, >d[4:5] What does this do: 1:3 (numbers 1-3, 1:10 (numbers 1-10, -2:2, seq(3,5,. 5) When multiplying a list by a number, each element of the list is multiplied by that number (same for adding, subtracting, etc. ) Reassignment of values: which locates, the brackets select the old values, and the = reassigns, errors, remember you can always start fresh if you do something wrong (recreate p)