similar to: Problem at adding lines on a graphics with lines() function

Displaying 20 results from an estimated 4000 matches similar to: "Problem at adding lines on a graphics with lines() function"

2009 Nov 16
3
Error on reading an excel file
Hello everybody, here is the code I use to read an excel file containing two rows, one of date, the other of prices: library(RODBC) z <- odbcConnectExcel("SPX_HistoricalData.xls") datas <- sqlFetch(z,"Sheet1") close(z) It works pretty well but the only thing is that the datas stop at row 7530 and I don?t know why datas is a data frame that contains 7531 rows with the
2009 Nov 16
5
Writing a data frame in an excel file
Hello, I am having trouble by using the write.table function to write a data frame of 4 columns and 7530 rows. I don?t know if I should just use a sep="\n" and change the .xls file into a .csv file. Thanks in advance ----- Anna Lippel new in R so be careful I should be asking a loooooooot of questions!:teeth: -- View this message in context:
2009 Nov 18
1
Creating an excel file and manipulating it from R
Hello everybody, I?ve been looking for a function that would create an excel file in my working directory where I would write my dataframe but I only found the functions to write or read in an existing file that you gave me on my former post or on some websites. I can?t find either functions to manipulate those datas: for example, I would like some lines to be red or green according to their
2009 Nov 19
1
Problem with sqlSave
Hello, the sqlSave function is used in order to write a dataframe on excel. This function creates worksheets using the attribute tablename and writes the data.frame in it. What I want to do is to create this data.frame but being able in case this worksheet already exists to delete the former datas and write the new ones in it. I used the safer and append attributes. When you set safer to false,
2012 Aug 05
1
R: Help xts object Subset Date by Day of the Week
I have a xts object made of daily closing prices I have acquired using quantmod. Here is my code: library(xts) library(quantmod) library(lubridate) # Gets SPY data getSymbols("SPY") # Subset Prices to just closing price SP500 <- Cl(SPY) # Show day of the week for each date using 2-6 for monday-friday SP500wd <- wday(SP500) # Add Price and days of week together
2007 Sep 01
1
Problem in downloading Yahoo Finance data from R
Hi R users, I have a problem in downloading Yahoo Finance data from R. I have tried an example given in R, to download. The error is given below: >library(fCalendar) > yahooImport("s=IBM&a=11&b=1&c=1999&d=0&q=31&f=2000&z=IBM&x=.csv ", file = "D:\\ Downlaod",source = "http://ichart.yahoo.com/table.csv?", save = FALSE,
2008 Sep 22
1
Help for SUR model
I am an R beginner and trying to run a SUR model in R framework. subset(esasp500, Obs <=449 & Obs>=197, select = -Date) ->ev13sub c(Obs>=397) & c(Obs<=399) ->d13 c(Obs>=400) & c(Obs<=449) ->f13 SP500*f13 ->SP500f13 BBC~SP500+d13+SP500f13 ->sur132 BOW~SP500+d13+SP500f13 ->sur133 CSK~SP500+d13+SP500f13 ->sur134
2013 Jan 08
3
Conditional Statistics
Hello, I am a new user of R. I am coming from SAS and do statistics on stock market data, economic data, and social data. My question is this: How can you get the mean, standard dev, etc. of a variable based on a conditional statement on either the same variable or a different variable in the same data set? So if I had the closing prices of the S&P from 01/01/1990-12/31/1990, how could I get
2007 Nov 09
1
Problem reading data in Rmetrics
Hi folks - After upgrading to the latest version of Rmetrics, I can't read in data like I used to. Is anyone seeing the following? It seems to truncate the dates after I use "as.timeSeries". -John SP500<-read.table("SP500.csv",header=TRUE,sep=",") > head(SP500) Date Open High Low Close Volume 1 08/04/06 1280.26 1292.92
2008 Jan 24
1
Error using Rmetrics to read data
Hi folks. This set of code used to work, but after upgrading to the latest version of Rmetrics it no longer does. Any ideas? SP500<-read.table("SP500.csv",header=TRUE,sep=",") > head(SP500) Date Open High Low Close Volume Close2 1 8/4/2006 1280.26 1292.92 1273.82 1279.40 2530970112 1279.40 2 8/3/2006 1278.22 1283.96 1271.25 1280.27
2006 Jun 23
3
Problems with weekday extraction from zoo objects
Hi Folks! I'm struggling with dates - but enough about my personal life..... I have two daily time series files. In one (x) the date format is Y/m/d and the other (y) is d/m/y. I used read.zoo on both and they read into R with no problem. Then I use: weekdays(as.Date(x$DATE)) and get what I expect - all the days of the week in my data set. When I use:
2010 Mar 17
2
Troubles on retrieving rownames
Hi guys, I am using the blp() function from RBloomberg package which returns a matrix of prices with the columns corresponding to the security name and the columns to the date. When I have a look at the matrix I can see the rownames (dates) on the left of the prices but when I call the rownames() function it returns me a NULL value. It worked perfectly until I had to reinstall the RBloomberg
2009 Nov 13
4
Simple if else statement problem
Hello, I am getting an error with the following code: if( P2 > P1) + { + P<-P2 + } > else Erro: unexpected 'else' in "else" > { + P<-P1 + } I checked the syntax so I don?t understand, I have other if else statements with the same syntax working. Thanks in advance -- View this message in context:
2011 Feb 19
4
Accessing DF index
I have a dataframe called x2. It seems to have a date column but I can't access it or give it a name or convert it to a date. How do I refer to that first column and make it a date ? When I try x2[1,] I get the second column. head(x2) FAIRX SP500 delta 2000-08-31 0.010101096 0.007426964 0.002674132 2000-09-29 0.096679730 -0.054966292 0.151646023 2000-10-31
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
2006 Nov 22
2
problems with garchFit
Hi all, I post it on both r-help and r-finance since I don't know where is most appropriate for this topic. Sorry if it bothers you. I did garch fitting on S&P500 monthly returns with garchFit from fSeries. I got same coefficients from all cond.dist except normal. I thought that is probabaly usual for the data. But when I play with it, I got another question. I plot skew normal with
2008 Jun 19
1
How can I shade the background area of a zoo time series object between specific dates?
Dear list members, How can I shade the background area of a zoo time series object between specific dates? eg. library(tseries) library(zoo) SP500<-get.hist.quote("^GSPC", start = "1990-01-01", quote = "Close") plot(SP500) How can I produce the same plot but with a (say) red background between 2007-04-12 and 2008-05-14 ?
2010 Mar 03
5
filtering signals per day
Hello R lovers, I have a vector of dates and signals. I want to filter the signals per day in a way that only the first signal of the day remains like this: Dates Signals Filtered Signal 2006-11-02 0 0 2006-11-02 1 1 2006-11-02 0 0 2006-11-02 1 0 2006-11-02 1
2009 Nov 13
4
Change working directory
Hello, I am using setwd() to change the working directory but I have to enter it everytime I open R, is there a way to set this permanently as a working directory? Thanx =^D -- View this message in context: http://old.nabble.com/Change-working-directory-tp26337486p26337486.html Sent from the R help mailing list archive at Nabble.com.
2010 Jan 29
7
Simple question on replace a matrix row
Hello, I have a matrix mat1 of dim [1,8] and mat2 of dim[30,8], I want to replace the first row of mat2 with mat1, this is what I do: mat2[1,]<-mat1 but it transforms mat2 in a list I don't understand, I want it to stay a matrix... ----- Anna Lippel -- View this message in context: http://n4.nabble.com/Simple-question-on-replace-a-matrix-row-tp1427857p1427857.html Sent from the R help