On 15/03/2011, Francisco Gochez <fjgoc...@googlemail.com> wrote:
> Hi,
>
> What you are after is:
>
> datasubset <- dataset[ dataset[,3] == "text3", ]

Thank you. For the set

text1,23,text2,45
text1,23,text3,78
text1,23,text3,56
text1,23,text2,45

Is it possible to write a function that selects rows containing
'text3' and applies the function 'sum' to values '78' and '56'? The
control statements described in the document 'an introduction to r'
(Venables and Smith, 2010) suggest that the if statement would return
'true', to prevent a sum function being applied to 'true' results.

______________________________________________
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