Displaying 20 results from an estimated 900 matches similar to: "Download stock prices"
2006 Oct 26
4
Header of dataframe
Hi
I am fairly new to R and I would appreciate some help to hopefully a
trivial problem.
I created a function:
summary.aggregate <- function(y, ...)
{
temp.mean <- aggregate(y, FUN=mean, ...)
temp.sd <- aggregate(y, FUN=sd, ...)
temp.length <- aggregate(y, FUN=length, ...)
temp <- data.frame(cbind(mean=temp.mean$x,stdev=temp.sd$x,n=temp.length$x))
}
this outputs e.g.:
2006 Oct 12
3
Cross two dataframe
Dear r-users!
I would like to cross two data frame which have the same row number but
different in the number of column. Can anybody help me for this case ?
Thanks a lot in advance
--------------------------------------------------------------------------------
Majid Iravani
PhD Student
Swiss Federal Research Institute WSL
Research Group of Vegetation Ecology
Z?rcherstrasse 111
2008 May 21
3
Problem with R or fBasics Package (PR#11495)
I have a problem wirh R: After loding fBasics packages log funtion doesn't
work like as fallow:
Cenap ERDEMIR
Hacettepe University
Turkey
> log(20)
[1] 2.995732
> local({pkg <- select.list(sort(.packages(all.available = TRUE)))
+ if(nchar(pkg)) library(pkg, character.only=TRUE)})
Loading required package: fImport
Loading required package: fSeries
Loading required package: robustbase
2006 May 23
1
after identify labels dissapear XP
Greetings:
Using 'identify' to label points on a plot works just fine. However, when
saving under 'metafile' or using the clipboard the labels dissapear. I
believe it's an SDI issue. I am running last R with last Tinn-r under XP up
to date. Anything I can do besides going back to MDI :-)?
Thanks,
Mihai Nica, ABD
Jackson State University
ITT Tech Instructor
170 East Griffith
2007 Mar 25
2
plot of computed vector
gReetings:
I apologize for the non-programming language. I found what seems to be a
strange behavior of plot(). The code follows:
#_____________________________
N=3030; gn=.04; tn=1:100
n=N/(1+(N-1)*exp(-gn*tn))
N=n*(1-exp(-gn*tn))/(1-n*exp(-gn*tn))
plot(N) #strange plot
N
N=rep(3030, 100)
plot(N) #behaves as expected
________________________________
Windows XP, R 2.4.0. or 2.4.1
Thanks,
2006 Oct 07
3
merge and polylist
Greetings:
I would like to kindly ask for a little help. The rough code is:
#________________________________________________________
dat=data.frame(read.delim(file="all.txt", header = TRUE, sep = "\t",
quote="\"", dec=".",na.strings = "NA"))
nc=read.shape("astae.shp", dbf.data=TRUE, verbose=TRUE)
mappolys=Map2poly(nc)
submap
2013 Apr 22
2
subset dataframe
I can't understand what is happening. This is the code and results:
> agoa <- read.table(file = "C:/Users/HTPC/Documents/_Documents/Research/WithDidia/AGOAUSImports.txt", header = T, sep = "\t", dec = ".", na.strings = "NA", stringsAsFactors = T)#
> str(agoa); names(agoa)
'data.frame':109 obs. of 19 variables:
$ X : Factor w/ 39
2004 Oct 17
4
Descriptive statistics table
Greetings:
I would like to make a table with descriptive statistics for a data.frame. I guess the question is how can I put together, in a table, the results from, say:
apply(df, 2, mean, na.rm =T)
apply(df, 2, median, na.rm =T)
.......
Thanks,
Mihai Nica
Jackson State University
155 B Parkhurst Dr.
Jackson, MS 39202
601 969 5423
601 914 0361
[[alternative HTML version deleted]]
2006 Oct 30
3
plot history
_______________________________________________________________________________________
Hi,
When I create multiple graphs subsequent graphs overwrite previous
graphs. How do I keep all my graphs in the current workspace (but not
all on the same page) so I can scroll through them?
thanks,
Rohini
Rohini Mulford
Senior Research Analyst
Technical Research
Research &
2006 Nov 06
7
Colour-coded Editor for R Code
Do any of you know any simple programming editors for R scripts which offer
basic colour-coding and bracket-matching facilities?
Dregging through scripts to find a missing comma or parentheses is something
I'd rather do less of...
Jon Minton
[[alternative HTML version deleted]]
2004 Nov 26
1
Coplot Given text
Greetings:
I am unsuccessful in suppressing "Given : myvariable" from a coplot. There was such a question in the past but the thread breaks down. I am sure this is a "for dummies" question :-). I tried:
coplot(myvar~myvar | myvar, show.given=FALSE, xlab="....", ylab="...", main=" ")
and some other variations (including without main=" ")
2007 Feb 15
3
something missing in summary()
I just noticed that two key pieces of information are not given by
the summary() command: N and SD. we are given the N missing, but
not the converse. I know these summary value can be obtained easy,
but can't understand why these two pieces of information are not
provided with the other info.
Thanks,
Gerard
2006 Dec 27
3
counties in different colours using map()
Hi,
I would like to plot a map of US counties using different colors. map()
seems to be the function to use, e.g.
library(maps); map('usa'); map('county', 'colorado', add=T,fill = T,
col=c(1:5))
plots Colorado counties using colours 1 to 5.
However, I want each color to represent a certain value - a value to be
picked from a data frame.
This code should show a
2008 Oct 07
0
RBloomberg - Converting international stock prices into $US
To all:
I'm using RBloomberg to pull historical equity prices across a range of
international markets. Bloomberg defaults to returning stock prices to
R in local currency, for example,
blpGetData(conn, "ALUA AR Equity", "PX_LAST",start="09/30/08",
end="09/30/08")
returns a stock price in Argentine Peso's. If ones use the BLPH
function directly
2006 Dec 10
1
using zoo for daily stock prices
Hi all,
Please forgive this newbie posting to the list for the first time if I
haven't followed proper procedure. I have read through many of the archives
and find them most useful in learning R.
I have ten years daily data (stock closing prices) which I read in zoo
format. I am having problems coding R to run a count of how many days in
each month have a price higher than the first day
2012 Feb 21
0
BHHH algorithm on duration time models for stock prices
I am currently trying to find MLE of a function with four parameters. My codes run well but i don't get the results. I get the following message:
BHHH maximisation
Number of iterations: 0
Return code: 100
Initial value out of range.
I don't know this is so because of the way i have written my loglikelihood or what.
The loglikelihood
LogLik<-function(param){
beta_1<-param[1]
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,
2004 Aug 23
2
Reading GAL file
Greetings:
I am trying to work with spdep (everything is "brand new" downloaded this morning). OS = Windows 2000 (also up to date). The code I am using follows:
#example
gal.county=read.geoda("lnpilnd.GAL", row.names=NULL, skip=0)
summary.nb(gal.county)
Error in summary.nb(gal.county) : Not a neighbours list
#end
The gal file works just fine in GeoDa (also up to date).
2004 Mar 11
6
saving a data.frame to "\t" files
Windows 2000, updated R and packages.
could somebody pleaseeeeeeeee help with saving a data.frame with column
names into "\t" text files for later importing in other programs? It seems an easy task, yet... it beats me.
thanks,
Mihai Nica
Jackson State University
[[alternative HTML version deleted]]
2005 Jun 15
4
Multiple line plots
Greetings,
I would like to plot three lines on the same figure, and I am lost. There is
an answer to a similar thread… but I tried matplot and it is beyond me. An
example of the data follows:
Year EM IM BM
1983 9.1 16.8 -7.7
1984 12.0 18.0 -6.0
1985 13.6 19.1 -5.5
1986 12.4 17.3 -4.9
1987 14.6 20.3 -5.7
1988 20.6 23.3 -2.6
1989 25.0 27.2 -2.2
1990 28.4 30.2 -1.8
1991 33.3 31.2 2.1
1992 40.6