Corpus Linguistics and Statistics with R by Guillaume Desagulier

Corpus Linguistics and Statistics with R by Guillaume Desagulier

Author:Guillaume Desagulier
Language: eng
Format: epub
Publisher: Springer International Publishing, Cham


As you can see, nominal data converted easily into frequency counts . Thanks to the count() function from the plyr package, you can turn a whole table of nominal data into a frequency table in just one line of code. The variables to be summarized should be combined with c() in the vars argument of the count() function.

> library(plyr)

> freq.table <- count(data, vars = c("construction", "intensifier", "text_mode", "text_type"))

> freq.table

construction intensifier text_mode text_type freq

1 PREADJECTIVAL QUITE SPOKEN CONVRSN 2

2 PREADJECTIVAL QUITE WRITTEN ACPROSE 3

3 PREADJECTIVAL QUITE WRITTEN FICTION 4

4 PREADJECTIVAL QUITE WRITTEN NEWS 2

5 PREADJECTIVAL RATHER WRITTEN ACPROSE 21

6 PREADJECTIVAL RATHER WRITTEN FICTION 21

7 PREADJECTIVAL RATHER WRITTEN NEWS 6

8 PREDETERMINER QUITE SPOKEN CONVRSN 52

9 PREDETERMINER QUITE WRITTEN ACPROSE 5

10 PREDETERMINER QUITE WRITTEN FICTION 17

11 PREDETERMINER QUITE WRITTEN NEWS 18

12 PREDETERMINER RATHER SPOKEN CONVRSN 3

13 PREDETERMINER RATHER WRITTEN ACPROSE 2

14 PREDETERMINER RATHER WRITTEN FICTION 5

15 PREDETERMINER RATHER WRITTEN NEWS 2



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.