[R] Find in R and R books

Ivan Calandra ivan.calandra at uni-hamburg.de
Wed Nov 17 16:06:09 CET 2010


Hi again!

The "Introduction to R" or other documentation might help you to get 
started.

And you should REALLY read the posting guide and provide a reproducible 
example.
In this case, some sample data corresponding to the type of objects you 
have, plus the result you expect would be enough (I guess).

 From you precedent posts, I would think you're looking for something 
similar to this:
df <- data.frame(let=rep(LETTERS[1:5],4), num=rnorm(20))
df[df$let=="A", ]
df[df$num>0, ]

By the way, if you just want the indexes, that will do:
which(df$num>0)

Ivan

Le 11/17/2010 15:35, Alaios a écrit :
> Hello everyone.
> In matlab  (again) there is a fucntion find that returns you the indexes where the condition in find was met. I want the same functionality in R i.e find(Mydata>2) to return all the indexes where the condition is met. Do you know something like that?
>
> Also when I try to search in google using for example the word R inside the search lemma I get very few results as the R confuses the search engine. When I was looking something in matlab ofcourse it was easier to get results as the search engine performs better.
> What are your tricks when you want to find some function that provides some functionality?
>
> I would like to thank you for your help
> Regards
> Alex
>
>
>
>
> 	[[alternative HTML version deleted]]
>
>
>
> ______________________________________________
> R-help at 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.

-- 
Ivan CALANDRA
PhD Student
University of Hamburg
Biozentrum Grindel und Zoologisches Museum
Abt. Säugetiere
Martin-Luther-King-Platz 3
D-20146 Hamburg, GERMANY
+49(0)40 42838 6231
ivan.calandra at uni-hamburg.de

**********
http://www.for771.uni-bonn.de
http://webapp5.rrz.uni-hamburg.de/mammals/eng/mitarbeiter.php



More information about the R-help mailing list