added gitignore & tidyr

This commit is contained in:
Kate W 2019-11-12 13:03:20 -06:00
parent 852e549f70
commit 0ff660598a
3 changed files with 22 additions and 1 deletions

7
.gitignore vendored Normal file
View File

@ -0,0 +1,7 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata
*.jpg
*.csv

13
Collections-OCR.Rproj Normal file
View File

@ -0,0 +1,13 @@
Version: 1.0
RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default
EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8
RnwWeave: Sweave
LaTeX: pdfLaTeX

View File

@ -3,7 +3,7 @@
# (c) 2019 The Field Museum - MIT License (https://opensource.org/licenses/MIT) # (c) 2019 The Field Museum - MIT License (https://opensource.org/licenses/MIT)
# https://github.com/fieldmuseum/Collections-OCR # https://github.com/fieldmuseum/Collections-OCR
library(tidyr)
library(magick) library(magick)
library(stringr) library(stringr)
library(tesseract) library(tesseract)
@ -53,6 +53,7 @@ ocrText <- separate(imagesOCR, text,
sep = "\n", sep = "\n",
extra = "merge", fill = "right") extra = "merge", fill = "right")
# export CSV # export CSV
write.csv(ocrText, write.csv(ocrText,
paste0("ocrText-", paste0("ocrText-",