if (FALSE) {
# load NW Atlantic data
data(nw.atlantic)
# write data to disk as a comma-separated text file
write.table(nw.atlantic, "NW_Atlantic.csv", sep=",", quote=FALSE, row.names=FALSE)
# prepare SQL database
setSQL(bathy="NW_Atlantic.csv")
# uses data from the newly-created SQL database:
subsetSQL(min_lon=-70,max_lon=-50,
min_lat=35, max_lat=41) -> test
# visualize the results (of class bathy)
summary(test)
# remove temporary database and CSV files
system("rm bathy_db") # remove file, for unix-like systems
system("rm NW_Atlantic.csv") # remove file, for unix-like systems
}
Run the code above in your browser using DataLab