[R] searching for a specific row name in R
Albrecht Kauffmann
@|k@u||m @end|ng |rom |@@tm@||@|m
Mon Aug 13 09:09:23 CEST 2018
Hello Deepa,
sum(x[,2] == "A501")
or
which(x[,2] == "A501")
.
Best,
Albrecht
--
Albrecht Kauffmann
alkauffm using fastmail.fm
Am Mo, 13. Aug 2018, um 07:10, schrieb Deepa Maheshvare:
> Hello Everyone,
>
> I have a 1000 x 20 matrix. The second column of the matrix has the names
> of identifiers. How do I check when a certain identifier is present in
> the set of 1000 identifier names present in the second column. For
> instance, let the names of identifiers be A1,A2,...A1000. I want to
> check whether A501 is present .How can this be checked?
>
> Any help will be highly appreciated.
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
More information about the R-help
mailing list