Displaying 1 result from an estimated 1 matches for "isgoodrow".
2005 Aug 22
3
read a table ignoring specific rows ?
...e but was unable to find by myself).
I have a table, called infile :
1 2 3
4 5 6
7 8 9
I would like to read it and ignore the rows with 1st element > 3
I do it now with a for loop, and it's ok,
but I was expecting something simpler, like :
intable = read.table(infile);
newtable = intable[isgoodrow(intable)];
where : isgoodrow = function(therow)
{if (therow$V1 > 3) return(F) else return(T);};
(... but this don't work).
So, could somebody please tell me if there is a way to read
a table ignoring specific rows, without using a for loop ?
... and if yes how ?
Thanks
Vincent