Description Usage Arguments Details Value Author(s) See Also Examples
Helper function to interactively set new values for row- and/or column-names in an acs object.
1 2 3 |
object |
an acs object |
filename |
not used; provided for S3 generic/method consistency |
name |
not used; provided for S3 generic/method consistency |
what |
which acs-class metadata slot to prompt for; either "acs.colnames" (the default), "acs.units", or "geography" |
geocols |
a vector, or "all", specifying which columns from the
geography metadata to prompt for (optional; defaults to "all"; ignored
when |
... |
not used; provided for S3 generic/method consistency |
The acs package provides this S3 prompt method for
acs-class objects, primarily as a "helper" function to use in calls to
geography(object)<-, acs.units(object)<-, or
acs.colnames(object)<-. prompt provides an interactive
interface, prompting the user for new metadata values based on
the existing ones.
When what="geography" and geocols is not "all",
prompt will only prompt for replacements of the values of
geocols, but will still return values for all geography columns,
suitable for passing to geography(object)<-.
Anytime during the interactive prompt() session, a user may enter a
blank line to terminate, returning only the changed values
up to that point (along with the unchanged values for remaining entries.)
Returns a value of the same class and dimensions as the current
geography, acs.units, or acs.colnames of object, but with new names,
suitable for passing to one of the replacement methods
(acs.colnames<-, (acs.units<-, or geography<-).
Ezra Haber Glenn eglenn@mit.edu
1 2 3 4 5 | data(kansas07)
acs.colnames(kansas07)=prompt(kansas07, what="acs.colnames")
geography(kansas07)=prompt.acs(kansas07, what="geography")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.