Displaying 20 results from an estimated 4000 matches similar to: "x is not a open/high/low/close time series"
2012 Jan 10
1
plotOHLC(alpha3): Error in plotOHLC(alpha3) : x is not a open/high/low/close time series
R version 2.12.0, 64 bit on Windows.
Here is a short script that illustrates the problem:
library(tseries)
library(xts)
setwd('C:\\cygwin\\home\\Ted\\New.Task\\NKs-01-08-12\\NKs\\tests')
x = read.table("quotes_h.2.dat", header = FALSE, sep="\t", skip=0)
str(x)
y <- data.frame(as.POSIXlt(paste(x$V2,substr(x$V4,4,8),sep="
"),format='%Y-%m-%d
2008 Mar 22
2
intraday OHLC plot
I want to create a open/high/low/last plot of intraday data.
I try to use the function plotOHLC from the tsteries package. I create
my own multiple time series and then try to plot it.
raw Data Format (file eurusd2.csv):
"Date (GMT)" "Open" "High" "Low" "Last"
17-03-2008 00:00:00 1,5764 1,5766 1,5747 1,5750
17-03-2008 00:05:00 1,5749 1,5750 1,5741
2006 Jan 26
2
footnote in postscript lattice
I would like to add a footnote to this graph but do not see a "footnote" command in the package:lattice documentation. I would like to note the "span=.8"
as the footnote.
postscript(file= ?C:/Documents and Settings/dsonneborn/My Documents/Slovak/output/pcb_tables/smooth_PCB_lines_four.ps?, bg=?transparent?, onefile=FALSE, pointsize=20,paper=?letter?, horizontal=TRUE,
2007 Apr 09
3
plot log scale, axis original scale
I want to produce some boxplots and plot the logged values but have the
axis scale in the original, not-logged scale. It seeming like I have the
first few steps but I'm having trouble with the last. Here's what I'm
doing (which I got for the documentation for boxplot and axis). How do I
get the ticks to be labeled 2,5, and 9 of the original scale?
a<-c(1,2,3,4,5,6,7,8,9,10)
2006 May 17
1
boxplot
I am running this code to produce some boxplots. I have every thing that
I need except that I would like the whisker line to be solid line, not
dashes. I have reviewed the lattice docs but have not seemed to come
across this point.
print( bwplot( group ~ lpcb_tot, data= data7, xlab="Log PCB",
+ ylab=
+ " G B
+ S M S M
2004 Oct 06
1
plotOHLC unequally spaced time.
Hi I have som financial tick data that i have converted in to 45 min
bars. These are unequally spaced in time. I wonder if it is possible to
plot these like bars as the plotOHLC does. As I have understood plotOHLC
uses class(mts) that must be equally spaced?
Regards Paer
[[alternative HTML version deleted]]
2006 Jan 04
5
multiple lowess line in one plot
I'm using this code to plot a smoothed line. These two columns of data
really represent 4 groups and I'd like to plot a separate line for each
group but have them all in the same plot. The R-Docs for lowess do not
seem to indicate some type of "GROUPS=var_name" option. What would be
the syntax for this?
plot(AWGT ~ lipid )
lines(lowess(lipid , AWGT, f=.8))
--
Dean
2006 Jan 11
1
4 smoothed lines on xyplot
I am using the R code listed below to create 4 smoothed lines on a
xyplot. I'm having trouble fine tuning it. First I think I may need a
black and white plot so how do I get it to plot the lines with different
characters, preferable the same characters used in the key (plus, X
circle and triangle). I might also be interest in a version that draws
four solid lines of different colors but
2009 Jan 06
5
Changing Matrix Header
Dear all,
I have the following matrix.
> dat
A A A A A A A A A A
[1,] 0 0 0 0 0 0 0 0 0 0
[2,] 0 0 0 0 0 0 0 0 0 1
[3,] 0 0 0 0 0 0 0 0 0 2
How can I change it into:
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,] 0 0 0 0 0 0 0 0 0 0
[2,] 0 0 0 0 0 0 0 0 0 1
2003 Dec 14
1
A faster plotOHLC() for the tseries package
The plotOHLC function in the tseries package is useful to plot timeseries of
various financial assets with open/high/low/close data. I had often
wondered if it could be made to run a little faster. It turns out that the
following patch does
--- plotOHLC.R.orig 2003-12-14 12:02:20.000000000 -0600
+++ plotOHLC.R 2003-12-14 12:03:42.000000000 -0600
@@ -21,14 +21,9 @@
ylim <-
2004 Mar 03
5
get.hist.quote - is great, but am I missing something?
I find it's just great to be able to say:
library(tseries)
x <- get.hist.quote(instrument="ongc.ns")
and it gets a full time-series of the stock price of the symbol
ongc.ns from Yahoo quote.
However, once my hopes have been raised by such beauty :-) I get
disappointed when I do
> plot(x)
and the annotation is horrible! The x axis is not labelled as
dates. The default
2005 Feb 03
1
two issues
I'm working on a graphic but have run into a road block about two
issues. I don't have a color printer so I want to produce the graphic in
black and white. I'm currently using this
statement trellis.device(bg="white") but the body of the graphic contains
color. What is the code to create the whole thing in black and white. The
other issue might be a bit more tricky.
2005 Feb 10
1
skip missing values in plots
I really like these Trellis graphics but how do I get this code to
skip the missing?
logreg<-read.csv("logreg.csv", header=TRUE, sep=",", na.string=" ")
attach(logreg)
bwplot(yesno~bc_pcb_tot |varlist, data=logreg, main="Box Cox PCB
transformation", auto.key=TRUE, fontfamily = "HersheySans" )
Dean Sonneborn M.S.
Public Health Sciences *
2005 Feb 24
1
3 boxplots in one
I currently have 3 separate boxplots but would like to put them all in the
graphic so they would have the same scale. Below are the three statements
and as you can see the Y axis is weight:
bwplot(AWGT~ male2 ....
bwplot(AWGT ~ bin_pcb2 .....
bwplot(AWGT ~ bin_pcb2 | male2 .....
Does anyone have some sample code where they have done something like this?
Thanks,
Dean Sonneborn M.S.
Public
2005 Aug 11
2
scatter plot
I'd like to do a simple scatter plot but instead of using the variable
values on the X axis I would like to plot the percentiles. I searched in
the manual for percentiles but did not find what I was looking for. I've
been using SAS for several years but I new to R.
--
Dean Sonneborn
Programmer Analyst
Department of Public Health Sciences
University of California, Davis
(916) 734-6656
2006 Mar 14
2
map question
Would anyone with experience with the map functions know how to divide
Czechoslovakia into the Czech Republic and Slovakia. They have been two
separate countries for some time now. I'm thinking about the worldhires
map database in particular.
--
Dean Sonneborn, MS
Programmer Analyst
Department of Public Health Sciences
University of California, Davis
(530) 754-9516
2006 Aug 29
1
subset by two variables
I'm using this syntax to create data subsets for plots:
subset=source=="Both". Now I would like to create a subset defined by
two different variables like this: subset=source=="Both"
subset=site=="home" but this syntax is not correct. The documents in the
manual for subset seem to be creating whole new data files not just
selecting rows based on the
2005 Sep 28
1
gee models summary
I'm running some GEE models but when I request the summary(pcb.gee) all
I get are rows and rows of intercorelations and they fill up the screen
buffer so I can not even scroll back to see what else might be in the
summary. How do I get the summary function to NOT print the
intercorrelations?
Thanks,
--
Dean Sonneborn
Programmer Analyst
Department of Public Health Sciences
University of
2008 Sep 25
3
OHLC Plot with EMA in it
Hi there
I have some timeseries data which I plot in a OHLC Plot. In the same
plot I'd like to have the EMA of this timeseries. I tried to add the
EMA point to OHLC with lines(), but this doesn't work. Has anyone an
idea how to handle it?
Regards, Michael Zak
2016 Apr 06
2
Is this a bug in quantmod::OpCl?
OpCl works on xts objects but not on quantmod.OHLC objects. Is this a bug?
Example error:
x.Date <- as.Date("2003-02-01") + c(1, 3, 7, 9, 14) - 1
set.seed(1)
x <- zoo(matrix(runif(20, 0, 1), nrow=5, ncol=4), x.Date)
q <- as.quantmod.OHLC(x,c("Open","High","Low","Close"))
# error
OpCl(q)
#> Error in `colnames<-`(`*tmp*`, value =