[R] missed values

arun smartpink111 at yahoo.com
Fri Nov 30 13:41:53 CET 2012


HI,
Use,
?na.omit()
na.omit(data)
A.K.




----- Original Message -----
From: Vasilchenko Aleksander <vasilchenko.a.p at gmail.com>
To: r-help at r-project.org
Cc: 
Sent: Friday, November 30, 2012 7:07 AM
Subject: [R] missed values

Hello
I have dataframe
101 2008-07 0.2898966
102 2008-08 0.3101667
103 2008-09 0.3730476
104 2008-10 0.2717037
105 2008-11 0.1344286
106 2008-12 0.1375000
107 2009-01 0.1781000
108 2009-02 0.2146667
109 2009-03 0.2808235
110 2009-04 0.4326250
111 2009-05 0.3420741
112 2009-06 0.2675238
113 2009-07 0.2478667
114 2009-08 0.3147000
115 2009-09 0.3437826
116 2009-10 0.2057391
117 2009-11 0.1824737
118 2009-12 0.1520714
119 2010-01 0.1485455
120 2010-02 0.1755556
121 2010-03 0.3072000
122 2010-04 0.3294445
123 2010-05 0.3278125
124 2010-06 0.2865000
125 2010-07 0.3170333
126 2010-08 0.2052143
127 2010-09 0.1837368
128 2010-10 0.1652778
129 2010-11 0.1292500
130 2010-12 0.1366250
131 2011-01 0.1909231
132 2011-02 0.1841177
133 2011-03 0.2897222
134 2011-04 0.3084211
135 2011-05 0.3349600
136 2011-06 0.3157917
137 2011-07 0.2755652
138 2011-08 0.2019355
139 2011-09 0.3325556
140 2011-10 0.1724348
141 2011-11 0.1935200
142 2011-12 0.1388000
143 2012-01 0.1484500
144 2012-02 0.2043333
145 2012-03       NaN
146 2012-04       NaN
147 2012-05       NaN
148 2012-06       NaN
149 2012-07       NaN
150 2012-08       NaN
151 2012-09       NaN
then I use function df.ts<- ts(df[,2],start=c(2004,10),freq=12) and try to
use stl(log(df.ts),s.window="periodic") But I have an error related with
missed values.
How can omit missing values?
Regards Aleksander

    [[alternative HTML version deleted]]

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.





More information about the R-help mailing list