UBC STAT545 2014 Cm002 deep thoughts

Post on 25-May-2015

1.700 views 1 download

Tags:

description

Lecture slides from UBC STAT545 2014. Not a stand-alone document. http://stat545-ubc.github.io

Transcript of UBC STAT545 2014 Cm002 deep thoughts

Deep

Thoughts

about data analytic work

get better at typing

tough love:

typos mattercase mattersth_is is different from th-isspaces in filenames are EVIL

want computer to do tedious work for you?then you must give precise instructions

A place for everything,everything in its place.

Benjamin Franklin

“The source code is real. The objects are realizations of the source code. Source for EVERY user modified object is placed in a particular directory or directories, for later editing and retrieval.”

-- from the Emacs Speaks Statistics (ESS) manual

source is real

data written for humans ...

http://cdec.water.ca.gov/cgi-progs/reports/PRECIPOUT.2011

code written (only) for computers ...

... creates misery for humans

Names matter

myabstract.docxJoe’s Filenames Use Spaces and Punctuation.xlsxfigure 1.pngfig 2.pngJW7d^(2sl@deletethisandyourcareerisoverWx2*.txt

NO

2014-06-08_abstract-for-sla.docxjoes-filenames-are-getting-better.xlsxfig01_scatterplot-talk-length-vs-interest.pngfig02_histogram-talk-attendance.png1986-01-28_raw-data-from-challenger-o-rings.txt

YES

minimize the creation of data excerpts and copies ...

... they will just confuse you later

reshape your data

where is the file or executable you need?

what is your working directory?

Oops, I see a small mistake right there.

Do you mind going back to fix that?

If the thought of re-running your analysis makes you ill ...

... you’re not doing it right

Deep

Thoughts

about data analytic work

switch to live coding ...

see web companion for indicative content:STAT 545 web home > Syllabus > cm002

Students with R/RStudio experience were encouraged to contribute something to the “Learn R” world.Suggestion: use, review, extend swirl (see next slide).

http://swirlstats.com

you do know that R ≠ RStudio, right?

we use RStudio because it makes us happier in our work, but notice that nothing we produce -- no code, no figures, nothing -- requires RStudio to be created, appreciated or reused

this is important

this is intentional

photos

Deep Thoughts, tree, mist, sunLoco Steve, Goldie Dawnhttp://www.flickr.com/photos/36989019@N08/5546134597/

Messy beer canshttp://www.schiesshouse.com/dontdothis.htm

Hanging beer canshttp://www.beastpieces.com/2009/07/its-superior/

Messy computer desktophttps://www.flickr.com/photos/jeanbaptisteparis/724619122/in/photolist-272S29-auRiXZ

Triflehttp://assets.cougar.nineentertainmentco.com.au/Assets/GourmetTraveller/2013/05/09/8837/1209gtpmtrifle-628.jpg

Trifle recipehttp://www.gourmettraveller.com.au/recipes/print-recipe/?id=8837

Winner of 2004 Obfuscated C code competitionhttp://m.eet.com/media/1076421/1106esdGanssle01.gif

Cheers “Where Everybody Knows Your Name”http://cheersboston.blogspot.ca

PC vs Machttp://www.frumsatire.net/2009/03/14/mac-vs-pc/

You can’t get there from herehttp://cstacalicious.ning.com/photo/liss-platt-still-from-you-can-t-get-there-from-here-2005-8?context=latest

Hand-crafted basket woven chairhttp://www.visitscotland.com/cms-images/2x1/regions/orkney/hand-crafted-furniture