Created
August 28, 2013 06:36
-
-
Save krlmlr/6362771 to your computer and use it in GitHub Desktop.
This file contains 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
read.table(text="599 449 | |
149 99 | |
249 189 | |
349 259 | |
199 99 | |
299 NA | |
399 199 | |
549 329 | |
129 79 | |
599 359 | |
70 40 | |
90 69 | |
369 NA") -> .. | |
subset(.., !is.na(V2)) -> .. | |
plyr::rename(.., c(V1="CHF", V2="EUR")) -> .. | |
..$CHF.net <- ..$CHF / 1.08 | |
..$EUR.net <- ..$EUR / 1.19 | |
lm(CHF~EUR, ..) -> m | |
lm(CHF.net~EUR.net, ..) -> m.net | |
m.net$coefficients["EUR.net"] / 1.23 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment