svgTranslate: Collection of functions to get and replace text in a svg file

Description Usage Arguments Value Examples

Description

createTextToTranslate: get the path to a svg file and return a csv file with all text elements (which are not pure numerics)

createTranslatedSVG: get a svg file and its text translations, output the translated svgs

Usage

1
2
3
4
createTextToTranslate(input, ouputFileAppend = "_text.csv")

createTranslatedSVG(input = NULL, tradFile = NULL, inDirectory = "trad",
  overwrite = TRUE)

Arguments

input

path to a svg file

ouputFileAppend

suffix to append at the end of the created SVG file, if NULL returns a vector of text elements

tradFile

path to the csv translations

inDirectory

path to a directory where all the output files are saved

overwrite

a boolean, output svg files to be overwritten?

input

path to the original svg file to translate

Value

the output file path or a character vector if ouputFileAppend is NULL

Examples

1
2
3
require(XML)
test <- createTextToTranslate(system.file("extdata", "slopegraph_test.svg", package="swiMap"), ouputFileAppend = NULL)
test

d-qn/swiMap documentation built on May 14, 2019, 3:04 p.m.