# Script to download .raw files corresponding to geoduck tissue sample SRM data from Vantage MS/MS ## IMPORTANT: the first step in this script creates a directory, where all .raw files will be downloaded. Feel free to change the location of this directory getwd() # see which directory is currently your working directory; change wd if desired dir.create("2017-Geoduck-SRM-raw/") #create a directory, in which all .raw files will bes aved setwd("2017-Geoduck-SRM-raw/") #set your working directory to the one you just created # Install package not available in base R install.packages("stringr", dep=TRUE) install.packages("curl", dep=TRUE) # Scrape website that houses all .raw files of file names url <- "http://owl.fish.washington.edu/generosa/Generosa_DNR/2017-July-SRM-Data/" #site on Owl that contains all .raw files html <- paste(readLines(url), collapse="\n") library(stringr) rawfiles <- as.data.frame(str_match_all(html, "