similar to: Help with data type

Displaying 20 results from an estimated 1000 matches similar to: "Help with data type"

2012 Dec 06
1
Fuction Error
I'm calling a list of symbols and then using a function to build a data frame from that symbol list. It works great until I introduce this index symbol from yahoo '^GSPC'. When and index symbol is introduced I get and error which is below. > Data <- symbolFrame(symbols) Error in get(S) : object '^GSPC' not found Since R does not like the ^ in front of a name it
2011 Nov 10
2
Error in axis ????
I did an update of both rstudio and my packages. I had some trouble but was able to move a lot of the packages so most troubles seem to be behind me. But having a problem with code that previously ran fine. See below: require(quantmod) Loading required package: quantmod Loading required package: Defaults Loading required package: xts Loading required package: zoo Attaching package: ?zoo? The
2010 Aug 15
2
Adding colored background area to a time series plot
Hi, I am trying to add a rectangular colored background area to a plot of a time series of relative price changes. I believe that what I'm trying to do is very similar to the question and example given here: http://www.mail-archive.com/r-help at stat.math.ethz.ch/msg73948.html http://www.mayin.org/ajayshah/KB/R/html/g5.html My problem/difference is that my time series looks like so: >
2011 Jun 03
2
tkrplot Newbie
Hello, I am trying to write a tcltk based program that plots/manipulates xts/xoo time series objects. I have the code I used from ## http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/tkrplot.html : ## require(quantmod) require(tcltk) library(tkrplot) Sys.setenv(TZ="GMT") getSymbols("^GSPC", from = "1960-01-01") Myhscale <- 2.5 # Horizontal scaling
2011 May 05
1
quantmod's addTA plotting functions
Hi, I'm having trouble with quantmod's addTA plotting functions. They seem to work fine when run from the command line. But when run inside a function, only the last one run is visible. Here's an example. test.addTA <- function(from = "2010-06-01") { getSymbols("^GSPC", from = from) GSPC.close <- GSPC[,"GSPC.Close"] GSPC.EMA.3
2011 May 07
2
Convenience-at-the-expense-of-clarity (was: quantmod's addTA plotting functions)
Thanks, Writing plot(addTA()) worked fine. I find myself with such mixed feelings about R. After finding that addTA worked fine at the command line but not in a function, I puzzled for a long time about what kind of virtual machine structure could possibly account for that. I couldn't think of any. It turns out that this isn't due to an R virtual machine structure. The reason addTA adds
2012 Feb 11
1
object not found - Can not figure out why I get this error: Error in NROW(yCoordinatesOfLines) : object 'low' not found
Hi, I have been using R for over a year now. I am a very happy user. Thank you for making this happen. This is my first question to this list. I trying to add some functions to quantmod that would enable me to draw arbitrary lines and text and make sure they are redrawn. I have created following function: require(quantmod) # Add horizontal line to graph produced by quantmod::chart_Series()
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")) {  
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 ) {
2009 Aug 17
3
Newbie question re stddev, quantmod and performanceanalytics
Hi, I am trying to calculate the std dev of returns of YHOO so far i got: getSymbols("YHOO") retYHOO <- Return.calculate(Cl(YHOO)) > sd(retYHOO) YHOO.Close NA but i received an NA....can any assist? tks! -- View this message in context: http://www.nabble.com/Newbie-question-re-stddev%2C-quantmod-and-performanceanalytics-tp25001293p25001293.html Sent from the R help
2017 Sep 01
3
How to use getSymbols() to get annual data
Dear Sir/Madam, How to use getSymbols() to get annual data? For example, I need the annual stock price of APPLE from the year 2000 to 2016. How to write the command? I only know how to get the daily data. It is: getSymbols("AAPL",from="2000-01-01",to="2016-12-31") Thank you very much. Have a good week! Best regards, Yingrui Liu [[alternative HTML
2010 Mar 16
1
Simple for-loop runs out of memory
I have the following simple for-loop, which makes R crash every time. The length of the vectors is about 1200 rows, 1 column. n = max(length(GSPC),length(FTSE)) for(i in 1:1000) { if (row.names(GSPC)[i]==row.names(FTSE)[i]){ } else { if (row.names(GSPC)[i]>row.names(FTSE)[i]){ GSPC<-rbind(GSPC[1:(i-1),],GSPC[(i-1):length(GSPC),]) row.names(GSPC)[i]=row.names(FTSE)[i] } else {
2011 Nov 20
2
Continuasly Compunded Returns with quantmod-data
Hey guys, i want to calculate the continuasly compounded returns for stock prices. Formula for CCR: R_t = ln(P_t/P_{t-1})*100 With R: First i have to modify the vectors, so that they have the same length and we start at the second observation. log(GOOG1[-1]/GOOG1[1:length(GOOG1)-1])*100 That does work with normal vectors. My Questions: 1) I want to use this for stock prices. so i
2011 Aug 25
1
How download Yahoo Quote?
Hello all: Friend told me that we can download the stock historical quote from Yahoo site by R! Could you tell me that is true or not, how to do that? Thanks! -- View this message in context: http://r.789695.n4.nabble.com/How-download-Yahoo-Quote-tp3769563p3769563.html Sent from the R help mailing list archive at Nabble.com.
2011 Feb 23
3
Using string to call/manipulate an object
I am using getSymbols function from quantmod package to get price data from internet. Currently I have: my.ticker <- "IBM" getSymbols(my.ticker,src="google") This creates an xts object named my.ticker which contains historical price data for IBM. How can I call and manipulating this xts object using my original string my.ticker? I want to do: colnames(my.ticker) <-
2000 Jul 07
1
reorganizing a data frame
Hi, I have what I think is an easy question. I have a data frame, called stockdata, of stock prices that looks like this: date ticker close 1 01/02/1998 GE 24.667 2 01/05/1998 GE 25.104 3 01/06/1998 GE 24.771 4 01/07/1998 GE 24.979 5 01/08/1998 GE 24.750 6 01/02/1998 HIT 71.125 7 01/05/1998 HIT 72.313
2012 Jul 07
1
Getting objects from quantmod ticker list
Hi all, I would need to put datas downloaded with quantmod into a matrix or a data frame. Suppose to start from here: *require(quantmod) ticker.list <- c('AAA', 'ALTSALES', 'AMBNS', 'AMBSL', 'BAA', 'EMRATIO', 'FEDFUNDS', 'GASPRICE', 'GS1', 'GS10', 'GS20', 'LNS14100000', 'MORTG',
2009 Mar 05
3
character string as object name
Can someone please tell me why the following (last line) doesn't work (as I expect it to :-) library(quantmod) a = getSymbols("MSFT",from="2009-3-01") a MSFT eval(as.name(a)) MSFT$MSFT.Adjusted b=paste(a,'$MSFT.Adjusted',sep='') b eval(as.name(b)) Why does this last line not work the way the earlier eval does? Thanks.
2010 Sep 10
2
[xts, quantmod] segfault probelm when I work with memcpy function
Hi, I work with SEXP C code and with xts and quantmod packages. I try to touch how xts internal works. So we have R session and: > ls() character(0) > getSymbols('AAPL') # quantmod package [1] "AAPL" > ls() [1] "AAPL" > str(AAPL) An ?xts? object from 2007-01-03 to 2010-09-09 containing: Data: num [1:929, 1:6] 86.3 84 85.8 86 86.5 ... - attr(*,
2009 Feb 07
1
Yahoo data downloading problem
Hi, I got some problems while was trying to download data from Yahoo using yahoo.get.hist.quote() function. My script is as follows : app <- yahoo.get.hist.quote("aapl", start="02/07/09", end="02/07/06", quote="close") However I got following error : trying URL