Skip to content

Instantly share code, notes, and snippets.

@alcides
Created August 10, 2016 16:46
Show Gist options
  • Save alcides/bb69741a901d38f9d68040fbce837c98 to your computer and use it in GitHub Desktop.
Save alcides/bb69741a901d38f9d68040fbce837c98 to your computer and use it in GitHub Desktop.
# table$newCol = convertDots(table$oldCol)
convertDots <- function(x) {
x[x == "."] <- NA;
y <- as.numeric(x);
y[is.na(y)] <- 0;
y
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment