Skip to content

Commit

Permalink
Merge pull request #55 from mpinsky/update2016
Browse files Browse the repository at this point in the history
fix spp-common mismatch in after explode0
  • Loading branch information
rBatt authored Feb 1, 2017
2 parents 1df891d + f523f31 commit 5ea5847
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion complete_r_script.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# 3) Manually change the WORKING_DIRECTORY variable (line 27) to the directory with your data and run the script.

# RDB quality of life enhancer "~/Documents/School&Work/pinskyPost/OceanAdapt/data_download/Data_Vis_2015_09_04"
# setwd("/Users/Battrd/Documents/School&Work/pinskyPost/OceanAdapt/data_updates/Data_Updated")
# setwd("/Users/Battrd/Documents/School&Work/pinskyPost/OceanAdapt/data_updates/")


### File Structure
Expand Down Expand Up @@ -1287,6 +1287,8 @@ print_status('>Species data complete.')
# ===========
# = Add 0's =
# ===========
td_factorColumns <- sapply(trimmed_dat, is.factor)
trimmed_dat[,td_factorColumns] <- lapply(trimmed_dat[,td_factorColumns], as.character)
dat.exploded <- as.data.table(trimmed_dat)[,explode0(.SD), by="region"]
# write.csv(dat.exploded, file.path(WORKING_DIRECTORY, "..", "..", "dat.exploded.csv")) # this will be ~600MB

Expand Down

0 comments on commit 5ea5847

Please sign in to comment.