Skip to content

Commit 7f6238f

Browse files
rename variables
1 parent 1a1a933 commit 7f6238f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

R/parse.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,20 @@ add_id_and_short <- function(pd) {
5858
verify_str_txt <- function(pd_with_terminal_text, text) {
5959
string_ind <- pd_with_terminal_text$token == "STR_CONST"
6060
strings <- pd_with_terminal_text[string_ind,]
61-
parent_ind <- pd_with_terminal_text$id %in% strings$parent
62-
other_ind <- !(string_ind | parent_ind)
61+
parent_of_strings_ind <- pd_with_terminal_text$id %in% strings$parent
62+
other_ind <- !(string_ind | parent_of_strings_ind)
6363
if (nrow(strings) == 0 || !any(substr(strings$text, 1, 1) == "[")) {
6464
return(pd_with_terminal_text)
6565
}
6666
pd_with_all_text <- get_parse_data(text, include_text = TRUE)
67-
parents <- pd_with_all_text[parent_ind, c("id", "text", "short")]
67+
parent_of_strings <- pd_with_all_text[parent_of_strings_ind, c("id", "text", "short")]
6868
strings$text <- NULL
6969
strings$short <- NULL
70-
new_strings <- merge(strings, parents, by.x = "parent", by.y = "id")
70+
new_strings <- merge(strings, parent_of_strings, by.x = "parent", by.y = "id")
7171
bind_rows(
7272
new_strings,
7373
pd_with_terminal_text[other_ind, ],
74-
pd_with_terminal_text[parent_ind,]
74+
pd_with_terminal_text[parent_of_strings_ind,]
7575
) %>%
7676
arrange(pos_id)
7777

0 commit comments

Comments
 (0)