Last active
July 17, 2016 15:50
-
-
Save snowch/dfdf08be0afcb18dd9635107435183d6 to your computer and use it in GitHub Desktop.
DSUR scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dir.create('./DSUR/') | |
| download.file('https://studysites.uk.sagepub.com/dsur/study/DSUR%20Data%20Files/Data%20files.zip', dest='DataFiles.zip') | |
| unzip('DataFiles.zip', exdir='./DSUR/') | |
| baseurl = 'https://studysites.uk.sagepub.com/dsur/study/DSUR%20R%20Script%20Files/' | |
| scripts <- c( | |
| 'Chapter%203%20The%20R%20Environment.R', | |
| 'Chapter%204%20DSUR%20Graphs.R', | |
| 'Chapter%205%20DSUS%20Exploring%20Data.R', | |
| 'Chapter%206%20DSUR%20Correlations.R' | |
| ) | |
| dir.create('./DSUR/Scripts/') | |
| for (f in scripts) { | |
| dest = gsub("/", "_", f) | |
| dest = gsub("%20", " ", dest) | |
| download.file(paste(baseurl, f, sep=''), dest=paste('./DSUR/Scripts/', dest, sep='')) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment