boB Rudis
5 years ago
34 changed files with 92 additions and 33 deletions
@ -1,24 +1,23 @@ |
|||
Package: htmlunitjars |
|||
Type: Package |
|||
Title: htmlunitjars title goes here otherwise CRAN checks fail |
|||
Version: 0.1.0 |
|||
Title: Java Archive Wrapper Supporting the 'htmlunit' Package |
|||
Version: 2.33.0 |
|||
Date: 2018-12-16 |
|||
Authors@R: c( |
|||
person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre"), |
|||
comment = c(ORCID = "0000-0001-5670-2640")) |
|||
person("Bob", "Rudis", role = c("aut", "cre"), email = "bob@rud.is") |
|||
) |
|||
Maintainer: Bob Rudis <bob@rud.is> |
|||
Description: A good description goes here otherwise CRAN checks fail. |
|||
URL: https://gitlab.com/hrbrmstr/htmlunitjars |
|||
BugReports: https://gitlab.com/hrbrmstr/htmlunitjars/issues |
|||
SystemRequirements: Java |
|||
Description: Contents of the 'HtmlUnit' & supporting Java archives <http://htmlunit.sourceforge.net/>. |
|||
Version number reflects the version number of the included 'JAR' file. |
|||
URL: https://github.com/hrbrmstr/htmlunitjars |
|||
BugReports: https://github.com/hrbrmstr/htmlunitjars/issues |
|||
License: Apache License 2.0 | file LICENSE |
|||
Encoding: UTF-8 |
|||
License: AGPL |
|||
Suggests: |
|||
testthat, |
|||
covr |
|||
Depends: |
|||
R (>= 3.2.0) |
|||
Imports: |
|||
httr, |
|||
jsonlite |
|||
R (>= 3.2.0), |
|||
rJava |
|||
RoxygenNote: 6.1.1 |
|||
|
@ -1,4 +1,3 @@ |
|||
# Generated by roxygen2: do not edit by hand |
|||
|
|||
import(httr) |
|||
importFrom(jsonlite,fromJSON) |
|||
import(rJava) |
|||
|
@ -1,12 +1,12 @@ |
|||
#' ... |
|||
#' |
|||
#' - URL: <https://gitlab.com/hrbrmstr/htmlunitjars> |
|||
#' - BugReports: <https://gitlab.com/hrbrmstr/htmlunitjars/issues> |
|||
#' |
|||
# Java Archive Wrapper Supporting the 'htmlunit' Package |
|||
#' |
|||
#' Contents of the 'HtmlUnit' & supporting Java archives <http://htmlunit.sourceforge.net/> |
|||
#' |
|||
#' Library JavaDoc: <http://htmlunit.sourceforge.net/apidocs/index.html> |
|||
#' |
|||
#' @md |
|||
#' @name htmlunitjars |
|||
#' @docType package |
|||
#' @author Bob Rudis (bob@@rud.is) |
|||
#' @import httr |
|||
#' @importFrom jsonlite fromJSON |
|||
#' @import rJava |
|||
NULL |
|||
|
@ -0,0 +1,21 @@ |
|||
#' @title rJava logging |
|||
#' @description Toggle verbose rJava logging |
|||
#' @details This function turns off the somewhat verbose rJava logging, most of which is |
|||
#' uninformative. It is called automatically when tabulizer is attached via |
|||
#' \code{library()}, \code{require}, etc. To keep logging on, load the package |
|||
#' namespace using \code{requireNamespace("htmlunit")} and reference functions |
|||
#' in using fully qualified references. |
|||
#' @note This resets a global Java setting and may affect logging of other rJava operations, |
|||
#' requiring a restart of R. |
|||
#' @return `NULL`, invisibly. |
|||
#' @author Thomas J. Leeper <thosjleeper@@gmail.com> |
|||
#' @noRd |
|||
#' @md |
|||
#' @examples |
|||
#' \dontrun{ |
|||
#' stop_logging() |
|||
#' } |
|||
stop_logging <- function() { |
|||
rJava::J("java.util.logging.LogManager")$getLogManager()$reset() |
|||
invisible(NULL) |
|||
} |
@ -0,0 +1,5 @@ |
|||
.onLoad <- function(libname, pkgname) { |
|||
rJava::.jpackage(pkgname, jars = "*", lib.loc = libname) |
|||
rJava::.jaddClassPath(dir(file.path(getwd(), "inst/java"), full.names = TRUE)) |
|||
stop_logging() |
|||
} |
@ -0,0 +1,36 @@ |
|||
<!DOCTYPE html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|||
<title></title> |
|||
<meta name="description" content=""> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1"> |
|||
<link rel="stylesheet" href=""> |
|||
</head> |
|||
<body> |
|||
<script> |
|||
|
|||
function createTable(tableData) { |
|||
var table = document.createElement('table'); |
|||
var row = {}; |
|||
var cell = {}; |
|||
|
|||
tableData.forEach(function(rowData) { |
|||
row = table.insertRow(-1); |
|||
rowData.forEach(function(cellData) { |
|||
cell = row.insertCell(); |
|||
cell.textContent = cellData; |
|||
}); |
|||
}); |
|||
document.body.appendChild(table); |
|||
} |
|||
|
|||
createTable([ |
|||
["One", "Two"], |
|||
["Three", "Four"], |
|||
["Five", "Six"] |
|||
]); |
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,6 +0,0 @@ |
|||
context("minimal package functionality") |
|||
test_that("we can do something", { |
|||
|
|||
#expect_that(some_function(), is_a("data.frame")) |
|||
|
|||
}) |
@ -0,0 +1,4 @@ |
|||
context("basic functionality") |
|||
test_that("we can do something", { |
|||
|
|||
}) |
Loading…
Reference in new issue