sum_vector: Vector Syllable Sums

Description Usage Arguments Value See Also Examples

View source: R/sum_vector.R

Description

Syllable sums for the words in a vector of strings.

Usage

1

Arguments

x

A character vector.

...

ignored.

Value

Returns a list of vectors of integer counts.

See Also

Other syllable.functions: count_string, count_vector_by, count_vector, sum_string, sum_vector_by, tally_both_string, tally_both_vector_by, tally_both_vector, tally_di_string, tally_di_vector_by, tally_di_vector, tally_mono_string, tally_mono_vector_by, tally_mono_vector, tally_poly_string, tally_poly_vector_by, tally_poly_vector, tally_short_string, tally_short_vector_by, tally_short_vector

Examples

1
2
3
4
5
6
7
8
9
sents <- c("I like chicken.", "I want eggs Benedict for breakfast.")
sum_vector(sents)

data.frame(
   sents, syllable_count = sum_vector(sents),
   stringsAsFactors = FALSE
)

sum_vector(presidential_debates_2012$dialogue)

Example output

[1] 4 9
                                sents syllable_count
1                     I like chicken.              4
2 I want eggs Benedict for breakfast.              9
   [1]  17  14  22  24   7   6  53   2  23  22   7   7  64  14  20  14  22   7
  [19]  13  38  14   8  51  57   8  57  12   5   4  20  39  27  24  23  15   7
  [37]  21   8   6   2   2   6   9  11  12   3  12   7   9   7  26   2  20   7
  [55]  36   2  23   4   6   4   4   2  39   4  15   5  12  20   8  16  20   5
  [73]  21  21  13  14   9   5   5   2   8  44   8   4  37  34  19   9  21   6
  [91]   4   3   8   9  13   8  16  16   6  13   2   3  26   9  31   8  34  21
 [109]  21  55   5  23  18  21  46  35  15  33  22  38  16   7  11  12   8  20
 [127]  15   8  21   5  14  16   5  18  55   4  12  11   8  32  16  14  35   2
 [145]  17  33  17   9   5  11   1   3  14   8  22  29  40   8  48   6  50   9
 [163]   5   8   9  24  16  32   7  33  17  83   4  31  37  13  38  44  59  24
 [181]  22  53  36  14  21   6   6  14  12  24  43  64   8   9  86   6  44  12
 [199]   5  27   8  15  27  21  44  64  52   6   6  16   7  27  27  52  30  42
 [217]  45  21   5  11   5  22  34  19  10  12  35  64  63  16  69  23   8  32
 [235]  14  38  27  34  52  38  33  12  19   6  29  33  68  31   1  11  12   1
 [253]   8   6  14  18  17  13  17  43  48  27  49  27   7  27  23  28  34  53
 [271]  29  54   6  21  29  11  38  15  64  28  22  13  13  19  13  70  26  16
 [289]  24   4  39  45  26   1  43  31   6   1   8   2  45  24  24  11  11  20
 [307]   6  17  34  14  18  14  14   7  28  39  28  12  20   7  20   7  60  21
 [325]   4   5  13   6  57  12   4  22   7  33  67  47  23  94   9   4  20  25
 [343]   9  10  46  48  10  37  25  13  39  13   2   6  16   9  21  17  10  16
 [361]  22   6  34  13  18  44  28  34  44   4  42  46  50  16  15  26  21   2
 [379]  12   6   2  22   6  35  28  19  53  21  12  62  50  39  20  42  36  17
 [397]  65  36   8   6  43  47  49   9   7  42  17  10  68  24  11  38  19 101
 [415]  39  17   9  35  14  27   6  11  33  14  13  18   6  37  23  91  30  12
 [433]   3  39  14  14  11   7   3  14  17  16   5   3   4  11  25   6   3  25
 [451]  26  29  39  22   3  43  31  13   7   9  87  34  38  16  25   2  15  50
 [469]   5   5   5  55  65  18  20  35   9  30  13  25  54  36  36  16  50   0
 [487]  35  51   8   5  31  38  14  16  21 109  56  14 124  45  11  33  26  17
 [505]  44  25  11   9  10  22  23  24  10  14  20  54   7  12  22   7  42   7
 [523]   8  17  26  18  32   5  25  11  49  32  16  21  18   8  19  19  14  21
 [541]   3   5   7  35  16   5  16  11  30  25   7  22  12  14  14  32  31  32
 [559]  30  13  24  22  23  50  39   5  37  28  18  22  35   5   6  19  11   9
 [577]  19  16  25  55  14  22  19  25  11  14  24  16  13   6   6  12  22  23
 [595]  11  19  31   5   5  21  10   4   3   5  11  22  11  25   8   9  34  18
 [613]  19  16  31  58  25  22  90  13  55  21  20  29  30  30  28  34  11  15
 [631]  23  21  30  21  11  11   4  30   4  18  29  18  19  32   3  34  15  10
 [649]   9   6  24  40  19   9   3  13  24   9  38  15  13  12   6  21  40  23
 [667]  13  29  19  11  14  23  17  27   9   5   5   8  11   2  15  25  14  38
 [685]  24  21  11  18  16  16  21  10  14  34  21  28   7  20  22  32  15  51
 [703]  40  19  42  15  17  21  11  17  11  35  28  33   1  34   8  16   9  32
 [721]   5  31  23  36  26  15  14   6  11  13  21  27  10  28  56  30  19  14
 [739]  13  14   5  27  32  42  28  30  16   7  36  15  14  62  13  11  46  11
 [757]  20  35   6  33  29  12   4  26   7   6   2   8  13   2  22   9  10  19
 [775]   9   7   9   2   3   4  23  40   5  17   2  12  20  12   5   2   4  16
 [793]   3   6   4   6  31  14  23  21  29   8   4   1  15   0   6   2   5  13
 [811]  11  29  23   5  26   6   5   3  10  27  25  53  11  61   3  19  17   5
 [829]   3   3  57  33  27  36   6   7  18  25  80   5  13   8  17   9   4   5
 [847]   6   2  10  10  12  10   8   8  18   4   3  26   4   2  17  13   6   2
 [865]  14  13  30   8   7   8   8  24   9  14   3  64  41   3   4   5  23  20
 [883]   5  52  39  46  15   4   7  22  16   5   7  70  29   6  14  53  39  54
 [901]   6   8  72  17  14  12  12  32  21  32   6  22  26   7  32   7  30   4
 [919]  12  30  13  13  14  38  22   7  22  70  16   6  35   9  45  37  11  13
 [937]  20  15  62   8  16  12  30   9  37   7  11  78  43  14   6  10  20  13
 [955]  16  35  29   8  16  26  25  23   7  43   3  23   7  12   6  16  18   9
 [973]   9  11  11  11   8  10   9  20  18  53   2   5  21  51  40   7  21  14
 [991]  32  25   4  29  39  39  16  90  73  45   9  16  20  18  12   2  17  20
