Skip to content

Commit

Permalink
Removing references to dropbox and some minor updates to the final ex…
Browse files Browse the repository at this point in the history
…ercise
  • Loading branch information
seanchrismurphy committed May 18, 2017
1 parent fe7d5cf commit 86e9cd9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Week 2/Exercise 2 - Reading in your data.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# for, and once you've selected it, it prints the full file path to that file. You can then use that as an input
# to read.csv.

# Try running file.choose() and navigate to wherever you've copied the shared dropbox folder. Select the 'week
# Try running file.choose() and navigate to wherever you've copied the Week 2 folder. Select the 'week
# 2 data.csv' file.
file_path <- file.choose()

Expand All @@ -32,7 +32,7 @@ week2 <- read.csv(file.choose(), stringsAsFactors = FALSE)
# is set to where your data are, you only need to input the name of the data file to read.csv() in order to
# load it, without specifying a file path.

# Try setting the working directory below to wherever you copied the shared dropbox folder for this week.
# Try setting the working directory below to wherever you copied the folder for this week.
# Remember that you can use file.choose() to get the path to a file in that folder, but here you'll need to
# make sure you've specified the path to the folder, not any particular file. If you get an error, it
# likely means you've specified the file path wrong. Remember that this is case sensitive, and that you'll
Expand Down
2 changes: 1 addition & 1 deletion Week 3/Exercise 1 - Week 2 revision.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Reading in your data ##

# 2. Set you working directory to wherever you've copied the Week 3 dropbox folder.
# 2. Set you working directory to wherever you've copied the Week 3 folder.

# Remember that you can run getwd() to find out where your current working directory is, and then modify that
# path and use setwd() to change your working directory.
Expand Down
2 changes: 1 addition & 1 deletion Week 3/Exercise 3 - Analysing Continuous Data.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Analysing Continuous Data in R ###

# For this exercise, we'll read in some more real data. If you haven't already, set you working directory
# to wherever you've copied the Week 3 dropbox folder. Remember that if you can't get setwd() to work,
# to wherever you've copied the Week 3 folder. Remember that if you can't get setwd() to work,
# you can use the dropdown menu in RStudio (Session -> Set working directory -> choose directory).

# Once you've done that, run the following:
Expand Down
10 changes: 9 additions & 1 deletion Week 6/Exercise 5 - Tidying complex data.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
status <- read.csv('/Users/Sean/Dropbox/Post-Doc/R course/Raw materials/Week 6/Data/status data messy.csv',
# In this example I'll be demonstrating some of the principles of tidying data using a complicated, messy dataset
# collected via Qualtrics (courtesy of Dr Katie Greenaway)

# As always, you'll want to point this reference to wherever you have saved the data from dropbox.

status <- read.csv('/Users/Sean/Dropbox/Data/status data messy.csv',
stringsAsFactors = FALSE)

# This dataset is quite an untidy one (though I have cleaned it slightly from its original state). Take a look:
Expand Down Expand Up @@ -127,4 +132,7 @@ head(statuscast)
summary(lmer(charisma ~ 1 + exp_cond*auth_cond + (1|pid) + (1|subject), data = statuscast))


# I haven't included any exercises for this final demonstration, but I do encourage you to try out the principles
# I've shown here on your own data. Best of luck!


0 comments on commit 86e9cd9

Please sign in to comment.