which(grepl(....)) looks odd. Doesn't grep by itself return the correct vector 
of indices?

Regards,
Jorgen Harmse.


Message: 5
Date: Fri, 12 Jul 2024 17:42:05 +0800
From: Steven Yen <st...@ntu.edu.tw <mailto:st...@ntu.edu.tw>>
To: Uwe Ligges <lig...@statistik.tu-dortmund.de 
<mailto:lig...@statistik.tu-dortmund.de>>, R-help Mailing List
<r-help@r-project.org <mailto:r-help@r-project.org>>
Cc: Steven Yen <sye...@gmail.com <mailto:sye...@gmail.com>>
Subject: Re: [R] grep
Message-ID: <b73784ce-c018-4587-bcd9-64adbd0dc...@ntu.edu.tw 
<mailto:b73784ce-c018-4587-bcd9-64adbd0dc...@ntu.edu.tw>>
Content-Type: text/plain; charset="utf-8"


Sorry. grepl worked:


which(grepl("very|somewhat",names(goprobit.p$est)))




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

Reply via email to