[R] grep

Jorgen Harmse JH@rm@e @end|ng |rom roku@com
Fri Jul 12 16:46:43 CEST 2024


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 <styen using ntu.edu.tw <mailto:styen using ntu.edu.tw>>
To: Uwe Ligges <ligges using statistik.tu-dortmund.de <mailto:ligges using statistik.tu-dortmund.de>>, R-help Mailing List
<r-help using r-project.org <mailto:r-help using r-project.org>>
Cc: Steven Yen <syen04 using gmail.com <mailto:syen04 using gmail.com>>
Subject: Re: [R] grep
Message-ID: <b73784ce-c018-4587-bcd9-64adbd0dc4a7 using ntu.edu.tw <mailto:b73784ce-c018-4587-bcd9-64adbd0dc4a7 using ntu.edu.tw>>
Content-Type: text/plain; charset="utf-8"


Sorry. grepl worked:


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






More information about the R-help mailing list