Learn R Programming

zipfR (version 0.6-5)

read.vgc: Loading and Saving Vocabulary Growth Curves (zipfR)

Description

read.vgc loads vocabulary growth data from .vgc file

write.vgc saves vocabulary growth data in .vgc file

Usage

read.vgc(file)

write.vgc(vgc, file)

Arguments

file
character string specifying the pathname of a disk file. See section "Format" for a description of the required file format
vgc
a vocabulary growth curve, i.e. an object of class vgc

Value

  • read.vgc returns an object of class vgc (see the vgc manpage for details)

See Also

See the vgc manpage for details on vgc objects. See read.tfl and read.spc for import/export of other data structures.

Examples

Run this code
## examples will not be run during package compilation
## since they would require accessing and writing to
## external files

## load Italian ultra- prefix vgc
## and write to external text file
data(ItaUltra.emp.vgc)
write.vgc(ItaUltra.emp.vgc,"ultra.vgc")
## now ultra.vgc is a text file with columns N, V and V1

## we ready it back in
New.vgc <- read.vgc("ultra.vgc")

## same vgc as ItaUltra.emp.vgc, compare:
summary(New.vgc)
summary(ItaUltra.emp.vgc)
head(New.vgc)
head(ItaUltra.emp.vgc)

Run the code above in your browser using DataLab