Skip to content

Commit

Permalink
clean up R function to find defaultValue column properly
Browse files Browse the repository at this point in the history
  • Loading branch information
duncantl committed May 18, 2019
1 parent 0b703c7 commit 7e10880
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Rqpdf/R/forms.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ function(z, page = NA)
vars = names(z[[1]])
tmp = lapply(vars, function(id) sapply(z, `[[`, id))
names(tmp) = vars
d = as.data.frame(tmp[-5], stringsAsFactors = FALSE)
d$defaultValue = I(tmp[[5]])
i = match("defaultValue", vars)
d = as.data.frame(tmp[-i], stringsAsFactors = FALSE)
d$defaultValue = I(tmp[[i]])
d$page = page
d
}

0 comments on commit 7e10880

Please sign in to comment.