Displaying 20 results from an estimated 134 matches for "coredatas".
Did you mean:
coredata
2023 Apr 12
1
converting a character matrix into numeric....
Dear Rui,
Not working. I have entirely removed the column containing % but am still bootless:
> head(coredata(INFYTX))
INFY Historical Data INFY Historical Data INFY Historical Data INFY Historical Data
[1,] "47.26" "44.28" "47.56" "44.28"
[2,] "46.30" "44.92"
2009 Jun 19
1
(FULL) Need help to optimize a piece of code involving zoo objects
(Sorry, sent the message before I finished it)
Hello, everyone
I have a long script that uses zoo objects. In this script I used
simple moving averages and these I can very efficiently calculate with
filter() functions.
Now, I have to use special "exponential" moving averages, and the only
way I could write the code was with a for-loop, which makes everything
extremely slow.
I don't
2023 Apr 12
1
converting a character matrix into numeric....
?s 19:57 de 12/04/2023, akshay kulkarni escreveu:
> Dear members,
> I have an xts object:
>
>> head(INFYTX)
> INFY Historical Data INFY Historical Data.1 INFY Historical Data.2
> 2003-04-16 "47.26" "44.28" "47.56"
> 2003-04-17 "46.30" "44.92"
2009 Jun 19
1
Need help to optimize a piece of code involving zoo objects
Hello, everyone
I have a long script that uses zoo objects. In this script I used
simple moving averages and these I can very efficiently calculate with
filter() functions.
Now, I have to use special "exponential" moving averages, and the only
way I could write the code was with a for-loop, which makes everything
extremely slow.
I don't know how to optimize the code, but I need to
2023 Apr 12
1
converting a character matrix into numeric....
Dear members,
I have an xts object:
> head(INFYTX)
INFY Historical Data INFY Historical Data.1 INFY Historical Data.2
2003-04-16 "47.26" "44.28" "47.56"
2003-04-17 "46.30" "44.92" "46.53"
2003-04-21 "45.82"
2023 Apr 12
1
converting a character matrix into numeric....
Isn't this like trying to tie up the horse after it has left the barn? Why not figure all this out _before_ converting to xts?
On April 12, 2023 12:29:49 PM PDT, akshay kulkarni <akshay_e4 at hotmail.com> wrote:
>Dear Rui,
> Not working. I have entirely removed the column containing % but am still bootless:
>
>> head(coredata(INFYTX))
> INFY
2011 Sep 27
2
Coercing a character zoo to a numeric
Dear R-helpers,
It seems to me that a character zoo cannot be coerced to a numeric zoo.
Below is a minimal example. Can someone tell me what I have done wrong?
> z<-zoo(1:4,order.by=1:4)
> coredata(z)<-as.character(coredata(z))
> str(z)
‘zoo’ series from 1 to 4
Data: chr [1:4] "1" "2" "3" "4"
Index: int [1:4] 1 2 3 4
>
2007 Mar 31
1
Problem with S4 inheritance: unexpected re-initialization?
Dear all,
To explain my problem I am attaching a demonstration package "myclasspkg":
I have the following two S4 classes with similar inheritance:
SubSubClassA <- SubClassB <- BaseClass
SubSubClassB <- SubClassB <- BaseClass
In R I am calling the following functions:
> library(myclasspkg)
> subA <-
2006 Nov 29
2
problem with indexing a zoo object
...kret.
So, I have two questions :
1) is there a way around this ?
2) even if the answer to 1) is yes, there could be some other way better
than what I am doing ? It took me a while to even get to this point
because I was taking is.infinite of fwdret and abs of bckret rather than
their respective coredatas and that was really causing a mess because of
the different indexing that was getting returned.
Thanks.
# SET SEED
set.seed(1)
# CREATE 2 ZOO OBJECTS, bckkret and fwdret OF MINUTE DATA OVER THE
WHOLE DAY
x.date<-as.Date(paste(2003,01,01,sep="-"))
allminutes<-as.POSIXct(format...
2011 Mar 26
0
rebuilding vignettes in 2.13-0-alpha fails if name of source dir is not package name
Dear list,
I have been checking my package ('analogue') using R2.13-0-alpha
(details of exact svn version appended below) and the R CMD check
procedure is generating an error rebuilding a vignette in the package,
which raises a NOTE in the check.
The log printed to screen during check shows:
....
* checking re-building of vignettes ... NOTE
Error in re-building vignettes:
...
Error in
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
2006 Nov 23
1
Problem with as.ts(zoo-object)
Dear all,
I have an error message, when I try to convert a zoo object (called
test) to ts (on R 2.4.0, Package zoo version 1.2-1, Windows XP)
> test
1994-05-10 1994-06-09 1994-07-09
0.0024943889 0.0024881824 0.0006955831
> str(test)
atomic [1:3] 0.002494 0.002488 0.000696
- attr(*, "index")=Class 'Date' num [1:3] 8895 8925 8955
> is.regular(test)
[1] TRUE
2008 Oct 22
1
R 2.8.0 qqnorm produces error with object of class zoo?
Dear list-reader,
by running the following script:
library(zoo)
sessionInfo()
search()
packageDescription("zoo")
data(EuStockMarkets)
dax <- as.zoo(EuStockMarkets[1:10, "DAX"])
daxr <- diff(log(dax))
identical(as.vector(qnorm(daxr)), qnorm(coredata(daxr)))
qqnorm(coredata(daxr))
qqnorm(daxr)
qqnorm() produces an error:
> qqnorm(daxr)
Fehler in if (xi == xj) 0L
2012 Jun 02
1
mtext bug
Sir,
I have hit a the limits of my understanding of text / par / opar etc...
I have a few related xts data frames which have multiple columns, and have
written a for-loop to make a set of charts - however i do not get any
margin text when i run the loop.
when i test the code outside of the loop the margin text appears - however
when i run the loop the margin text does not appear ... what gives?
2011 Apr 19
1
Axes Alignment Problem for Multiple Plots
Dear all,
I'm trying to plot, in the same window, two different series, using barplot() for the first one and plot() for the second. What happens is that the second chart has a different axes origin, therefore the final plot is wrong. This piece of code shows the differences between the values of par()$usr:
barplot(coredata(Z0), beside=TRUE, ylim=c(0,100));
par()$usr;
2007 Mar 16
1
Problems with package containing S4 classes
Dear all,
Currently, I am trying to create a test package "testS4" using S4 classes,
which I am attaching.
Running R CMD check gives the following error:
coeurebooks-computer:/Volumes/CoreData/CRAN cs$ R CMD check
testS4_0.1.1.tar.gz
* checking for working latex ...sh: line 1: latex: command not found
NO
* using log directory '/Volumes/CoreData/CRAN/testS4.Rcheck'
* using R
2017 Jul 30
4
Kalman filter for a time series
I found an example at
http://www.bearcave.com/finance/random_r_hacks/kalman_smooth.html shown
below. But it seems the structSSM function has been removed from KFAS
library so it won't run. Does anyone know how to fix the code so that it
runs?
library(KFAS)
library(tseries)
library(timeSeries)
library(zoo)
library(quantmod)
getDailyPrices = function( tickerSym, startDate, endDate )
{
2007 Mar 04
1
Problem using callNextMethod() in S4
Dear all,
Maybe, I am doing something wrong, but using R-2.5.0 on my Intel-Mac, I
have problems
using function callNextMethod() in method initialize.
I am loading the following code as file "testS4.R":
setClass("baseClass",
representation(myname = "character",
mydir = "character",
"VIRTUAL"),
2012 Apr 12
1
Could dynlm function work for xts objects?
It seems to only works for zoo or ts objects?
I tried to run it for xts objects, and error message occurs. Once I
coerce it to be an zoo object (by as.zoo), it works.
Error message:
Error in model.frame.default(formula = dynformula(PIh - PI ~ L(X, 0:i) + :
variable lengths differ (found for 'L(X, 0:i)')
In addition: Warning messages:
1: In zoo(coredata(x), order.by = index(x), ...)
2007 Jul 31
1
A complicated 'aggregate'
Hi,
I have a financial (zoo) time series with prices and volumes (although I can
get the coredata as a matrix). Due to the data-source some indices have
multiple observations. I want to aggregate these according to a weighted
average.
11:00:01 34 1000
11:00:01 35 500
11:00:01 35 1000
11:00:02 34 500
11:00:02 35 500
should become
11:00:01 34.6 2500
11:00:02 34.5 1000
I currently do this