Skip to main content

Posts

Showing posts with the label Machine Learning

Machine Learning :R

R Expressions 1.1 Type anything at the prompt, and R will evaluate it and print the answer. Let's try some simple math. Type the below command. Redo Complete > 2 [1] 2 There's your result,  2 . It's printed on the console right after your entry. Type the string  "Arr, matey!" . (Don't forget the quotes!) Redo Complete > "Arr,matey!" [1] "Arr,matey!" Now try multiplying 6 times 7 ( *  is the multiplication operator). Redo Complete > 6*7 [1] 42 Logical Values 1.2 Some expressions return a "logical value":  TRUE  or  FALSE . (Many programming languages refer to these as "boolean" values.) Let's try typing an expression that gives us a logical value: Redo Complete > 3 And another logical value (note that you need a double-equals sign to check whether two values are equal - a single-equals sign won't work): Redo Complete > 2+2 ==...