Try:
a<-c("o","o","a","a","g","o","a","p")
table(a)
a
a g o p
3 1 3 1
Clint BowmanINTERNET: cl...@ecy.wa.gov
Air Dispersion Modeler INTERNET: cl...@math.utah.edu
Air Quality Program VOICE: (360) 407-6815
Department of Ecology
?table
On Thu, Feb 19, 2009 at 11:48 AM, Nattu wrote:
> Dear All,
>
> I have a query : what is the command to count number of repeated words in a
> column.
>
> for ex:
>
> a =
>
> oranges
> oranges
> apples
> apples
> grape
> oranges
> apple
> pine
>
>
> the result should be
> oranges 3
> apples
Dear All,
I have a query : what is the command to count number of repeated words in a
column.
for ex:
a =
oranges
oranges
apples
apples
grape
oranges
apple
pine
the result should be
oranges 3
apples 3
grape 1
pine 1
is there an easy way for this.
Thanks,
Nataraju
GM R & D
Bangalore
--
"
3 matches
Mail list logo