Prechádzať zdrojové kódy

Muudetud "don't run".

Ardo Kubjas 5 rokov pred
rodič
commit
92dc66fd3d

+ 8 - 7
R/convert_sf2qgis.R

@@ -7,13 +7,14 @@
 #' @keywords sf, qgis
 #' @export
 #' @examples
-#' ## Not run:
-#' ## class(pk)
-#' ## > [1] "sf" ...
-#' ##
-#' ## convert_sf2qgis(x = pk)
-#' ##
-#' ## End(**Not run**)
+#' \dontrun{
+#'
+#' class(pk)
+#' # > [1] "sf" ...
+#'
+#' convert_sf2qgis(x = pk)
+#'
+#' }
 convert_sf2qgis <- function(x = NULL) {
   if (!is.null(x) && sf::st_is_valid(x)) {
     result <- qgisprocess::qgis_run_algorithm(

+ 5 - 5
R/copy_qgis_object_to_db.R

@@ -12,11 +12,11 @@
 #' @keywords postgis, QGIS object
 #' @export
 #' @examples
-#' ## Not run:
-#' ##
-#' ## copy_qgis_object_to_db()
-#' ##
-#' ## End(**Not run**)
+#' \dontrun{
+#'
+#' copy_qgis_object_to_db()
+#'
+#' }
 copy_qgis_object_to_db <- function(x = NULL, conf = NULL, id = "fid",
                                    crs_source = "EPSG:4326",
                                    crs_target = "EPSG:4326",

+ 5 - 5
R/copy_shp_to_db.R

@@ -13,11 +13,11 @@
 #' @keywords postgis, ESRI Shapefile
 #' @export
 #' @examples
-#' ## Not run:
-#' ##
-#' ## copy_qgis_object_to_db()
-#' ##
-#' ## End(**Not run**)
+#' \dontrun{
+#'
+#' copy_qgis_object_to_db()
+#'
+#' }
 copy_shp_to_db <- function(dir = NULL, layer = NULL, conf = NULL, id = "fid",
                            crs_source = "EPSG:4326",
                            crs_target = "EPSG:4326",

+ 5 - 5
R/db_all_schemas.R

@@ -6,11 +6,11 @@
 #' @keywords database, schema
 #' @export
 #' @examples
-#' ## Not run:
-#' ##
-#' ## db_all_schemas()
-#' ##
-#' ## End(**Not run**)
+#' \dontrun{
+#'
+#' db_all_schemas()
+#'
+#' }
 db_all_schemas <- function() {
   conn <- ruut::db_connect()
   all_schemas <- DBI::dbGetQuery(conn, "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA")

+ 6 - 6
R/db_connect.R

@@ -6,12 +6,12 @@
 #' @keywords database, schema
 #' @export
 #' @examples
-#' ## Not run:
-#' ##
-#' ## config <- get_config()
-#' ## conn <- db_connect(conf = config)
-#' ##
-#' ## End(**Not run**)
+#' \dontrun{
+#'
+#' config <- get_config()
+#' conn <- db_connect(conf = config)
+#'
+#' }
 db_connect <- function(conf = NULL) {
   if (is.null(conf)) {
     config <- ruut::get_config()

+ 6 - 6
R/db_create_new_schema.R

@@ -7,12 +7,12 @@
 #' @keywords database, schema
 #' @export
 #' @examples
-#' ## Not run:
-#' ##
-#' ## config <- get_config()
-#' ## db_create_new_schema(conf = config)
-#' ##
-#' ## End(**Not run**)
+#' \dontrun{
+#'
+#' config <- get_config()
+#' db_create_new_schema(conf = config)
+#'
+#' }
 db_create_new_schema <- function(conf) {
   if (!ruut::db_is_shema_exist(conf$schema)) {
     conn <- ruut::db_connect()

+ 5 - 5
R/db_is_shema_exist.R

@@ -7,11 +7,11 @@
 #' @keywords database, schema
 #' @export
 #' @examples
-#' ## Not run:
-#' ##
-#' ## db_is_shema_exist(schema = "public")
-#' ##
-#' ## End(**Not run**)
+#' \dontrun{
+#'
+#' db_is_shema_exist(schema = "public")
+#'
+#' }
 db_is_shema_exist <- function(schema = NULL) {
   if (schema %in% ruut::db_all_schemas()) {
     TRUE

+ 8 - 8
R/db_table_colnames.R

@@ -6,14 +6,14 @@
 #' @keywords database, table
 #' @export
 #' @examples
-#' ## Not run:
-#' ##
-#' ## config <- get_config()
-#' ## config$schema <- "public"
-#' ## config$table <- "spatial_ref_sys"
-#' ## db_table_colnames(conf = config)
-#' ##
-#' ## End(**Not run**)
+#' \dontrun{
+#'
+#' config <- get_config()
+#' config$schema <- "public"
+#' config$table <- "spatial_ref_sys"
+#' db_table_colnames(conf = config)
+#'
+#' }
 db_table_colnames <- function(conf) {
   conn <- ruut::db_connect()
   q <- sprintf("SELECT

+ 8 - 8
R/get_config.R

@@ -7,14 +7,14 @@
 #' @keywords cats
 #' @export
 #' @examples
-#' ## Not run:
-#' ##
-#' ## config <- get_config()
-#' ## config
-#' ## # New schema.
-#' ## config$schema <- "new_schema"
-#' ##
-#' ## End(**Not run**)
+#' \dontrun{
+#'
+#' config <- get_config()
+#' config
+#' # New schema.
+#' config$schema <- "new_schema"
+#'
+#' }
 get_config <- function(conf = NULL) {
   if (is.null(conf)) {
     config <- rjson::fromJSON(file = system.file("extdata", "config.json", package = "ruut"))

+ 8 - 7
R/pk_boundary_box.R

@@ -8,13 +8,14 @@
 #' @keywords piirkond, boundarybox
 #' @export
 #' @examples
-#' ## Not run:
-#' ## class(pk)
-#' ## > [1] "sf" ...
-#' ##
-#' ## pk_bbox(x = pk, type = 1)
-#' ##
-#' ## End(**Not run**)
+#' \dontrun{
+#'
+#' class(pk)
+#' # > [1] "sf" ...
+#'
+#' pk_bbox(x = pk, type = 1)
+#'
+#' }
 pk_bbox <- function(x = NULL, type = 0) {
   if (!is.null(x) && sf::st_is_valid(x) && type %in% (seq(0:3) - 1)) {
     result <- qgisprocess::qgis_run_algorithm(

+ 13 - 13
R/qgis_algorithm_search_by_word.R

@@ -8,19 +8,19 @@
 #' @keywords qgis, help
 #' @export
 #' @examples
-#' ## Not run:
-#' ##
-#' ## qgis_algorithm_search_by_word(str = "clip")
-#' ## algorithm <- "native:clip"
-#' ## # Read help.
-#' ## qgisprocess::qgis_show_help(algorithm = algorithm)
-#' ##
-#' ## qgis_algorithm_search_by_word(str = "centroid")
-#' ## qgis_algorithm_search_by_word(str = "filedownloader")
-#' ## qgis_algorithm_search_by_word(str = "")
-#' ## qgis_algorithm_search_by_word()
-#' ##
-#' ## End(**Not run**)
+#' \dontrun{
+#'
+#' qgis_algorithm_search_by_word(str = "clip")
+#' algorithm <- "native:clip"
+#' # Read help.
+#' qgisprocess::qgis_show_help(algorithm = algorithm)
+#'
+#' qgis_algorithm_search_by_word(str = "centroid")
+#' qgis_algorithm_search_by_word(str = "filedownloader")
+#' qgis_algorithm_search_by_word(str = "")
+#' qgis_algorithm_search_by_word()
+#'
+#' }
 qgis_algorithm_search_by_word <- function(str = NULL) {
   if (is.null(str) || str == "") {
     return(NULL)

+ 8 - 7
man/convert_sf2qgis.Rd

@@ -16,13 +16,14 @@ The object with class 'qgis_object'.
 Funktsioon konverteerib geomeetria 'sf' kujul 'qgis_object', et oleks rakendatavad QGIS >= 3.14 tööriist \url{https://github.com/paleolimbot/qgisprocess}. Vaata veel \url{https://r-spatial.github.io/sf/}, \code{\link[sf]{st_is_valid}}.
 }
 \examples{
-## Not run:
-## class(pk)
-## > [1] "sf" ...
-##
-## convert_sf2qgis(x = pk)
-##
-## End(**Not run**)
+\dontrun{
+
+class(pk)
+# > [1] "sf" ...
+
+convert_sf2qgis(x = pk)
+
+}
 }
 \seealso{
 \code{\link[qgisprocess:qgis_run_algorithm]{qgisprocess::qgis_run_algorithm()}}, \code{\link[qgisprocess:is_qgis_result]{qgisprocess::qgis_output()}}, \code{\link[sf:valid]{sf::st_is_valid()}}, \code{\link[sf:st_read]{sf::read_sf()}}

+ 5 - 5
man/copy_qgis_object_to_db.Rd

@@ -33,11 +33,11 @@ No output.
 Funktsioon kopeerib QGIS objekti ('qgis_object') postgis andmebaasi. Andmebaasi ja konfiguratsiooni muutmiseks muuda konfiguratsiooni muutujat \code{conf}. Vaata \code{\link[ruut]{get_config}}.
 }
 \examples{
-## Not run:
-##
-## copy_qgis_object_to_db()
-##
-## End(**Not run**)
+\dontrun{
+
+copy_qgis_object_to_db()
+
+}
 }
 \seealso{
 \code{\link[=db_create_new_schema]{db_create_new_schema()}}, \code{\link[=get_config]{get_config()}}, \url{https://gdal.org/programs/ogr2ogr.html}

+ 5 - 5
man/copy_shp_to_db.Rd

@@ -36,11 +36,11 @@ No output.
 Funktsioon kopeerib ESRI Shapefile objekti postgis andmebaasi. Andmebaasi ja konfiguratsiooni muutmiseks muuda konfiguratsiooni muutujat \code{conf}. Vaata \code{\link[ruut]{get_config}}.
 }
 \examples{
-## Not run:
-##
-## copy_qgis_object_to_db()
-##
-## End(**Not run**)
+\dontrun{
+
+copy_qgis_object_to_db()
+
+}
 }
 \seealso{
 \code{\link[=db_create_new_schema]{db_create_new_schema()}}, \code{\link[=get_config]{get_config()}}

+ 5 - 5
man/db_all_schemas.Rd

@@ -13,11 +13,11 @@ A array of all database schemas.
 Andmebaasi kõikide schemade nimekiri.
 }
 \examples{
-## Not run:
-##
-## db_all_schemas()
-##
-## End(**Not run**)
+\dontrun{
+
+db_all_schemas()
+
+}
 }
 \seealso{
 \code{\link[=db_connect]{db_connect()}}, \code{\link[=get_config]{get_config()}}

+ 6 - 6
man/db_connect.Rd

@@ -14,12 +14,12 @@ db_connect(conf = NULL)
 Andmebaasiga ühenduse looomine.
 }
 \examples{
-## Not run:
-##
-## config <- get_config()
-## conn <- db_connect(conf = config)
-##
-## End(**Not run**)
+\dontrun{
+
+config <- get_config()
+conn <- db_connect(conf = config)
+
+}
 }
 \keyword{database,}
 \keyword{schema}

+ 6 - 6
man/db_create_new_schema.Rd

@@ -16,12 +16,12 @@ New schema created.
 Loome andmebaasi uue schema. Selleks tuleb schema uus nimi lisada conf muutujale. Konfiguratsiooni algväärtused  \code{\link[ruut]{get_config}}.
 }
 \examples{
-## Not run:
-##
-## config <- get_config()
-## db_create_new_schema(conf = config)
-##
-## End(**Not run**)
+\dontrun{
+
+config <- get_config()
+db_create_new_schema(conf = config)
+
+}
 }
 \seealso{
 \code{\link[=db_connect]{db_connect()}}, \code{\link[=get_config]{get_config()}}

+ 5 - 5
man/db_is_shema_exist.Rd

@@ -16,11 +16,11 @@ TRUE/FALSE.
 Kontrollime kas andmebaasi schema eksisteerib.
 }
 \examples{
-## Not run:
-##
-## db_is_shema_exist(schema = "public")
-##
-## End(**Not run**)
+\dontrun{
+
+db_is_shema_exist(schema = "public")
+
+}
 }
 \seealso{
 \code{\link[=db_connect]{db_connect()}}, \code{\link[=get_config]{get_config()}}, \code{\link[=db_all_schemas]{db_all_schemas()}}

+ 8 - 8
man/db_table_colnames.Rd

@@ -13,14 +13,14 @@ db_table_colnames(conf)
 Andmebaasi tabel veergude nimekiri.
 }
 \examples{
-## Not run:
-##
-## config <- get_config()
-## config$schema <- "public"
-## config$table <- "spatial_ref_sys"
-## db_table_colnames(conf = config)
-##
-## End(**Not run**)
+\dontrun{
+
+config <- get_config()
+config$schema <- "public"
+config$table <- "spatial_ref_sys"
+db_table_colnames(conf = config)
+
+}
 }
 \seealso{
 \code{\link[=db_connect]{db_connect()}}, \code{\link[=get_config]{get_config()}}

+ 8 - 8
man/get_config.Rd

@@ -16,14 +16,14 @@ A list().
 JSONi konfiguratsioon faili lugemine. Muuda seda faili vajadusel. Rakenda seda funktsiooni oma konfiguratsioonifailile. Asendame defaul schema nime "date_YYMMDD" tegeliku tänase kuupäevaga, et ei kirjutaks andmebaasis juhuslikult midagi üle. Oma scema lisamiseks config$schema <- "oma_schema".
 }
 \examples{
-## Not run:
-##
-## config <- get_config()
-## config
-## # New schema.
-## config$schema <- "new_schema"
-##
-## End(**Not run**)
+\dontrun{
+
+config <- get_config()
+config
+# New schema.
+config$schema <- "new_schema"
+
+}
 }
 \seealso{
 \code{\link[=db_connect]{db_connect()}}, \code{\link[=get_config]{get_config()}}, \code{\link[=db_all_schemas]{db_all_schemas()}}

+ 8 - 7
man/pk_bbox.Rd

@@ -18,13 +18,14 @@ The object with class 'qgis_object'.
 Funktsioon leiab etteantud piirkonnale piirikasti (boundary box). Tulemuseks on 'qgis_vector'.
 }
 \examples{
-## Not run:
-## class(pk)
-## > [1] "sf" ...
-##
-## pk_bbox(x = pk, type = 1)
-##
-## End(**Not run**)
+\dontrun{
+
+class(pk)
+# > [1] "sf" ...
+
+pk_bbox(x = pk, type = 1)
+
+}
 }
 \seealso{
 \code{\link[qgisprocess:qgis_run_algorithm]{qgisprocess::qgis_run_algorithm()}}, \code{\link[qgisprocess:is_qgis_result]{qgisprocess::qgis_output()}}, \code{\link[=get_config]{get_config()}}

+ 13 - 13
man/qgis_algorithm_search_by_word.Rd

@@ -18,19 +18,19 @@ A array of all database schemas.
 Funktsioon leiab fraasi järele QGIS-i algoritmid.
 }
 \examples{
-## Not run:
-##
-## qgis_algorithm_search_by_word(str = "clip")
-## algorithm <- "native:clip"
-## # Read help.
-## qgisprocess::qgis_show_help(algorithm = algorithm)
-##
-## qgis_algorithm_search_by_word(str = "centroid")
-## qgis_algorithm_search_by_word(str = "filedownloader")
-## qgis_algorithm_search_by_word(str = "")
-## qgis_algorithm_search_by_word()
-##
-## End(**Not run**)
+\dontrun{
+
+qgis_algorithm_search_by_word(str = "clip")
+algorithm <- "native:clip"
+# Read help.
+qgisprocess::qgis_show_help(algorithm = algorithm)
+
+qgis_algorithm_search_by_word(str = "centroid")
+qgis_algorithm_search_by_word(str = "filedownloader")
+qgis_algorithm_search_by_word(str = "")
+qgis_algorithm_search_by_word()
+
+}
 }
 \seealso{
 \code{\link[qgisprocess:qgis_run]{qgisprocess::qgis_algorithms()}}