| gsource {Zelig} | R Documentation |
The gsource function allows you to read a space delimited table
as a data frame. Unlike scan, you may use gsource in a
sourceed file, and unlike read.table, you may use
gsource to include a small (or large) data set in a file that
also contains other commands.
gsource(var.names = NULL, variables)
var.names |
An optional vector of character strings representing
the column names. By default, var.names = NULL. |
variables |
A single character string representing the data. |
The output from gsource is a data frame, which you may save to
an object in your workspace.
Olivia Lau <olau@fas.harvard.edu>
read.table, scan
## Not run:
data <- gsource(variables = "
1 2 3 4 5
6 7 8 9 10
3 4 5 1 3
6 7 8 1 9 ")
data <- gsource(var.names = "Vote Age Party", variables = "
0 23 Democrat
0 27 Democrat
1 45 Republican
1 65 Democrat ")
## End(Not run)