# NOT RUN {
##
## 1. a character vector
##
X2 <- c('-$2,500', '$5,000.50')
x2 <- parseDollars(X2)
# }
# NOT RUN {
all.equal(x2, c(-2500, 5000.5))
# }
# NOT RUN {
##
## A data.frame
##
chDF <- data.frame(let=letters[1:2], Dol=X2, dol=x2)
numDF <- parseCommas(chDF)
chkDF <- chDF
chkDF$Dol <- x2
# }
# NOT RUN {
all.equal(numDF, chkDF)
# }
Run the code above in your browser using DataLab