From 7d6af4cf5de3553e774682faccc5df0230f005f7 Mon Sep 17 00:00:00 2001 From: boB Rudis Date: Sat, 25 Feb 2017 06:07:18 -0500 Subject: [PATCH] fix CRAN check errors --- R/dsl.r | 2 +- R/execute.r | 2 +- R/helpers.r | 2 +- R/render-html.r | 2 +- man/execute_lua.Rd | 4 ++-- man/splash_har_reset.Rd | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/R/dsl.r b/R/dsl.r index c52bb05..0f19608 100644 --- a/R/dsl.r +++ b/R/dsl.r @@ -234,7 +234,7 @@ splash_wait <- function(splash_obj, time=2) { #' @md #' @param splash_obj splashr object #' @export -splash_har_reset <- function(splash_obj, keys) { +splash_har_reset <- function(splash_obj) { splash_obj$calls <- c(splash_obj$calls, 'splash:har_reset()') splash_obj } diff --git a/R/execute.r b/R/execute.r index 5859229..6f56fef 100644 --- a/R/execute.r +++ b/R/execute.r @@ -2,7 +2,7 @@ #' #' @md #' @param splash_obj Object created by a call to [splash()] -#' @param lua_sourc Browser automation script. See [Splash Script](http://splash.readthedocs.io/en/stable/scripting-tutorial.html#scripting-tutorial) Tutorial for more info. +#' @param lua_source Browser automation script. See [Splash Script](http://splash.readthedocs.io/en/stable/scripting-tutorial.html#scripting-tutorial) Tutorial for more info. #' @param timeout A timeout (in seconds) for the render (defaults to 30). #' @param allowed_domains Comma-separated list of allowed domain names. If present, Splash won’t load anything neither from domains not in this list nor from subdomains of domains not in this list. #' @param proxy Proxy profile name or proxy URL. diff --git a/R/helpers.r b/R/helpers.r index 0ce7078..bba48b0 100644 --- a/R/helpers.r +++ b/R/helpers.r @@ -165,7 +165,7 @@ har_entry_count <- function(x) { } else if (inherits(x, "harlog")) { length(x$entries) } else if (inherits(x, "harentries")) { - length(x[[i]]) + length(x) } else { NULL } diff --git a/R/render-html.r b/R/render-html.r index a26939c..fcdc4bb 100644 --- a/R/render-html.r +++ b/R/render-html.r @@ -26,7 +26,7 @@ #' @param raw_html if `TRUE` then return a character vector vs an XML document. Only valid for `render_html` #' @return An XML document. Note that this is processed by [xml2::read_html()] so it will not be #' the pristine, raw, rendered HTML from the site. Use `raw_html=TRUE` if you do not want it -#' to be processed first by [xml2]. If you choose `raw_html=TRUE` you'll get back a +#' to be processed first by `xml2`. If you choose `raw_html=TRUE` you'll get back a #' character vector. #' @references [Splash docs](http://splash.readthedocs.io/en/stable/index.html) #' @export diff --git a/man/execute_lua.Rd b/man/execute_lua.Rd index 7f8a54c..de2eee0 100644 --- a/man/execute_lua.Rd +++ b/man/execute_lua.Rd @@ -10,6 +10,8 @@ execute_lua(splash_obj, lua_source, timeout = 30, allowed_domains, proxy, \arguments{ \item{splash_obj}{Object created by a call to \code{\link[=splash]{splash()}}} +\item{lua_source}{Browser automation script. See \href{http://splash.readthedocs.io/en/stable/scripting-tutorial.html#scripting-tutorial}{Splash Script} Tutorial for more info.} + \item{timeout}{A timeout (in seconds) for the render (defaults to 30).} \item{allowed_domains}{Comma-separated list of allowed domain names. If present, Splash won’t load anything neither from domains not in this list nor from subdomains of domains not in this list.} @@ -21,8 +23,6 @@ execute_lua(splash_obj, lua_source, timeout = 30, allowed_domains, proxy, \item{save_args}{A list of argument names to put in cache.} \item{load_args}{Parameter values to load from cache} - -\item{lua_sourc}{Browser automation script. See \href{http://splash.readthedocs.io/en/stable/scripting-tutorial.html#scripting-tutorial}{Splash Script} Tutorial for more info.} } \value{ \code{raw} content from the \code{httr} call. Given the vast diversity of possible return values, it's up to the caller to handle the return value. diff --git a/man/splash_har_reset.Rd b/man/splash_har_reset.Rd index 6c2c49a..ef87f20 100644 --- a/man/splash_har_reset.Rd +++ b/man/splash_har_reset.Rd @@ -4,7 +4,7 @@ \alias{splash_har_reset} \title{Drops all internally stored HAR records.} \usage{ -splash_har_reset(splash_obj, keys) +splash_har_reset(splash_obj) } \arguments{ \item{splash_obj}{splashr object}