holtman [EMAIL PROTECTED]
To: Murali Menon [EMAIL PROTECTED]
CC: r-help@stat.math.ethz.ch
Subject: Re: [R] array searches
Date: Fri, 16 Feb 2007 10:21:40 -0500
try this:
x - scan(textConnection(30/01/2007 0
+ 31/01/2007 -1
+ 01/02/2007 -1
+ 02/02/2007 -1
+ 03/02/2007 1
+ 04
Folks,
I have a dataframe comprising a column of dates and a column of signals (-1,
0, 1) that looks something like this:
30/01/2007 0
31/01/2007 -1
01/02/2007 -1
02/02/2007 -1
03/02/2007 1
04/02/2007 1
05/02/2007 1
06/02/2007 1
07/02/2007 1
try this:
x - scan(textConnection(30/01/2007 0
+ 31/01/2007 -1
+ 01/02/2007 -1
+ 02/02/2007 -1
+ 03/02/2007 1
+ 04/02/2007 1
+ 05/02/2007 1
+ 06/02/2007 1
+ 07/02/2007 1
+ 08/02/2007 1
+ 09/02/2007 0
+ 10/02/2007 0
+ 11/02/2007 0
+