Statistics and Statistical Programming (Winter 2017)/R lecture outline: Week 3: Difference between revisions
From CommunityData
No edit summary |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Review of material from class == | |||
* loading data: | * loading data: | ||
** load() versus read.csv() | ** load() versus read.csv() | ||
Line 4: | Line 6: | ||
** library(foreign) | ** library(foreign) | ||
* defining functions | * defining functions | ||
** apply(), lapply(), sapply() | ** syntax for defining functions: show the my.mean function | ||
** calling functions (your own or others) with apply(), lapply(), sapply() | |||
* stuff related to distributions | * stuff related to distributions | ||
** rep() | ** rep() | ||
Line 11: | Line 13: | ||
** sample(); and sampling into data.frames | ** sample(); and sampling into data.frames | ||
Online | == Online only == | ||
* | * dates with POSIXct(). dates will almost always be given to you as characters, and you need to parse them | ||
* tapply(), and putting things back into data.frames | |||
* merge() | |||
* | |||
* | |||
Latest revision as of 19:38, 25 January 2017
Review of material from class[edit]
- loading data:
- load() versus read.csv()
- when things don't coopreate...
- library(foreign)
- defining functions
- syntax for defining functions: show the my.mean function
- calling functions (your own or others) with apply(), lapply(), sapply()
- stuff related to distributions
- rep()
- seq()
- sample(); and sampling into data.frames
Online only[edit]
- dates with POSIXct(). dates will almost always be given to you as characters, and you need to parse them
- tapply(), and putting things back into data.frames
- merge()