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
-18 19:37:26 BST
On Sun, Apr 18, 2010 at 1:25 PM, simeon duckworth simeonduckwo...@gmail.com
wrote:
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
... forgot to post this back to the r-list.
it seems that the problem is with xts rather than zoo and yearmon per se ie
using yearmon to index xts gives inconsistent results.
grateful for any help anyone can offer.
thanks
On Sun, Apr 18, 2010 at 8:15 PM, simeon duckworth simeonduckwo
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)
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)
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
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
)
}
On Sat, Mar 28, 2009 at 9:45 AM, Stephan Kolassa stephan.kola...@gmx.dewrote:
Hi Simeon,
?gsub
HTH,
Stephan
simeon duckworth schrieb:
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
}
Best of luck,
Stephan
simeon duckworth schrieb:
stephan
sorry for not being clear - but thats exactly what i want.
i'd like to replace every complex string that contains red with just
red, and then so on with blue, yellow etc
my data is of the form
x xx xx
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
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
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
12 matches
Mail list logo