From e8496475c5d0575212a2048532d30db644ba52d5 Mon Sep 17 00:00:00 2001 From: mpadge Date: Wed, 10 Aug 2022 16:20:53 +0200 Subject: [PATCH] rename match_pts_to_graph -> match_pts_to_verts for #103 --- DESCRIPTION | 2 +- NAMESPACE | 4 ++-- NEWS.md | 4 ++++ R/flows.R | 2 +- R/graph-functions-misc.R | 2 +- R/graph-match-points.R | 20 ++++++++-------- README.Rmd | 6 ++--- README.md | 6 ++--- codemeta.json | 23 ++++--------------- man/compare_heaps.Rd | 4 ++-- man/dodgr_flowmap.Rd | 4 ++-- man/dodgr_full_cycles.Rd | 4 ++-- man/dodgr_fundamental_cycles.Rd | 4 ++-- man/dodgr_insert_vertex.Rd | 4 ++-- man/dodgr_sample.Rd | 4 ++-- man/dodgr_sflines_to_poly.Rd | 4 ++-- man/dodgr_vertices.Rd | 4 ++-- ...s_to_graph.Rd => match_points_to_verts.Rd} | 16 ++++++------- ..._pts_to_graph.Rd => match_pts_to_verts.Rd} | 16 ++++++------- man/merge_directed_graph.Rd | 4 ++-- man/summary.dodgr_dists_categorical.Rd | 4 ++-- man/write_dodgr_wt_profile.Rd | 4 ++-- tests/testthat/test-graph-fns.R | 22 +++++++++--------- 23 files changed, 79 insertions(+), 88 deletions(-) rename man/{match_points_to_graph.Rd => match_points_to_verts.Rd} (83%) rename man/{match_pts_to_graph.Rd => match_pts_to_verts.Rd} (82%) diff --git a/DESCRIPTION b/DESCRIPTION index 42d89d21c..60f1120ee 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: dodgr Title: Distances on Directed Graphs -Version: 0.2.14.082 +Version: 0.2.14.083 Authors@R: c( person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre")), person("Andreas", "Petutschnig", role = "aut"), diff --git a/NAMESPACE b/NAMESPACE index 531579c0f..67a27e906 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -42,8 +42,8 @@ export(dodgr_vertices) export(estimate_centrality_threshold) export(estimate_centrality_time) export(igraph_to_dodgr) -export(match_points_to_graph) -export(match_pts_to_graph) +export(match_points_to_verts) +export(match_pts_to_verts) export(merge_directed_graph) export(weight_railway) export(weight_streetnet) diff --git a/NEWS.md b/NEWS.md index 5160e0ab4..16a416d7b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # v 0.2.14.00X +## Breaking changes: + +- `match_pts_to_graph()` renamed to `match_pts_to_verts()` + ## Major changes: - `dodgr_paths` pairwise calculation shifted to C++, thanks to @dcooley diff --git a/R/flows.R b/R/flows.R index a071614f8..80e5b2db1 100644 --- a/R/flows.R +++ b/R/flows.R @@ -552,7 +552,7 @@ nodes_arg_to_pts <- function (nodes, } if (ncol (nodes) == 2) { verts <- dodgr_vertices (graph) - nodes <- verts$id [match_pts_to_graph (verts, nodes)] + nodes <- verts$id [match_pts_to_verts (verts, nodes)] } return (nodes) } diff --git a/R/graph-functions-misc.R b/R/graph-functions-misc.R index d5e3cf152..1117095d7 100644 --- a/R/graph-functions-misc.R +++ b/R/graph-functions-misc.R @@ -217,7 +217,7 @@ find_w_col <- function (graph) { #' find_xy_col_simple #' #' Find the x and y cols of a simple data.frame of verts of xy points (used only -#' in match_pts_to_graph). +#' in match_pts_to_verts). #' @param dfr Either the result of `dodgr_vertices`, or a `data.frame` #' or equivalent structure (matrix, \pkg{tibble}) of spatial points. #' @return Vector of two values of location of x and y columns diff --git a/R/graph-match-points.R b/R/graph-match-points.R index a4c407bd2..8b20b413f 100644 --- a/R/graph-match-points.R +++ b/R/graph-match-points.R @@ -1,6 +1,6 @@ -#' match_pts_to_graph +#' match_pts_to_verts #' -#' Match spatial points to a spatial graph which contains vertex coordinates +#' Match spatial points to the vertices of a spatial graph #' #' @param verts A `data.frame` of vertices obtained from #' `dodgr_vertices(graph)`. @@ -26,15 +26,15 @@ #' x = min (verts$x) + runif (npts) * diff (range (verts$x)), #' y = min (verts$y) + runif (npts) * diff (range (verts$y)) #' ) -#' pts <- match_pts_to_graph (verts, xy) +#' pts <- match_pts_to_verts (verts, xy) #' pts # an index into verts #' pts <- verts$id [pts] #' pts # names of those vertices -match_pts_to_graph <- function (verts, xy, connected = FALSE) { +match_pts_to_verts <- function (verts, xy, connected = FALSE) { if (!all (c ("id", "x", "y") %in% names (verts))) { message ( - "First argument to match_pts_to_graph should be result of ", + "First argument to match_pts_to_verts should be result of ", "dodgr_vertices;\npresuming you've submitted the network ", "itself and will now try extracting the vertices" ) @@ -80,13 +80,13 @@ match_pts_to_graph <- function (verts, xy, connected = FALSE) { indx [rcpp_points_index_par (verts, xy) + 1L] } -#' match_points_to_graph +#' match_points_to_verts #' -#' Alias for \link{match_points_to_graph} -#' @inherit match_pts_to_graph +#' Alias for \link{match_pts_to_verts} +#' @inherit match_pts_to_verts #' @family misc #' @export -match_points_to_graph <- function (verts, xy, connected = FALSE) { +match_points_to_verts <- function (verts, xy, connected = FALSE) { - match_pts_to_graph (verts, xy, connected = connected) + match_pts_to_verts (verts, xy, connected = connected) } diff --git a/README.Rmd b/README.Rmd index a60e81f68..3bf9930fb 100644 --- a/README.Rmd +++ b/README.Rmd @@ -230,11 +230,11 @@ it's largest connected component only: graph <- graph [graph$component == 1, ] nrow (graph) ``` -or by explicitly using the `match_points_to_graph()` function with the option +or by explicitly using the `match_points_to_verts()` function with the option `connected = TRUE`: ```{r} -from <- match_points_to_graph (v, cbind (from_x, from_y), connected = TRUE) -to <- match_points_to_graph (v, cbind (to_x, to_y), connected = TRUE) +from <- match_points_to_verts (v, cbind (from_x, from_y), connected = TRUE) +to <- match_points_to_verts (v, cbind (to_x, to_y), connected = TRUE) ``` This function returns an index into the result of `dodgr_vertices`, and so points to use for routing must then be extracted as follows: diff --git a/README.md b/README.md index 20ba0bab4..bc562e7b5 100644 --- a/README.md +++ b/README.md @@ -255,12 +255,12 @@ graph <- graph [graph$component == 1, ] nrow (graph) ``` -or by explicitly using the `match_points_to_graph()` function with the +or by explicitly using the `match_points_to_verts()` function with the option `connected = TRUE`: ``` r -from <- match_points_to_graph (v, cbind (from_x, from_y), connected = TRUE) -to <- match_points_to_graph (v, cbind (to_x, to_y), connected = TRUE) +from <- match_points_to_verts (v, cbind (from_x, from_y), connected = TRUE) +to <- match_points_to_verts (v, cbind (to_x, to_y), connected = TRUE) ``` This function returns an index into the result of `dodgr_vertices`, and diff --git a/codemeta.json b/codemeta.json index 617df0586..4828334e6 100644 --- a/codemeta.json +++ b/codemeta.json @@ -7,7 +7,7 @@ "codeRepository": "https://github.com/ATFutures/dodgr", "issueTracker": "https://github.com/ATFutures/dodgr/issues", "license": "https://spdx.org/licenses/GPL-3.0", - "version": "0.2.14.082", + "version": "0.2.14.83", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R", @@ -339,7 +339,7 @@ }, "SystemRequirements": "C++11, GNU make" }, - "fileSize": "5390.6KB", + "fileSize": "5498.627KB", "citation": [ { "@type": "ScholarlyArticle", @@ -359,10 +359,7 @@ "@type": "PublicationIssue", "datePublished": "2019", "isPartOf": { - "@type": [ - "PublicationVolume", - "Periodical" - ], + "@type": ["PublicationVolume", "Periodical"], "name": "Transport Findings" } } @@ -370,18 +367,8 @@ ], "releaseNotes": "https://github.com/ATFutures/dodgr/blob/master/NEWS.md", "readme": "https://github.com/ATFutures/dodgr/blob/main/README.md", - "contIntegration": [ - "https://github.com/atfutures/dodgr/actions?query=workflow%3AR-CMD-check", - "https://app.codecov.io/gh/ATFutures/dodgr" - ], + "contIntegration": ["https://github.com/atfutures/dodgr/actions?query=workflow%3AR-CMD-check", "https://app.codecov.io/gh/ATFutures/dodgr"], "developmentStatus": "https://www.repostatus.org/#active", - "keywords": [ - "distance", - "street-networks", - "shortest-paths", - "r", - "router", - "openstreetmap" - ], + "keywords": ["distance", "street-networks", "shortest-paths", "r", "router", "openstreetmap"], "relatedLink": "https://CRAN.R-project.org/package=dodgr" } diff --git a/man/compare_heaps.Rd b/man/compare_heaps.Rd index fbfd817a7..6dc3ccac0 100644 --- a/man/compare_heaps.Rd +++ b/man/compare_heaps.Rd @@ -45,8 +45,8 @@ Other misc: \code{\link{dodgr_sample}()}, \code{\link{dodgr_sflines_to_poly}()}, \code{\link{dodgr_vertices}()}, -\code{\link{match_points_to_graph}()}, -\code{\link{match_pts_to_graph}()}, +\code{\link{match_points_to_verts}()}, +\code{\link{match_pts_to_verts}()}, \code{\link{merge_directed_graph}()}, \code{\link{summary.dodgr_dists_categorical}()}, \code{\link{write_dodgr_wt_profile}()} diff --git a/man/dodgr_flowmap.Rd b/man/dodgr_flowmap.Rd index f61163b71..6e810628c 100644 --- a/man/dodgr_flowmap.Rd +++ b/man/dodgr_flowmap.Rd @@ -49,8 +49,8 @@ Other misc: \code{\link{dodgr_sample}()}, \code{\link{dodgr_sflines_to_poly}()}, \code{\link{dodgr_vertices}()}, -\code{\link{match_points_to_graph}()}, -\code{\link{match_pts_to_graph}()}, +\code{\link{match_points_to_verts}()}, +\code{\link{match_pts_to_verts}()}, \code{\link{merge_directed_graph}()}, \code{\link{summary.dodgr_dists_categorical}()}, \code{\link{write_dodgr_wt_profile}()} diff --git a/man/dodgr_full_cycles.Rd b/man/dodgr_full_cycles.Rd index 2ec8707f7..e709b2866 100644 --- a/man/dodgr_full_cycles.Rd +++ b/man/dodgr_full_cycles.Rd @@ -46,8 +46,8 @@ Other misc: \code{\link{dodgr_sample}()}, \code{\link{dodgr_sflines_to_poly}()}, \code{\link{dodgr_vertices}()}, -\code{\link{match_points_to_graph}()}, -\code{\link{match_pts_to_graph}()}, +\code{\link{match_points_to_verts}()}, +\code{\link{match_pts_to_verts}()}, \code{\link{merge_directed_graph}()}, \code{\link{summary.dodgr_dists_categorical}()}, \code{\link{write_dodgr_wt_profile}()} diff --git a/man/dodgr_fundamental_cycles.Rd b/man/dodgr_fundamental_cycles.Rd index 9b7722541..620bb5c97 100644 --- a/man/dodgr_fundamental_cycles.Rd +++ b/man/dodgr_fundamental_cycles.Rd @@ -65,8 +65,8 @@ Other misc: \code{\link{dodgr_sample}()}, \code{\link{dodgr_sflines_to_poly}()}, \code{\link{dodgr_vertices}()}, -\code{\link{match_points_to_graph}()}, -\code{\link{match_pts_to_graph}()}, +\code{\link{match_points_to_verts}()}, +\code{\link{match_pts_to_verts}()}, \code{\link{merge_directed_graph}()}, \code{\link{summary.dodgr_dists_categorical}()}, \code{\link{write_dodgr_wt_profile}()} diff --git a/man/dodgr_insert_vertex.Rd b/man/dodgr_insert_vertex.Rd index 94a9ee9a8..994cef6d3 100644 --- a/man/dodgr_insert_vertex.Rd +++ b/man/dodgr_insert_vertex.Rd @@ -50,8 +50,8 @@ Other misc: \code{\link{dodgr_sample}()}, \code{\link{dodgr_sflines_to_poly}()}, \code{\link{dodgr_vertices}()}, -\code{\link{match_points_to_graph}()}, -\code{\link{match_pts_to_graph}()}, +\code{\link{match_points_to_verts}()}, +\code{\link{match_pts_to_verts}()}, \code{\link{merge_directed_graph}()}, \code{\link{summary.dodgr_dists_categorical}()}, \code{\link{write_dodgr_wt_profile}()} diff --git a/man/dodgr_sample.Rd b/man/dodgr_sample.Rd index ea593c413..e2c295145 100644 --- a/man/dodgr_sample.Rd +++ b/man/dodgr_sample.Rd @@ -40,8 +40,8 @@ Other misc: \code{\link{dodgr_insert_vertex}()}, \code{\link{dodgr_sflines_to_poly}()}, \code{\link{dodgr_vertices}()}, -\code{\link{match_points_to_graph}()}, -\code{\link{match_pts_to_graph}()}, +\code{\link{match_points_to_verts}()}, +\code{\link{match_pts_to_verts}()}, \code{\link{merge_directed_graph}()}, \code{\link{summary.dodgr_dists_categorical}()}, \code{\link{write_dodgr_wt_profile}()} diff --git a/man/dodgr_sflines_to_poly.Rd b/man/dodgr_sflines_to_poly.Rd index 0223373ad..0b6dd7280 100644 --- a/man/dodgr_sflines_to_poly.Rd +++ b/man/dodgr_sflines_to_poly.Rd @@ -32,8 +32,8 @@ Other misc: \code{\link{dodgr_insert_vertex}()}, \code{\link{dodgr_sample}()}, \code{\link{dodgr_vertices}()}, -\code{\link{match_points_to_graph}()}, -\code{\link{match_pts_to_graph}()}, +\code{\link{match_points_to_verts}()}, +\code{\link{match_pts_to_verts}()}, \code{\link{merge_directed_graph}()}, \code{\link{summary.dodgr_dists_categorical}()}, \code{\link{write_dodgr_wt_profile}()} diff --git a/man/dodgr_vertices.Rd b/man/dodgr_vertices.Rd index 9326f9a59..4f7a26ad0 100644 --- a/man/dodgr_vertices.Rd +++ b/man/dodgr_vertices.Rd @@ -34,8 +34,8 @@ Other misc: \code{\link{dodgr_insert_vertex}()}, \code{\link{dodgr_sample}()}, \code{\link{dodgr_sflines_to_poly}()}, -\code{\link{match_points_to_graph}()}, -\code{\link{match_pts_to_graph}()}, +\code{\link{match_points_to_verts}()}, +\code{\link{match_pts_to_verts}()}, \code{\link{merge_directed_graph}()}, \code{\link{summary.dodgr_dists_categorical}()}, \code{\link{write_dodgr_wt_profile}()} diff --git a/man/match_points_to_graph.Rd b/man/match_points_to_verts.Rd similarity index 83% rename from man/match_points_to_graph.Rd rename to man/match_points_to_verts.Rd index c3c491d15..c3bb54aee 100644 --- a/man/match_points_to_graph.Rd +++ b/man/match_points_to_verts.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/graph-functions-misc.R -\name{match_points_to_graph} -\alias{match_points_to_graph} -\title{match_points_to_graph} +% Please edit documentation in R/graph-match-points.R +\name{match_points_to_verts} +\alias{match_points_to_verts} +\title{match_points_to_verts} \usage{ -match_points_to_graph(verts, xy, connected = FALSE) +match_points_to_verts(verts, xy, connected = FALSE) } \arguments{ \item{verts}{A \code{data.frame} of vertices obtained from @@ -25,7 +25,7 @@ matching.} A vector index into verts } \description{ -Alias for \link{match_points_to_graph} +Alias for \link{match_pts_to_verts} } \examples{ net <- weight_streetnet (hampi, wt_profile = "foot") @@ -36,7 +36,7 @@ xy <- data.frame ( x = min (verts$x) + runif (npts) * diff (range (verts$x)), y = min (verts$y) + runif (npts) * diff (range (verts$y)) ) -pts <- match_pts_to_graph (verts, xy) +pts <- match_pts_to_verts (verts, xy) pts # an index into verts pts <- verts$id [pts] pts # names of those vertices @@ -51,7 +51,7 @@ Other misc: \code{\link{dodgr_sample}()}, \code{\link{dodgr_sflines_to_poly}()}, \code{\link{dodgr_vertices}()}, -\code{\link{match_pts_to_graph}()}, +\code{\link{match_pts_to_verts}()}, \code{\link{merge_directed_graph}()}, \code{\link{summary.dodgr_dists_categorical}()}, \code{\link{write_dodgr_wt_profile}()} diff --git a/man/match_pts_to_graph.Rd b/man/match_pts_to_verts.Rd similarity index 82% rename from man/match_pts_to_graph.Rd rename to man/match_pts_to_verts.Rd index d3c7d33b7..213a38a35 100644 --- a/man/match_pts_to_graph.Rd +++ b/man/match_pts_to_verts.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/graph-functions-misc.R -\name{match_pts_to_graph} -\alias{match_pts_to_graph} -\title{match_pts_to_graph} +% Please edit documentation in R/graph-match-points.R +\name{match_pts_to_verts} +\alias{match_pts_to_verts} +\title{match_pts_to_verts} \usage{ -match_pts_to_graph(verts, xy, connected = FALSE) +match_pts_to_verts(verts, xy, connected = FALSE) } \arguments{ \item{verts}{A \code{data.frame} of vertices obtained from @@ -25,7 +25,7 @@ matching.} A vector index into verts } \description{ -Match spatial points to a spatial graph which contains vertex coordinates +Match spatial points to the vertices of a spatial graph } \examples{ net <- weight_streetnet (hampi, wt_profile = "foot") @@ -36,7 +36,7 @@ xy <- data.frame ( x = min (verts$x) + runif (npts) * diff (range (verts$x)), y = min (verts$y) + runif (npts) * diff (range (verts$y)) ) -pts <- match_pts_to_graph (verts, xy) +pts <- match_pts_to_verts (verts, xy) pts # an index into verts pts <- verts$id [pts] pts # names of those vertices @@ -51,7 +51,7 @@ Other misc: \code{\link{dodgr_sample}()}, \code{\link{dodgr_sflines_to_poly}()}, \code{\link{dodgr_vertices}()}, -\code{\link{match_points_to_graph}()}, +\code{\link{match_points_to_verts}()}, \code{\link{merge_directed_graph}()}, \code{\link{summary.dodgr_dists_categorical}()}, \code{\link{write_dodgr_wt_profile}()} diff --git a/man/merge_directed_graph.Rd b/man/merge_directed_graph.Rd index d779bd9a4..20f18fa9a 100644 --- a/man/merge_directed_graph.Rd +++ b/man/merge_directed_graph.Rd @@ -54,8 +54,8 @@ Other misc: \code{\link{dodgr_sample}()}, \code{\link{dodgr_sflines_to_poly}()}, \code{\link{dodgr_vertices}()}, -\code{\link{match_points_to_graph}()}, -\code{\link{match_pts_to_graph}()}, +\code{\link{match_points_to_verts}()}, +\code{\link{match_pts_to_verts}()}, \code{\link{summary.dodgr_dists_categorical}()}, \code{\link{write_dodgr_wt_profile}()} } diff --git a/man/summary.dodgr_dists_categorical.Rd b/man/summary.dodgr_dists_categorical.Rd index d49c45f3a..4d6df3a52 100644 --- a/man/summary.dodgr_dists_categorical.Rd +++ b/man/summary.dodgr_dists_categorical.Rd @@ -27,8 +27,8 @@ Other misc: \code{\link{dodgr_sample}()}, \code{\link{dodgr_sflines_to_poly}()}, \code{\link{dodgr_vertices}()}, -\code{\link{match_points_to_graph}()}, -\code{\link{match_pts_to_graph}()}, +\code{\link{match_points_to_verts}()}, +\code{\link{match_pts_to_verts}()}, \code{\link{merge_directed_graph}()}, \code{\link{write_dodgr_wt_profile}()} } diff --git a/man/write_dodgr_wt_profile.Rd b/man/write_dodgr_wt_profile.Rd index 1c0a26306..415702a2c 100644 --- a/man/write_dodgr_wt_profile.Rd +++ b/man/write_dodgr_wt_profile.Rd @@ -29,8 +29,8 @@ Other misc: \code{\link{dodgr_sample}()}, \code{\link{dodgr_sflines_to_poly}()}, \code{\link{dodgr_vertices}()}, -\code{\link{match_points_to_graph}()}, -\code{\link{match_pts_to_graph}()}, +\code{\link{match_points_to_verts}()}, +\code{\link{match_pts_to_verts}()}, \code{\link{merge_directed_graph}()}, \code{\link{summary.dodgr_dists_categorical}()} } diff --git a/tests/testthat/test-graph-fns.R b/tests/testthat/test-graph-fns.R index 8b39cba20..629d5005a 100644 --- a/tests/testthat/test-graph-fns.R +++ b/tests/testthat/test-graph-fns.R @@ -336,50 +336,50 @@ test_that ("points to graph", { pts <- data.frame (x = x, y = y) net <- weight_streetnet (hampi) expect_message ( - index1 <- match_pts_to_graph (net, pts), + index1 <- match_pts_to_verts (net, pts), paste0 ( - "First argument to match_pts_to_graph should ", + "First argument to match_pts_to_verts should ", "be result of dodgr_vertices" ) ) v <- dodgr_vertices (net) - expect_silent (index2 <- match_pts_to_graph (v, pts)) + expect_silent (index2 <- match_pts_to_verts (v, pts)) expect_identical (index1, index2) colnames (pts) <- NULL expect_message ( - index3 <- match_pts_to_graph (v, pts), + index3 <- match_pts_to_verts (v, pts), "xy has no named columns; assuming order is x then y" ) expect_identical (index1, index3) pts <- data.frame (x = x, y = y, x2 = x) expect_error ( - index4 <- match_pts_to_graph (v, list (pts)), + index4 <- match_pts_to_verts (v, list (pts)), "xy must be a matrix or data.frame" ) expect_error ( - index4 <- match_pts_to_graph (v, pts), + index4 <- match_pts_to_verts (v, pts), "xy must have only two columns" ) pts <- data.frame (x = x, y = y) - expect_silent (index4 <- match_pts_to_graph (v, pts, connected = TRUE)) + expect_silent (index4 <- match_pts_to_verts (v, pts, connected = TRUE)) expect_true (!identical (index1, index4)) class (pts) <- c (class (pts), "tbl") - expect_silent (index5 <- match_pts_to_graph (v, pts, connected = TRUE)) + expect_silent (index5 <- match_pts_to_verts (v, pts, connected = TRUE)) expect_identical (index4, index5) pts <- sf::st_as_sf (pts, coords = c (1, 2), crs = 4326) - expect_silent (index6 <- match_pts_to_graph (v, pts, connected = TRUE)) + expect_silent (index6 <- match_pts_to_verts (v, pts, connected = TRUE)) expect_identical (index4, index6) - expect_silent (index7 <- match_points_to_graph (v, pts, connected = TRUE)) + expect_silent (index7 <- match_pts_to_verts (v, pts, connected = TRUE)) expect_identical (index4, index7) pts <- hampi [1, ] - expect_error (index7 <- match_points_to_graph (v, pts)) + expect_error (index7 <- match_pts_to_verts (v, pts)) # error is "xy$geometry must be a collection of sfc_POINT objects", but # expect_error does not match on the "$" symbo, but expect_error does not # match on the "$" symbol