Displaying 20 results from an estimated 3000 matches similar to: "Break up a data frame"
2007 Feb 13
2
Computing stats on common parts of multiple dataframes
Folks,
I have three dataframes storing some information about
two currency pairs, as follows:
R> a
EUR-USD NOK-SEK
1.23 1.33
1.22 1.43
1.26 1.42
1.24 1.50
1.21 1.36
1.26 1.60
1.29 1.44
1.25 1.36
1.27 1.39
1.23 1.48
1.22 1.26
1.24 1.29
1.27 1.57
1.21 1.55
1.23 1.35
1.25 1.41
1.25 1.30
1.23 1.11
1.28 1.37
1.27 1.23
R> b
EUR-USD NOK-SEK
1.23 1.22
1.21 1.36
1.28 1.61
1.23 1.34
1.21 1.22
2012 Jan 19
8
sumarizar
*Hola!!! resulta que tengo unos datos de divisas ordenados por fechas
(días) los que he convertido a formato tipo YYYY-MM-DD donde DD siempre es
01:*
*
*
*
EUR.resto$date<-as.Date(EUR.resto$date)
EUR.resto$mo <- substr(EUR.resto$date,6,7)
EUR.resto$yr <- substr(EUR.resto$date, 1,4)
2008 Sep 02
1
R Newbie: quantmod and zoo: Warning in rbind.zoo(...) : column names differ
Hello;
I am trying following but getting a warning message : Warning in
rbind.zoo(...) : column names differ, no matter whatever I do.
Also I do not want to specify column names manually, since I am just
writing a wrapper function around getSymbols to get chunks of data
from various sources - oanda, dividends etc.
I tried giving col.names = T/F, header = T/F and skip = 1 but no help.
I think
2012 Apr 27
1
multivariate xts merge question
Hi,
I have an xts starting with a number of columns (currency pairs see below),
then I add new ones which are derived from existing ones (like adding the
moving average of a column) by merging the new columns one by one. These
get the name of the column they are calculated from concatenated with ".1".
All done by merge.xts, easy.
Now, I have a function (procState below) which generates
2010 Dec 02
1
Downloading quote data from yahoo finance
Hi R users,
Thanks in advance.
I am using R 2.12.0 on Windows XP.
May I request you to assist me in the following please.
1. I am getting error while downloading quote data from yahoo finance.
The example code is below (taken from tseries help):
library(tseries)
con <- url("http://quote.yahoo.com")
if(!inherits(try(open(con), silent = TRUE), "try-error")) {
2009 Oct 14
3
currency conversion function?
Dear all
Is there any R function that would perform currency conversion using
up-to-date exchange rates? I would be looking for a function that
allows to download recent exchange rates (say, from Yahoo!) and then
use these in converting currencies (say, USD to EUR).
I am not sure whether r-sig-finance would be more appropriate, but the
(off-)topic feels general enough to me. Thank you
Liviu
--
2006 Jan 19
5
123 * 3 => 123123123! But why?
Hi all
I extended the Globalize Plugin the following way:
--------
module Globalize
class Currency
def conversion_rate
code = Locale.active.currency_code
rates = { :USD => 1,
:CHF => 0.75,
:EUR => 1.1,
:GBP => 3.1
}
value = rates[code.to_sym]
raise "No conversion rate found for currency
2010 Apr 05
3
syntax error, unexpected '\n', expecting tASSOC
Hey all,
I get the following error. Now I know it''s related to a curly brace, but
it seems that all curly braces are properly in place. So I''m not sure
why I get this error:
SyntaxError in DashboardController#panels
rails/app/controllers/dashboard_controller.rb:170: syntax error,
unexpected ''\n'', expecting tASSOC
def panels
addDetailToContainer =
2006 Mar 28
1
What if a webservice is not available = "execution expired" error
Hi,
I''m using a webservice in my application. How can I make it so that my
application will only try to connect to the webservice for a certain
period of time and then give up?
Right now my code is using a begin-rescue-else but sometimes I get a
"execution expired" error if the webservice is not available or takes
too long to respond.
Thanks,
Peter
begin
service =
2005 Apr 30
1
Thanks (was re: Neosurge.com)
On Sat, 2005-04-30 at 07:05 -0400, Mark Weaver wrote:
> John,
>
> I just wanna say THANK YOU for the AWESOME distro and keep up the
> fantastic work. CentOS 4 is definitely without a doubt the most
> rock-solid, outa-the-box distro I've ever used. And I'm loving every
> minute of it. I've even managed to get my boss hooked on it and now our
> linux machines
2008 May 29
1
plotting zoo using datetime as xlim
is there a way to use the actual index value for plotting zoo objects
this is the way that the index is set up and a sample range of what I would
like to plot
01/01/06 00:00:00 - 01/01/06 23:45:00
{
library(zoo)
# chron
library(chron)
fmt.chron <- function(x) {
chron(sub(" .*", "", x), gsub(".* (.*)", "\\1:00", x))
}}
x <- structure(c(15.57, 15.5,
2012 Jun 10
2
problem with sub()
Dear R users:
I want to convert some character vectors into numeric vectors.
> head(price)
[1] "15450 EUR" "7900 EUR" "13800 EUR" "3990 EUR" "4500 EUR"
[6] "4250 EUR"
>head(mileage)
[1] "21000?km" "119000?km" "36600?km" "92000?km" "140200?km"
[6] "90000?km"
in
2009 Aug 17
4
number in R
Hi,
i export data from an csv file like this :
Data <- read.csv2("c:/Art.csv",sep=",") # import data into R
> Data <- Data [1:5,1:5]# extracting the first 5 rows and columns
> Data
Policy.Number AXA.Entity Country LoB ccy.data
1 6e+13 BNL BNL P EUR
2 6e+13 USA BNL P EUR
3 6e+13 UK BNL
2010 Jul 13
1
Time Variable and Historical Interest Rates
Guys, I wrote to the finance mailing list earlier with my questions but was
directed here.
Sorry for the repeat.
---------------
library(quantmod)
....
now <- Sys.time()
midnight <- strptime() # <---- I want to make this a static variable
that will be equal to 12:00:00 am but I dont know what to put here. I keep
getting NA for everything I do
if(now == midnight) {
2006 Mar 25
4
Rails PayPal and Currencies other than USD
Has anyone been able to make direct API calls to PayPal in currencies
other than USD? I get an error message "The currency code submitted is
not supported. Check the currency code and try again."
I''m using the PayPal plugin for Rails. I can successfully transact in
USD, but not AUD (Australian Dollars).
Cheers,
Dan
2007 Apr 16
1
Names in vector occurring in another vector
I have a vector of character strings such as
mainnames<-c("CAD","AUD") and another vector say
checknames<-c("CAD.l1","AUD.l1","JPY.l1","EUR.l1","CAD.l2","AUD.l2","JPY
.l2","EUR.l2")
I want a new vector of character strings that is just
2009 Aug 18
1
number 6 e+13
Hi,
i export data from an csv file like this :
Data <- read.csv2("c:/Art.csv",sep=",") # import data into R
> Data <- Data [1:5,1:5]# extracting the first 5 rows and columns
> Data
Policy.Number AXA.Entity Country LoB ccy.data
1 6e+13 BNL BNL P EUR
2 6e+13 USA BNL P EUR
3 6e+13 UK BNL
2003 Mar 25
4
R software for Hastie book
Does anyone know whether there is an R version of the S-Plus
software that can be downloaded from the website of the book
Elements of Statistical Learning by Hastie, Tibshirani and
Friedman?
Rob Potharst
--
**********************************************************
Dr. Rob Potharst
Lecturer in Computer Science
Erasmus University email: potharst at few.eur.nl
P.O. Box 1738
2007 May 08
5
limit bandwidth per host question
EHLO tc gurus.
New to traffic control. Unfortunately, the politicians here in Denmark
have decided that a PC is the same as a television set - so anyone
owning a PC and internet connection of over 255 kbit/s must pay DKR
2200/year = EUR 300 = USD 400 in television licence fees :-( This is a
lot of money for poor students, so we want to offer the students the
*option* of limiting their
2009 Mar 03
1
zoo and coredata() classes
Hi guys
I have a reasonably basic question with zoo usage, but I havent been able
to find a satisfactory workaround yet.
Heres a simple example of what I'm talking about (the following data frame
contains numeric columns that contains NAs):
> head(ebs)
time src tstamp code bid ask
1 2009-03-03 13:03:29.536 perf.Tib_listener 14980321164
EBS.REC.EURJPY=EBS.NaE 123.48 NA
2 2009-03-03