Last active
April 20, 2016 01:41
-
-
Save ZeccaLehn/fa9ef0183fe71f47aa1a to your computer and use it in GitHub Desktop.
[R] Raw to Table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dat <- read.table(textConnection(" | |
date rtn | |
01/03/2012 0.25% | |
01/04/2012 0.01% | |
01/05/2012 0.02% | |
01/06/2012 -0.06% | |
01/09/2012 0.11% | |
01/10/2012 -0.01% | |
01/11/2012 0.00% | |
01/12/2012 -0.01% | |
"), stringsAsFactors = FALSE, skip = 1, header = T | |
) | |
str(dat) | |
class(dat) | |
dat[,2] <- as.numeric(gsub("%","",dat[2])) | |
head(dat) | |
as.data.frame(cbind(dat[1],x)) | |
head(dat) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment