diff --git a/CRAN-RELEASE b/CRAN-RELEASE new file mode 100644 index 0000000..50610ce --- /dev/null +++ b/CRAN-RELEASE @@ -0,0 +1,2 @@ +This package was submitted to CRAN on 2021-05-26. +Once it is accepted, delete this file and tag the release (commit 177bf56). diff --git a/DESCRIPTION b/DESCRIPTION index e187f3c..7d8b6cd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: NGLVieweR Title: Interactive 3D Visualization of Molecular Structures -Version: 1.3.0 +Version: 1.3.1 Authors@R: c( person("Niels", "van der Velden", role = c("aut", "cre"), email = "n.s.j.vandervelden@gmail.com"), person("Alexander", "Rose", role = "cph", comment = 'NGL.js library')) diff --git a/R/NGLVieweR.R b/R/NGLVieweR.R index 3418066..4a27d84 100644 --- a/R/NGLVieweR.R +++ b/R/NGLVieweR.R @@ -219,8 +219,9 @@ NGLVieweR <- function(data, format = NULL, width = NULL, height = NULL, elementI #'Set stage parameters. #'@param NGLVieweR A NGLVieweR object. #'@param ... Options controlling the stage. Most common options are \code{backgroundColor}, \code{rotateSpeed}, \code{zoomSpeed}, -#'\code{hoverTimeout} and \code{lightIntensity}. For a full list of options, see the "StageParameters" method in the official +#'\code{hoverTimeout} and \code{lightIntensity}. For a full list of options, see the "stageParameters" method in the official #'\href{http://nglviewer.org/ngl/api/}{NGL.js} manual. +#'@return Returns list of stage parameters to \code{NGLVieweR} \code{htmlwidgets} object. #'@seealso #'* [updateStage()] #'* [NGLVieweR_example()] See example "basic". @@ -259,9 +260,10 @@ stageParameters <- function(NGLVieweR, ...) { #' #'@param NGLVieweR A NGLVieweR object. #'@param type Type of representation. Most common options are "cartoon", "ball+stick", "line", "surface", "ribbon" and "label". -#'For a full list of options, see the "StructureRepresentation" method in the official \href{http://nglviewer.org/ngl/api/}{NGL.js} manual. +#'For a full list of options, see the "structureRepresentation" method in the official \href{http://nglviewer.org/ngl/api/}{NGL.js} manual. #'@param param Options for the different types of representations. Most common options are \code{name}, \code{opacity}, \code{colorScheme}, \code{sele}, \code{colorValue} and \code{visibility}. #'For a full list of options, see the general "RepresentationParameters" method and type specific Label-, Structure- and Surface- RepresentationParameters in the official \href{http://nglviewer.org/ngl/api/}{NGL.js} manual. +#'@return List of representation parameters to \code{NGLVieweR} \code{htmlwidgets} object. #'@seealso #'* [addSelection()] #'* [NGLVieweR_example()] See example "basic". @@ -331,6 +333,7 @@ addRepresentation <- function(NGLVieweR, type, param = list()) { #'Set rock animation #'@param NGLVieweR A NGLVieweR object. #'@param rock If \code{TRUE} (default), start rocking and stop spinning. +#'@return setRock parameter to \code{TRUE} or \code{FALSE} in \code{NGLVieweR} \code{htmlwidgets} object. #'@family animations #'@seealso #'* [setSpin()] @@ -352,6 +355,7 @@ setRock <- function(NGLVieweR, rock = TRUE) { #'Set Spin animation #'@param NGLVieweR A NGLVieweR object. #'@param spin If \code{TRUE} (default), start spinning and stop rocking +#'@return setSpin parameter to \code{TRUE} or \code{FALSE} in \code{NGLVieweR} \code{htmlwidgets} object. #'@family animations #'@seealso #'* [setRock()] @@ -373,6 +377,7 @@ setSpin <- function(NGLVieweR, spin = TRUE) { #'Set Quality #'@param NGLVieweR A NGLVieweR object. #'@param quality Set rendering quality. Can be "low", "medium" (default) or "high". +#'@return setQuality parameter in \code{NGLVieweR} \code{htmlwidgets} object. #'@family options #'@examples #'NGLVieweR("7CID") %>% @@ -390,6 +395,7 @@ setQuality <- function(NGLVieweR, quality = "medium") { #'Set Focus #'@param NGLVieweR A NGLVieweR object. #'@param focus Set focus between 0 (default) to 100. +#'@return setFocus parameter in \code{NGLVieweR} \code{htmlwidgets} object. #'@seealso [updateFocus()] #'@family options #'@examples @@ -413,6 +419,7 @@ setFocus <- function(NGLVieweR, focus = 0) { #'See the section "selection-language" in the official \href{https://nglviewer.org/}{NGL.js} manual. #'@param duration Optional animation time in milliseconds (default = 0). #'@param z_offSet Optional zoom offset value (default = 0). +#'@return List of zoomMove parameters to \code{NGLVieweR} \code{htmlwidgets} object. #'@family animations #'@examples #'NGLVieweR("7CID") %>% diff --git a/cran-comments.md b/cran-comments.md index 767cefa..b649d8f 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,4 +1,32 @@ +# Round 3 + +## Test environments +- local R installation, R 4.0.4 +- ubuntu 16.04 (on travis-ci), R 4.0.4 +- win-builder (devel) + +## Submission comments +- Provided \\value to remaining functions + +## Reviewer comments + +- Please add \\value to .Rd files regarding exported methods and explain +the functions results in the documentation. Please write about the +structure of the output (class) and also what the output means. (If a +function does not return a value, please document that too, e.g. +\\value{No return value, called for side effects} or similar) +Missing Rd-tags: + addRepresentation.Rd: \\value + setFocus.Rd: \\value + setQuality.Rd: \\value + setRock.Rd: \\value + setSpin.Rd: \\value + stageParameters.Rd: \\value + zoomMove.Rd: \\value + # Round 2 +26.05.21 + ## Test environments - local R installation, R 4.0.4 - ubuntu 16.04 (on travis-ci), R 4.0.4 diff --git a/man/addRepresentation.Rd b/man/addRepresentation.Rd index 7c98729..b4e7eca 100644 --- a/man/addRepresentation.Rd +++ b/man/addRepresentation.Rd @@ -10,11 +10,14 @@ addRepresentation(NGLVieweR, type, param = list()) \item{NGLVieweR}{A NGLVieweR object.} \item{type}{Type of representation. Most common options are "cartoon", "ball+stick", "line", "surface", "ribbon" and "label". -For a full list of options, see the "StructureRepresentation" method in the official \href{http://nglviewer.org/ngl/api/}{NGL.js} manual.} +For a full list of options, see the "structureRepresentation" method in the official \href{http://nglviewer.org/ngl/api/}{NGL.js} manual.} \item{param}{Options for the different types of representations. Most common options are \code{name}, \code{opacity}, \code{colorScheme}, \code{sele}, \code{colorValue} and \code{visibility}. For a full list of options, see the general "RepresentationParameters" method and type specific Label-, Structure- and Surface- RepresentationParameters in the official \href{http://nglviewer.org/ngl/api/}{NGL.js} manual.} } +\value{ +List of representation parameters to \code{NGLVieweR} \code{htmlwidgets} object. +} \description{ Add a representation and its parameters. } diff --git a/man/setFocus.Rd b/man/setFocus.Rd index 2883477..3d91a20 100644 --- a/man/setFocus.Rd +++ b/man/setFocus.Rd @@ -11,6 +11,9 @@ setFocus(NGLVieweR, focus = 0) \item{focus}{Set focus between 0 (default) to 100.} } +\value{ +setFocus parameter in \code{NGLVieweR} \code{htmlwidgets} object. +} \description{ Set Focus } diff --git a/man/setQuality.Rd b/man/setQuality.Rd index 3285ba6..9bf184d 100644 --- a/man/setQuality.Rd +++ b/man/setQuality.Rd @@ -11,6 +11,9 @@ setQuality(NGLVieweR, quality = "medium") \item{quality}{Set rendering quality. Can be "low", "medium" (default) or "high".} } +\value{ +setQuality parameter in \code{NGLVieweR} \code{htmlwidgets} object. +} \description{ Set Quality } diff --git a/man/setRock.Rd b/man/setRock.Rd index 12030ae..b1fdd93 100644 --- a/man/setRock.Rd +++ b/man/setRock.Rd @@ -11,6 +11,9 @@ setRock(NGLVieweR, rock = TRUE) \item{rock}{If \code{TRUE} (default), start rocking and stop spinning.} } +\value{ +setRock parameter to \code{TRUE} or \code{FALSE} in \code{NGLVieweR} \code{htmlwidgets} object. +} \description{ Set rock animation } diff --git a/man/setSpin.Rd b/man/setSpin.Rd index 35c5819..1105497 100644 --- a/man/setSpin.Rd +++ b/man/setSpin.Rd @@ -11,6 +11,9 @@ setSpin(NGLVieweR, spin = TRUE) \item{spin}{If \code{TRUE} (default), start spinning and stop rocking} } +\value{ +setSpin parameter to \code{TRUE} or \code{FALSE} in \code{NGLVieweR} \code{htmlwidgets} object. +} \description{ Set Spin animation } diff --git a/man/stageParameters.Rd b/man/stageParameters.Rd index b100be8..aa3d4a2 100644 --- a/man/stageParameters.Rd +++ b/man/stageParameters.Rd @@ -10,9 +10,12 @@ stageParameters(NGLVieweR, ...) \item{NGLVieweR}{A NGLVieweR object.} \item{...}{Options controlling the stage. Most common options are \code{backgroundColor}, \code{rotateSpeed}, \code{zoomSpeed}, -\code{hoverTimeout} and \code{lightIntensity}. For a full list of options, see the "StageParameters" method in the official +\code{hoverTimeout} and \code{lightIntensity}. For a full list of options, see the "stageParameters" method in the official \href{http://nglviewer.org/ngl/api/}{NGL.js} manual.} } +\value{ +Returns list of stage parameters to \code{NGLVieweR} \code{htmlwidgets} object. +} \description{ Set stage parameters. } diff --git a/man/zoomMove.Rd b/man/zoomMove.Rd index d940119..eb3f3f1 100644 --- a/man/zoomMove.Rd +++ b/man/zoomMove.Rd @@ -19,6 +19,9 @@ See the section "selection-language" in the official \href{https://nglviewer.org \item{z_offSet}{Optional zoom offset value (default = 0).} } +\value{ +List of zoomMove parameters to \code{NGLVieweR} \code{htmlwidgets} object. +} \description{ Add a zoom animation } diff --git a/vignettes/NGLVieweR.Rmd b/vignettes/NGLVieweR.Rmd index bf9dcdf..b756ad9 100644 --- a/vignettes/NGLVieweR.Rmd +++ b/vignettes/NGLVieweR.Rmd @@ -144,7 +144,7 @@ NGLVieweR("7CID") %>% ## Labels -Labels can be addded by setting the `addRepresentation()` type parameter to "label". For a full list of of options, see the LabelRepresentationParameters section in the [NGL.js](http://nglviewer.org/ngl/api/) manual. Also see the "label" tab in the [demo](https://niels-van-der-velden.shinyapps.io/shinyNGLVieweR/) app for possible label settings. +Labels can be added by setting the `addRepresentation()` type parameter to "label". For a full list of of options, see the LabelRepresentationParameters section in the [NGL.js](http://nglviewer.org/ngl/api/) manual. Also see the "label" tab in the [demo](https://niels-van-der-velden.shinyapps.io/shinyNGLVieweR/) app for possible label settings. ```{r labels, screenshot.force=FALSE} NGLVieweR("7CID") %>%