Michael Graber wrote:
> Dear R-users,
>
> I am very new to R, so maybe my question is very easy to answer.
> I have the following table:
> TAB1<-data.frame(Name,Number), "Name" and "Number" are all character
> strings,
> it looks like this:
>
> Name Number
>
> ab 2
>
[etc]
> gh 1
To delete duplicate rows, use unique(TAB1): see its help page.
It looks to me as if the names are missing values NA and *not* start with
NA. If so, you want to use
TAB1[!is.na(TAB1$Name), ]
Otherwise, perhaps TAB1[substr(TAB1$Name, 1, 2) == "NA", ].
On Wed, 27 Jul 2005, Michael Graber wrote:
Dear R-users,
I am very new to R, so maybe my question is very easy to answer.
I have the following table:
TAB1<-data.frame(Name,Number), "Name" and "Number" are all character
strings,
it looks like this:
Name Number
ab 2
ab 2
NA 15
NA 15
NA 15
cd 3
ef 1