R/WhichFile.R

Defines functions WhichFile

Documented in WhichFile

WhichFile = function(String, Folder, fixed=TRUE, DoesExist=TRUE){

Files=list.files(path=Folder, recursive =TRUE, full.names =TRUE)
Out=""
for(i in Files){

Text = readLines(i)
if(DoesExist){
if(any(grep(String, Text, fixed=fixed)))  Out=c(Out,i)}
else{
if(!any(grep(String, Text, fixed=fixed)))  Out=c(Out,i)}
}
return(Out)
}

Try the BrailleR package in your browser

Any scripts or data that you put into this service are public.

BrailleR documentation built on July 26, 2023, 5:46 p.m.