Skip to content

Instantly share code, notes, and snippets.

@RCura
Created March 29, 2018 23:39
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save RCura/dc8496d6b8cca60c4b5adb58c173b1d6 to your computer and use it in GitHub Desktop.
library(readr)
library(dplyr)
raw_df <- read_delim("5262_FH CAPE TOWN_3.TXT",
delim = ",",
col_names = FALSE)
code3 <- raw_df %>%
filter(X1 == 3) %>%
mutate(ID = 1:nrow(.)) %>%
select(ID, X1:X8)
code4 <- raw_df %>%
filter(X1 == 4) %>%
mutate(ID = 1:nrow(.)) %>%
select(ID, X1:X11)
code5 <- raw_df %>%
filter(X1 == 5) %>%
mutate(ID = 1:nrow(.)) %>%
select(ID, X1:X11)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment