mdsumner / gibble
Showing 1 of 162 files from the diff.
Other files ignored by Codecov
man/hsh_sf.Rd has changed.
.gitignore has changed.
docs/index.html has changed.
docs/pkgdown.css has changed.
docs/pkgdown.yml has changed.
README.Rmd has changed.
data/mpoly.rda has changed.
docs/authors.html has changed.
docs/pkgdown.js has changed.
README.md has changed.
data/hsh.rda was deleted.
NEWS.md has changed.
DESCRIPTION has changed.
cran-comments.md has changed.

@@ -0,0 +1,62 @@
Loading
1 +
# m <- mpoly[1]
2 +
# plot(m, reset = F)
3 +
#
4 +
# draw_poly <- function(...) {
5 +
#   x <- do.call(cbind, locator())
6 +
#   sf::st_polygon(list(x[c(seq_len(nrow(x)), 1L), ]))
7 +
# }
8 +
# p <- draw_poly()
9 +
# m <- st_difference(m, p)
10 +
# #dput(m)
11 +
12 +
# m <- structure(list(structure(list(list(structure(c(0, 1, 2, 3, 1,
13 +
#                                                     0, 0, 4, 4, 2, 0, 0), .Dim = c(6L, 2L)), structure(c(1, 2, 1, 1, 1, 2, 2, 1),
14 +
#                       .Dim = c(4L, 2L)), structure(c(1.30767480085978, 1.28036414211658, 1.88119863446706,
15 +
#                                                      1.30767480085978, 3.03643949930459, 2.55850297129852, 2.49022632444051,
16 +
#                                                      3.03643949930459), .Dim = c(4L, 2L))),
17 +
#                       list(structure(c(3, 3, 4, 4, 3, 0, 1, 1, 0, 0), .Dim = c(5L, 2L)),
18 +
#                            structure(c(3.3, 3.8, 3.8, 3.3, 3.3, 0.3, 0.3, 0.8, 0.8, 0.3),
19 +
#                                      .Dim = c(5L, 2L))), list(structure(c(3, 4, 4, 3, 3, 3, 2, 3),
20 +
#                   .Dim = c(4L, 2L)))), class = c("XY", "MULTIPOLYGON", "sfg"))), n_empty = 0L,
21 +
#                crs = structure(list(epsg = NA_integer_,
22 +
#               proj4string = NA_character_), class = "crs"),
23 +
#                idx = structure(c(1, 1), .Dim = 1:2), class = c("sfc_MULTIPOLYGON", "sfc"),
24 +
#               precision = 0, bbox = structure(c(xmin = 0, ymin = 0, xmax = 4, ymax = 4), class = "bbox"))
25 +
#
26 +
#
27 +
# spm <- as(m, "Spatial")
28 +
# gibble_cmt(spm)
29 +
30 +
sp_cmt <- function(x, ...) {
31 +
  UseMethod("sp_cmt")
32 +
}
33 +
sp_cmt.Polygons <- function(x, ...) {
34 +
  comment(x)
35 +
}
36 +
sp_cmt.SpatialPolygons <- function(x, ...) {
37 +
  unlist(lapply(x@polygons, sp_cmt))
38 +
}
39 +
40 +
# the comment value in gibble form
41 +
gibble_cmt <- function(x, ...) {
42 +
  l <- strsplit(sp_cmt(x), "\\s+", perl = TRUE)
43 +
  as.integer(unlist(l))
44 +
}
45 +
46 +
## convert
47 +
48 +
## make polygons
49 +
# .x <- 0
50 +
# pts <- matrix(rnorm(1e3, .x), ncol = 2L)
51 +
# tri <- RTriangle::triangulate(RTriangle::pslg(P = pts))
52 +
# ## drop most triangles
53 +
# idx <- tri$T[sample(seq_len(nrow(tri$T)), 0.8 * nrow(tri$T)), c(1, 2, 3, 1)]
54 +
# d <- tibble::tibble(x = pts[t(idx),1L], y = pts[t(idx), 2L],
55 +
#                     polygon_id = rep(seq_len(nrow(idx)), each = 4L))
56 +
#
57 +
# p <- sf::st_union(sfheaders::sfc_polygon(d, x = "x", y = "y", polygon_id = "polygon_id"))
58 +
# plot(p, border = NA, col = "grey")
59 +
#
60 +
#
61 +
# g <- gibble(p)
62 +
# g$cmt <- gibble_cmt(as(p, "Spatial"))
Files Coverage
R 48.15%
Project Totals (7 files) 48.15%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading