similar to: Changing Attribute With Paste

Displaying 20 results from an estimated 3000 matches similar to: "Changing Attribute With Paste"

2011 Apr 13
1
Assign with Paste Problem
Dear R Helpers, I am trying to change the name of an object using the assign function. When I use paste on the new object but not the old, everything is fine: The new object is a direct copy of the old object. When I use a paste for both the new and the old object, however, the new object is simply the character representation of the old object name, not the old object itself. The example
2011 Mar 18
1
quantmod Some Single Letter Tickers Not getFin
Hi, I have been learning the quantmod package over the last several days. I went to check some of my data pulls against other sources and was surprised to find that a few tickers that have single characters do not successfully scrape from Google Finance using getFin(). Particularly require(quantmod) getFin("A") getFin("E") getFin("F") getFin("G")
2018 Mar 05
0
Interpret List Label as Date from Quantmod getOptionChain
Package? The **names** of the top levels of your lists, "Mar.09.2018", "Mar.23.2018" certainly look like dates and if they are -- I have no idea what package/context is -- they certainly could be formatted as such. See e.g. "date-time" . There are also several package that provide date tools. Cheers, Bert Bert Gunter "The trouble with having an open mind is
2018 Mar 05
2
Interpret List Label as Date from Quantmod getOptionChain
Hi R Helpers, Is it possible to interpret the top level of the list as a date after downloading all the option chain data for a ticker? For example, after I run aapl_total<-getOptionChain("AAPL", NULL) the top descriptor of the lists is a date (Mar.09.2018, Mar.23.2018, etc.). So if want to subset down to those parts of the list that correspond to say, (expiration)
2018 Mar 05
2
Interpret List Label as Date from Quantmod getOptionChain
Package? Quantmod. In the subject line. I agree that they look like dates, I don't know how to determine if they are actually dates. Josh Ulrich usually answers questions along these lines very informatively and quickly. One reasonable course of action is to wait to see if he does the same with this one. --JJS ________________________________ From: Bert Gunter <bgunter.4567 at
2011 Apr 12
2
Assign Character Value to Data Frame
Dear R Helpers, I am trying to write a character value to the row of a data frame and am running into a problem that I don't have when I do this for numeric arguments. For example, the following works just fine: > test<-data.frame(number=numeric(1)) > test[1,]<-.5 > test number 1 0.5 But the following bombs out: > hold<-data.frame(symbol=character(1)) >
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',
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) <-
2011 Dec 07
1
scatterplotting stock returns using quantmod and pairs()
I want to get data for a set of ticker symbols and compute the daily return of the adjusted close using quantmod, and then scatterplot returns using pairs(). The following gets data for the list of tickers: tickers <- c("SHY","TLT","SPY","IWM","GLD","IEV","ILF","EWJ","EPP","SAF","ASA")
2017 Aug 02
1
Looping Through QuantMod Objects
Dear R Helpers, I have run into a problem trying to perform a number of actions on a set of quantmod data objects through a loop and I am hoping that this is an easy problem for someone else as opposed to very difficult for me. The example task is to get the first three objects of the quarterly balance sheet for a number of companies from the getFinancials object and put them together into a
2017 Aug 07
1
tidyquant error downloading symbols for Index
Hi R Helpers, I recently tried to take advantage of the ability to download all the tickers in the S&P 500 using the functionality of tidyquant, but it threw an error. For summary, the set of commands that I ran was library(tidyquant) tq_index_options() tq_index("SP500") sessionInfo() R feedback including error message and sessionInfo are provided below. Guidance would be
2012 Oct 19
1
to.yearly()
v="IBM" library(quantmod) v v1=getSymbols(v) to.yearly(v1) =============================== when i pass the value through a variable in to.yearly() function it shows the error msg like "Error in try.xts(x) : Error in UseMethod("as.xts") : no applicable method for 'as.xts' applied to an object of class "character"" i need the result of OHLC
2012 Mar 04
1
quantmod getOptionChain Not Work
Dear R Helpers, I am still having trouble with the getOptionChain command in quantmod. I have the latest version of quantmod, etc. so I was under the impression that the problem was solved with updates to the package. If someone could let me know what I need to install in order to make this work, I would really appreciate it. My error message as session info are shown below. Thanks a bunch.
2013 Apr 14
3
Create New Column Inside Data Frame for Many Data Frames
Dear R Helpers, I have a large number of data frames and I need to create a new column inside each data frame. Because there is a large number, I need to "loop" through this, but I don't know the syntax of assigning a new column name dynamically. Below is a simple example of what I need to do. Assume that I have to do this for all 26 letters and you should see the form of the
2012 Aug 01
1
Time Series Have Date Show Days of the Week
I used quantmod to pull in price data from the ticker SPY. The data has date and closing price. I would like to show the day of the week for each closing price. Is that possible? Also, I would like to add the back into the data frame in a new column without changing the structure of the data set if possible. SPY 2009-01-02 92.96 2009-01-05 92.85 2009-01-06 93.47
2011 Jun 18
1
Trouble with Paste and Quotes and List Objects
Dear R Helpers, I have a list that contains a number of objects, each of them financial statement data from quantmod (although I don't think that knowledge of quantmod is necessary to help with this problem). > str(listfinobj) chr [1:4815] "A.f" "AA.f" "AACC.f" "AAME.f" "AAN.f" "AAON.f" "AAP.f" "AAPL.f"
2006 Mar 14
2
Multi-line paste function
Here's my contribution to R. When R interacts with external programs (MySQL, cURL, etc.), it often requires a pasted string that is sent to these programs. For readability reasons, it is often preferable to have complex commands (SQL for example) spread on several lines. However, the normal paste function requires to add additional ' ", ' at the end of each line and another '
2012 May 18
1
Financial Statements Date Subsetting
Dear All, I'm new at R, but I really just need a couple of things. The first thing I need is to figure out how to get each individual financial statement (CF,BS,IS). I need each individual one because getting them all at once allows for formatting issues once it is a CSV. The date subsetting is what I need because I will be running a statistical model in excel. I know I could probably
2011 Mar 12
3
pass character vector in instrument field of get.hist.quote function
I am new to R so I apologize if my question is trivial. I have not been able to figure out whether what I want to do is even possible. I have a data frame of stock ticker symbols which I store into R space from a txt file as follows: tickers <- read.csv("stocks.txt", header=FALSE, sep=",") tickers <- tickers[1] / the tickers are stored in the first column >
2008 Sep 23
4
perl expression question
If I have the string below. does someone know a regular expression to just get the "BLC.NYSE". I bought the O'Reilley book and read it when I can and I study the solutions on the list but I'm still not self sufficient with these things. Thanks. stock<-"/opt/limsrv/mark/research/equity/projects/testDL/stock_data/fhdb/US/BLC.NYSE"