Skip to content

Commit

Permalink
Moved to read_tsv from read.table, and to inner_join from merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Levernier committed Dec 19, 2017
1 parent aac5bf5 commit f96571d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ randomizer_seed_to_set <- 3 # Ensure that random sampling will always return

# Read the dataset -------------------------------------------------------------

library_access_data <- read.table(
library_access_data <- readr::read_tsv(
gzfile(lzma_compressed_library_access_data_location),
sep = '\t',
header = TRUE
)
# View(lzma_compressed_library_access_data) # Check the dataset

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ original_dataset_with_oa_color_column <- read.table(
# Combine the datasets so that we have doi, full_text_indicator,
# and oadoi_color
merged_datasets <- merge(
merged_datasets <- dplyr::inner_join(
original_dataset_with_oa_color_column,
lzma_compressed_library_access_tsv,
by = "doi"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,17 @@ manual_tsv_location <- file.path(

# Open the tsv -----------------------------------------------------------------

dataset_to_go_through <- read.table(
dataset_to_go_through <- readr::read_tsv(
manual_tsv_location,
sep = '\t',
na.strings = '',
header = TRUE,
colClasses = 'character'
na = ''
)
# View(dataset_to_go_through)

# Facilitate going through the rows that haven't been filled in ----------------

for (row_number in
which(
is.na(dataset_to_go_through$full_text_indicator_manual)
)
) {
for (row_number in which(
is.na(dataset_to_go_through$full_text_indicator_manual)
)) {
doi_for_row <- dataset_to_go_through$doi[row_number]

url_to_visit <- paste0(
Expand Down

0 comments on commit f96571d

Please sign in to comment.