Skip to content

Commit

Permalink
Solve gp issue on 1: ref #319
Browse files Browse the repository at this point in the history
  • Loading branch information
chainsawriot committed Aug 31, 2023
1 parent 1108d49 commit 8fd8ba7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/import_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ function(file,
.check_pkg_availability("xml2")
x <- xml2::as_list(xml2::read_xml(unclass(file)))[[1L]]
d <- do.call("rbind", c(lapply(x, unlist)))
row.names(d) <- 1:nrow(d)
row.names(d) <- seq_len(nrow(d))
d <- as.data.frame(d, stringsAsFactors = stringsAsFactors)
tc2 <- function(x) {
out <- utils::type.convert(x, as.is = FALSE)
Expand Down Expand Up @@ -440,7 +440,7 @@ extract_html_row <- function(x, empty_value) {
}
out <- as.data.frame(out, ..., stringsAsFactors = stringsAsFactors)
# set row names
rownames(out) <- 1:nrow(out)
rownames(out) <- seq_len(nrow(out))
# type.convert() to numeric, etc.
out[] <- lapply(out, utils::type.convert, as.is = TRUE)
out
Expand Down

0 comments on commit 8fd8ba7

Please sign in to comment.