Skip to content

Commit

Permalink
Changed examples from dontrun to donttest
Browse files Browse the repository at this point in the history
  • Loading branch information
jooolia committed Oct 27, 2023
1 parent 1a604ae commit 1f71fe8
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion R/allgensnp.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' @param usersubset Get a subset of users, integer numbers, e.g. 1-8 (default: none)
#' @param ... Curl options passed on to [crul::HttpClient]
#' @return data.frame of genotypes for all users at a certain SNP
#' @examples \dontrun{
#' @examples \donttest{
#' x <- allgensnp(snp = "rs7412")
#' head(x)
#' }
Expand Down
2 changes: 1 addition & 1 deletion R/allphenotypes.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' number_of_users are replicated in the data.frame. Default: `FALSE`
#' @param ... Curl options passed on to [crul::HttpClient]
#' @return data.frame of results, or list if `df=FALSE`
#' @examples \dontrun{
#' @examples \donttest{
#' # Get all data
#' allphenotypes(df = TRUE)
#'
Expand Down
2 changes: 1 addition & 1 deletion R/annotations.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' metadata for the response.
#' @param ... Curl options passed on to [crul::HttpClient]
#' @return data.frame of results
#' @examples \dontrun{
#' @examples \donttest{
#' # Get all data
#' ## get just the metadata
#' annotations(snp = "rs7903146", output = "metadata")
Expand Down
8 changes: 4 additions & 4 deletions R/download_users.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ get_write <- function(x, y, ...) {
#' variables for the path to the file saved. Alternatively, you can supply
#' the path.
#' @return A data.frame.
#' @examples \dontrun{
#' # dat <- read_users(name = "kevinmcc")
#' # head(dat)
#' # dat <- read_users(id = 285)
#' @examples \donttest{
#' dat <- read_users(name = "kevinmcc")
#' head(dat)
#' dat <- read_users(id = 285)
#' }
read_users <- function(name = NULL, id = NULL, path = NULL, ...) {
if (is.null(name) && is.null(id) && is.null(path)) {
Expand Down
2 changes: 1 addition & 1 deletion R/fetch_genotypes.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#' Internally, we use [download.file()] to download each file, then
#' [read.table()] to read the file to a data.frame.
#'
#' @examples \dontrun{
#' @examples \donttest{
#' # get a data.frame of the users data
#' data <- users(df = TRUE)
#' head(data[[1]]) # users with links to genome data
Expand Down
2 changes: 1 addition & 1 deletion R/genotypes.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @param ... Curl options passed on to [crul::HttpClient]]
#' @return List (or data.frame) of genotypes for specified user(s) at a
#' certain SNP.
#' @examples \dontrun{
#' @examples \donttest{
#' genotypes(snp = "rs9939609", userid = 1)
#' genotypes("rs9939609", userid = "1,6,8", df = TRUE)
#' genotypes("rs9939609", userid = "1-2", df = FALSE)
Expand Down
2 changes: 1 addition & 1 deletion R/ncbi_snp_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ get_gene_names <- function(primary_info) {
#' If users want to set curl options when querying for the SNPs they can do so by using
#' httr::set_config/httr::with_config
#'
#' @examples \dontrun{
#' @examples \donttest{
#' ## an example with both merged SNPs, non-SNV SNPs, regular SNPs,
#' ## SNPs not found, microsatellite
#' SNPs <- c("rs332", "rs420358", "rs1837253", "rs1209415715", "rs111068718")
Expand Down
2 changes: 1 addition & 1 deletion R/phenotypes.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @param ... Curl options passed on to [crul::HttpClient]
#' @return List of phenotypes for specified user(s).
#'
#' @examples \dontrun{
#' @examples \donttest{
#' phenotypes(userid = 1)
#' phenotypes(userid = "1,6,8", df = TRUE)
#' phenotypes(userid = "1-8", df = TRUE)
Expand Down
2 changes: 1 addition & 1 deletion R/phenotypes_byid.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' @return List of description of phenotype, list of known variants, or
#' data.frame of variants for each user with that phenotype.
#'
#' @examples \dontrun{
#' @examples \donttest{
#' phenotypes_byid(phenotypeid = 12, return_ = "desc")
#' phenotypes_byid(phenotypeid = 12, return_ = "knownvars")
#' phenotypes_byid(phenotypeid = 12, return_ = "users")
Expand Down
2 changes: 1 addition & 1 deletion R/users.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' @param df Return data.frame (`TRUE`) or not (`FALSE`). Default: `FALSE`
#' @param ... Curl options passed on to [crul::HttpClient]
#' @return List of openSNP users, their ID numbers, and XX if available.
#' @examples \dontrun{
#' @examples \donttest{
#' # just the list
#' data <- users(df = FALSE)
#' data
Expand Down
2 changes: 1 addition & 1 deletion man/allgensnp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/allphenotypes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/annotations.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/fetch_genotypes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/genotypes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/ncbi_snp_query.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/phenotypes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/phenotypes_byid.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions man/read_users.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/users.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1f71fe8

Please sign in to comment.