I doubt that you have a dataframe with those features, since R would not allow such an event; more likely you have data in a file. If your goal is to determine the number of items, then you should definitely look at:

?count.fields

count.fields(filename, sep=",") # would give you 1 + the number commas in each line of the file

--
David Winsemius

On Jan 8, 2009, at 4:38 AM, <rahul-a.agar...@ubs.com> <rahul-a.agar...@ubs.com > wrote:

I have a data frame with unequal rows length separated by comma.....I
have to read the data first and then calculate number of comma in each
row...how can I do that

Regards Rahul

______________________________________________
R-help@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.

______________________________________________
R-help@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.

Reply via email to