Closed kylebaron closed 5 years ago
I put MistakeA in fileA.txt and MistakeB in fileB.txt. When
MistakeA
fileA.txt
MistakeB
fileB.txt
path <- c("fileB.txt", "fileA.txt")
then spell_check_files(path) says MistakeA is found in fileB.txt and vice versa
spell_check_files(path)
library(spelling)
fileA <- ' store car MistakeA road ' fileB <- ' store MistakeB desk road ' writeLines(fileA, con = "fileA.txt") writeLines(fileB, con = "fileB.txt") files <- c("fileB.txt", "fileA.txt")
FOUND IN
l1 <- lapply(files, spell_check_files) do.call("rbind", l1) #> WORD FOUND IN #> MistakeB fileB.txt:3 #> MistakeA fileA.txt:4
spell_check_files(files) #> WORD FOUND IN #> MistakeA fileB.txt:4 #> MistakeB fileA.txt:3
spell_check_files(sort(files)) #> WORD FOUND IN #> MistakeA fileA.txt:4 #> MistakeB fileB.txt:3
Created on 2019-02-02 by the reprex package (v0.2.1)
🤔
Good catch, thanks!!
I put
MistakeA
infileA.txt
andMistakeB
infileB.txt
. Whenthen
spell_check_files(path)
saysMistakeA
is found infileB.txt
and vice versaCreate
fileA.txt
andfileB.txt
Check each file separately -
FOUND IN
is correctCheck in one run -
FOUND IN
is mixed upSort then check in one run -
FOUND IN
is correctCreated on 2019-02-02 by the reprex package (v0.2.1)