[1009]  24   6  23  12  34  35   7  30  38   6  25  25   8  10   7  16   4  22
[1027]   1  18   7   7  12  56  13  17   1   6  14  50   9  26  27  17  20  26
[1045]  22   5  11  30  70   4  35  34  30  32  17  27  43  11  48  41  14  18
[1063]  12   2  59  24  16  21  39  29  73  34  34  15  16  37   4  17  56  17
[1081]  12  11  22  83   6  36   9  16  26  38   3  36  15  36   7  21  23   7
[1099]  47   6  32  22   6  12  51  13  67  20  24  16  25   8   7   8  38   5
[1117]  29  18  17   7  35  41  33  14  15   1   2   9  31   6   4  13   4   2
[1135]   8  30  23  31  24  18  24   3  11  38  57  43  16  21  20  15  15   6
[1153]  35  23  18  16  14   9   6  14  20  12  23  64   7   8  21  18   4   5
[1171]  23  16  37  21   8  14  36  11  73  18  73  39  53   9  13  10  19  16
[1189]  14  10  47  21   7  15  30  10   9  15  17  15  16   8   6  30   3  15
[1207]  13  50  50  36  27  16   8   5   5  59  36  22  31  26   8  64   4  14
[1225]   4  13  31   4  28   8  30   9  26   5   2   5   2   3   6  47  24  13
[1243]  13  13   3  11  14   8   3   7   4  40   5   4  14  26   6  19  11   7
[1261]   6  37  14  41  39  13   9  22  29  19   5  16  14  11  22   8   4  55
[1279]  16  15  52  17  36  14  20  14  49  32   9  38  10  15  12  13  11  19
[1297]   8  18   1   5   2   2   3   2   4   2  39   2   2   5   1   6  35  13
[1315]  15  33  13  11   7   7  29  29  33   1   2  10  17  19  11  18  46  17
[1333]  29  67  64   5  23  43  20   7  15  14  26   8  24   9  49  73   7  17
[1351]  58  82   5  23  12   7  20  17  11  51  30  14  15  46   3  34  14  19
[1369]   3  21   8  23  49  14   6   1  10  26  23  67   4  29  13  19   6   9
[1387]  11  19  17  24   8  21  25  34   9  53  23  40  12  29   2   5   1   9
[1405]   9   6  10   5   6   3   7  21  29  12   7   4  12  10  13   8   7   7
[1423]   5  13  14  12  11  12   7  12   2  21  25  36   5   7   6  37  29   8
[1441]  31  59   4   4   2  20  12  12   5  11   6  26   2   3   8   3   3   7
[1459]   4  31   1  65  14  41  23  11  11  22  44  35  40  52  15  48  19  10
[1477]  19  19  17  16  37  37  39   8  13   3  14  66  23  23  14  18  39  10
[1495]  27  63   6 121  64  11  13   9  20  17  37  14  51  53  18  22  40  19
[1513]  15   5  37  44  27  32  24   1  33   5  20   7   3   5  45   4  21  18
[1531]   6  39   4   8  12  11  10  35   7  38   2  21  23   2   3  27   3   7
[1549]   7  12   3   7   4  13   2   7   4   7   5  23  56  45  28  25  27  35
[1567]   9  46   9  41  30  40  27  29  33  20  19  32   7  61  16  39  42  20
[1585]  33  35  31  42  76  11  68  13   7  12  33   1  16   6   6   9   4   1
[1603]   9  11  44   8  19   4   7  10  30   4   7   2   4  30   7  24  18  18
[1621]  15  15  14   9  19   9  29  25  25  15  42  18  40  24   5  33  21  13
[1639]   3  10   1   9  19  36  63  21   9  76  24  15   7  15  18   7  15  12
[1657]  16  25  34  16  42  17  36  23   2   7  26   3  14  48  14  17  42   1
[1675]   2  46  18  10   4   4  12  27  25  16  36  20  28   4   7  41  14  19
[1693]  10  20  18  16  24   9  21   9  13  26  24   8  17  33   5  14   4   4
[1711]   5   4  21  17   5  14   9   7  13  15  20  71  21   7  46   6   5   8
[1729]   8  30   2   4   4   8   4  33  29  19  41  36  17  25   6  24  15  22
[1747]  17  12  19  12  17  32  20  39  40  15  12  13  20  18  25  21  17  12
[1765]   6   2  30   7   3   3   6   8  13  13  44   6  27  28  47  11  14  22
[1783]  12  10  54  13  10  38  25   7  11  14  19   1  17  12  21  20  19  15
[1801]  31  27   5  10   5  23  31   8   6  19  46  18  13  14  31  65  39   4
[1819]  23  29  11  14  19   4   3   3   6   9   8  18  39  12   9   3   3  17
[1837]  15  14  32   5  56  60  21  26  39   9  25  15  27  22  23  30  10  59
[1855]   7  59   5  22  11  29  19  45  26 106  11  21  83  55   4  19  87  46
[1873]  10   7  37  18   7  48   6  17   1  17  20  47   9   9   7  15  54  15
[1891]  25   9  19  19  47  18  13  98  75  20  21  47  25  14  44  17   5  40
[1909]  37  50  20  26   9  48  12  50  14  19   1   3  40  13   1   5   6  24
[1927]  27  11  30   4   8  21  14  55   8   3   4   7  10   3  12   6   7  23
[1945]   2   5   2   7   3  15   3  16   8  12   4  25  22  37  22  42  39  51
[1963]  25  33  24  19  43  16  17  11  22  11  10   4   3  26   8   5  24  12
[1981]  11  60  21  77  43  87  14  64   3  23  28  38  15   6  25  22  27  17
[1999]  15  73  17  19  11  31  22   8  54  11   6  62  17  28   1   3  25   4
[2017]  18  20   2   6   9  10  23  37  22  49  17  31  45  11  34  15  13  67
[2035]   8  39  16  24  11  44  34  23   1  15  24  11  18  48  25   7  15   5
[2053]   9  31  17   7  21  47   9  13  33   1  20  10  20  37  11  54  39  25
[2071]  13  35  26  72  14  21  30  63  47  69  27  28   1  27  17 110  85  44
[2089]   7  33   4  27   6   9  22  14  14  38  34  10   8  12  13  24  31   7
[2107]  24  20  13  18  22  31   2  14  39   6  27  50  28  15   5  14  15  17
[2125]  23   6  19  16  22  33  11  18  16  26  19  11  24  11  10  27  53  60
[2143]  32   5  15  24  48  28  64  34  49  33  15  28  35  12  14  15  37  25
[2161]  20  17  30  43  12  18  33  24  11   7   8  29  21  26  11   8  13  19
[2179]  27  30   7  25  52  15  47  24  12  16   8  11  26  17  11  15  60  18
[2197]   7  13  38  18  28  17  12  41  10  41  22  21  47  25  65  20  10   5
[2215]   9   2  12   2  20  17  15  33  16  14   5  45   5  23  11  17  18   8
[2233]   2  88  11   3  16   5  24  14   7   9  21  10  21  40   4  11   4  10
[2251]   5  18  36  19  14  10  14  24  58  13  26  33  24  16   5   9  31  20
[2269]  31  26  31   3  34  10  42  32  22   7  36  14   9  17   8  17  21  40
[2287]  32   8  13  15  27  12  23  13  12  16   2  13  13   4  30  20  11  19
[2305]   8  18  30  37   8  42  44  20   9  15  10   5  22   6  26  29  28  15
[2323]  16  18   9  78  26   2  18   5  19  74  17  32   5  10  11  18  11   1
[2341]  15  12  45  32  32  11  36  10  29  11  43  24  11  28  16  19  54  41
[2359]  40   3  50  32   4  47  53  47  31  14   4  12  16  10   7  18  19   6
[2377]   1   7  29   9  16  22  12   7  25  18  55  15  32  51   9  14  13   4
[2395]  29   1   9  28  29  29   6  18  51  22   5  12  63  22  22   9  26  25
[2413]  12  16  27  10   5  27   8  68   6  53   3  50  18  65  30  41  10  38
[2431]   8  34  48  37  46  19  14  30   6  14  10  35   6  24  22  25  30  62
[2449]  39  65  28  13   6  31  29  25  12  12  36   4  51  27  14  29  20  19
[2467]  11   7  33  19   8  39  27  39  21  25  30  60  36  36  27   7   3  15
[2485]  50  27   9   1   2   3  11  37  24  19  38   5  20  27  49  22  19  77
[2503]  35  21   2  10  49  54  16  30  38  19  27  47  13  18  13  40  38  16
[2521]  23  40  30  17  27  49   4  31   1   8  30  12   6   6  41  41  41   4
[2539]  12  37  16  12  19  60   9  57  26  40  42  21  23  33  41  33  51   5
[2557]  29  30  20  28  15  23  30  11  46  17  44  34 106  35  19  13  29  29
[2575]  11  26   2  25  39  22  26  11  70  29  31  19  53  14  27   7  26  10
[2593]  14   7  24  39   7  11  13  23  18  31  22  46  36  34  80  41  40   6
[2611]  22  21   1   8   1  11   1  22   9  60  18  30  96  22  12  45  13  13
[2629]  21  28  16  28  22  15   1  13  18  17  25  25  15  12  43  34  35  29
[2647]  59  43  24  21  45  11  28  37  62  29   2   3  16  18  33   6  26   4
[2665]   9  75  19  11  17  24  21   8   8  33  23   5  26  35  23  27  10  20
[2683]  19  51   9  14   4  12  34  38  12   7  14   9  37  12  24  12  15   5
[2701]   5  30  23  20   5   7  48  65  19  24   1  31   1   4   4  11  31  38
[2719]   6   9  15  38  31   1  15  32  62  15   1  34   1  13  22  85  46  29
[2737]  41  13  14  42  29   9   6   6  10   7  10   1   5  25  11   6  18  45
[2755]   5  10   8   9  13  38  26  23   3   5   7   3  10   4   9  12  32  25
[2773]  50  22   7  13   9   4  16   8   5   3   6   7   4  20   1  35  13  13
[2791]   3  15   5   3   5   3   8   4  15  19  20   1  14  14   4   6   2   6
[2809]   2   6   5   8   6   1  34  14  10  19  10  65  18  47  63  27  12  32
[2827]  45  17  16  13  25   4   8   7   8   7  10  26  27  25  42  14  28  29
[2845]  10   6  13   5  19   7  16   6  18  20  22   7  47  68  14   7  46  18
[2863]  15  34  68  35  56  61  37   2   3   2  19  10  13   5  11   5  14  53
[2881]  17  15  37  11  18  16  18  15  21  13  29  33  21  16   9   6  28   9
[2899]  31  22   8   6   6  11   4  17  46   4   8  28  33   2

syllable documentation built on May 30, 2017, 12:52 a.m.