get_strokes {kanjistat} | R Documentation |
Get the strokes of a kanjivec object
Description
The strokes are the leaves of the kanjivec stroketree
. They consist of
a two-column matrix giving a discretized path for the stroke in the unit square [0,1]^2
with further attributes.
Usage
get_strokes(kvec, which = 1:kvec$nstrokes, simplify = TRUE)
Arguments
kvec |
an object of class |
which |
a numeric vector specifying the numbers of the strokes that are to be returned. Defaults to all strokes. |
simplify |
logical. Shall only the stroke be returned if |
Value
Usually a list of strokes with attributes. Regardless of
whether which
is ordered or contains duplicates, the returned list will always contain
the strokes in their natural order without duplicates. If which
has length 1 and
simplified = TRUE
, the list is avoided, and only the single stroke is returned.
See Also
Examples
kanji <- fivebetas[[5]]
get_strokes(kanji, c(3,10)) # the two long vertical strokes in \u9663
[Package kanjistat version 0.14.1 Index]