Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
llrs committed Apr 15, 2024
1 parent 679e2f1 commit d477c02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions R/codes.R
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ check_code <- function(id) {
stop("Missing the session number.", call. = FALSE)
}

if (ids[2] == "D" & length(ids) < 5) {
if (ids[2] == "D" && length(ids) < 5) {
stop("Missing the document reference", call. = FALSE)
}
if (ids[2] == "D" & length(ids) == 5 & !is_numeric(ids[5])) {
if (ids[2] == "D" && length(ids) == 5 & !is_numeric(ids[5])) {
stop("Document reference should be numeric", call. = FALSE)
}

Expand Down
2 changes: 1 addition & 1 deletion R/votos.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ sesion <- function(x) {
votoSenador <- function(x){
votoSenador <- xml_find_all(x, ".//VotoSenador")
l <- lapply(votoSenador, xml2matrix)
df <- do.call(rbind, l)
do.call(rbind, l)
}

votacion <- function(x) {
Expand Down

0 comments on commit d477c02

Please sign in to comment.