<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<DEFANGED_meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
<pre class="moz-signature" cols="50">hello,
I have a little problem with my script:
I select a subset from a data frame
<i>for (i in 1:20){
T$pippo[T$pluto==i]
}</i>
but sometime it is void because T$pluto==5 does not exists, the R answer is:
<i>T$pippo[T$pluto==5]
> numeric(0)</i>
how to exclude this null subset?
and what is numeric(0), similar to NA?
I try an if statement, but how to write if T$pippo[T$pluto==i] is numeric(0)???
Thanks a lot.
Maxi
-------------
Ing. Massimiliano Cannata
Istituto di Scienze della Terra - SUPSI
C.P. 72 - CH-6952 Canobbio (Ticino, Switzerland)
Tel +41 91 /935 12 25 - Fax +41 91 /935 12 09
eMail: <a class="moz-txt-link-abbreviated" href="mailto:massimiliano.cannata@supsi.ch">massimiliano.cannata@supsi.ch</a>
Internet: <a class="moz-txt-link-freetext" href="http://www.ist.supsi.ch">http://www.ist.supsi.ch</a>
</pre>
</body>
</html>