Hi,
I have a data frame named data and with the statement
data[5:length(data[[1]]),] I can get row 5 to the end of the data.
> data
role counts
1 Agent220
2 Theme169
3 Patient 67
4 Location 41
5 Destination 32
6
On Sat, Jan 31, 2015 at 2:16 PM, Mikael Olai Milhøj
wrote:
> Hi
>
> Is there an easy way to drop, for instance, the first 4 observation of a
> time series object in R? I have tried to google the answer without any
> luck.
>
> To be more clear:
> Let us say that I have a time seres object x which d
For class 'ts' the 'window' function in the base package will do it.
> x <- ts(101:117, start=2001.75, frequency=4)
> x
Qtr1 Qtr2 Qtr3 Qtr4
2001 101
2002 102 103 104 105
2003 106 107 108 109
2004 110 111 112 113
2005 114 115 116 117
> window(x, start=2002.5)
Hi
Is there an easy way to drop, for instance, the first 4 observation of a
time series object in R? I have tried to google the answer without any
luck.
To be more clear:
Let us say that I have a time seres object x which data from 2000Q1 to
2014Q4 but I only want the data from 2001Q1 to 2014Q4.H
4 matches
Mail list logo