Displaying 9 results from an estimated 9 matches for "simeonduckworth".
2010 Apr 18
4
confused with yearmon, xts and maybe zoo
R-listers,
I am using xts with a yearmon index, but am getting some inconsistent
results with the date index when i drop observations (for example by using
na.omit).
The issue is illustrated in the example below. If I start with a monthly
zooreg series starting in 2009, yearmon converts this to "Dec-2008". Not
such a worry for my example, but strange. Having converted to xts, i drop
2008 Nov 04
2
ggplot & annotating charts
Dear "R-listers"
I've been trying to figure out how to annotate charts in ggplot (ie add text
to line charts, highlighted boxes etc). By and large, I can get close to
what i want with base graphics, but would ideally like to use ggplot
whenever possible (additionally, i would like to add text labels
automatically to the chart). The code is below
I suspect I need to use geom_rect,
2009 Jan 17
1
Downloading Excel file & reading a range
I am trying to figure out a way to download an Excel file and then read a
range into R - so that i can have a reasonably automated process. I have
been trying to use the RODBC package, but with little success. I suspect
that this isnt the right route
Here is some code. My aim is to read in the data starting in H69:H283 in
sheet 2.
2009 Aug 18
1
Plyr and memory allocation issue
Dear R users
I am trying to create some new variables for a 4401 x 30 dataframe using
ddply and transform. The "id" variable i am using is a factor with 1330
levles eg
bb <- function(df) {transform(df,
years = study.year - min(study.year) + 1,
periods = length(study.year)
)}
test <- ddply(x,.(id),bb)
I havent copied the data to avoid clogging the
2010 Jan 14
0
chron, xts and zoo
dear r folks
i am a bit puzzled about how to use chron as an index xts and why it differs
from zoo.
in this example, why can i index zoo but not xts
x<-1:23
time.of.day <- times(paste(x,":0:0",sep=""),format="h:m:s")
day <- dates("4/8/90")
period <- chron(dates=day,times=time.of.day)
xts(1:23,period)
zoo(1:23,period)
i suspect it might be to
2009 Feb 22
0
calculating compound growth rates - creating a flexible function
R-listers
I am still finding my way with R - and feel that I am making a complete dogs
dinner of something that should be pretty simple.
What I'd like to do is to create a simple function that i can use to
calculate compound growth rates (CAGRs) over a data frame. I'd like the
function to be flexible enough to vary the time period and to run over
'panel data'.
The issue is that
2009 May 28
4
Read & name multiple excel sheets using RODBC
I'd like to be able to read multiple sheets from an excel workbook and use
the sheet name to name the resulting dataframe using RODBC. at the moment
i've figured out how to do it the long way (see below) but feel sure that
there is a speedier & possibly automatic way to do it in R. i've tried to
run a loop using sqlTables but it seemed to break the connection. unless
i've
2009 Mar 28
2
text matching and substitution
I am trying to simplify a text variable by matching and replacing it with a
string in another vector
so for example in
colours <- paste(letters,colours(),"stuff",LETTERS)
find and replace with ("red","blue","green","gray","yellow","other") -
irrespective of case
its a large dataset, so i'd like to be able to do this
2008 Feb 16
1
ggplot2 & ribbon
I would like to be able to shade between two lines using ggplot2 (with
faceting too). But, despite reading all the documentation on the website,
cant figure out how to do it (either because i am a novice or idiot - or,
of course, possibly both)
My data looks is readership of paid & free newspapers in london by age since
1994. The structure is
reading.melt <-
structure(list(Date =