| Version: | 0.1 |
| Suggests: | gmodels, Hmisc |
| Date: | 2007-07-09 |
| Author: | Jakson A. Aquino. Includes R source code written by Dirk Enzmann. |
| Maintainer: | Jakson Aquino |
| License: | GPL (version 2 or later). |
| URL: | http://jalvesaq.googlepages.com/descr.html |
Package source: descr_0.1-0.tar.gz
This package has some descriptive functions for R that might be useful for social scientists. To install it under Linux, do the following commands or something equivalent:
wget http://jalvesaq.googlepages.com/descr_0.1-0.tar.gz sudo R CMD INSTALL descr_0.1-0.tar.gz
| compmeans {descr} | R Documentation |
Calculates the means of a numerical vector according to a factor.
compmeans(x, y, weight = NULL, digits = 3, sort = FALSE, maxlevels = 100)
x |
A factor. |
y |
A numeric vector. |
weight |
An optional vector with weights. |
digits |
Precision of output. |
sort |
If TRUE, sorts the lines by the means values. |
maxlevels |
Maximum number of levels that x might have. |
A object of class table.
Jakson A. Aquino
| crosstabs {descr} | R Documentation |
Outputs a cross table for two factors.
crosstabs(x, y, weight = NULL, digits = 3, max.width = 5, expected=FALSE,
prop.r=FALSE, prop.c=FALSE, prop.t=FALSE, prop.chisq=FALSE, chisq = FALSE,
fisher=FALSE, mcnemar=FALSE, resid=FALSE, sresid=FALSE, asresid=FALSE,
missing.include=FALSE, format=c("SPSS", "SAS"), dnn = NULL)
x, y |
Vectors in a matrix or a dataframe. |
weight |
An optional vector for a weighted cross tabulation. |
crosstabs invokes the CrossTable function in the
gmodels package with all boolean options set to FALSE and
"SPSS" as the default format option.
Jakson A. Aquino
CrossTable
| descr {descr} | R Documentation |
Wrapper for the function summary of base package, including
information about variable label. The function prints the label
attribute of the object and, then, invokes summary(object). If the object
is a data frame, the functions prints the label and invokes
summary for each variable in the data frame.
descr(x)
x |
The object to be described. |
Null.
Jakson Aquino
summary
| freq {descr} | R Documentation |
Prints a frequency table of the selected object. Optionally, the frequency might be weighted.
freq(x, weight)
x |
The factor from which the frequency of values is desired. |
weight |
An optional vector for a weighted frequency table. |
An object of class table.
Dirk Enzmann; weight parameter added by Jakson A. Aquino.
| fromUTF8 {descr} | R Documentation |
Converts the encoding of some attributes of an object from UTF-8 into other encoding.
fromUTF8(x, to = "WINDOWS-1252")
x |
A R object, usually a variable of a data frame or a data frame. |
to |
A string indicating the desired encoding. Common values are
"LATIN1" and "WINDOWS-1252". Type iconvlist() for the
complete list of available encodings. |
The function converts the attribute label of x from UTF-8 into the
specified encoding. If x is a factor, the levels are converted as well.
If x is a data.frame, the function makes the conversions in all of its
variables.
The object with its label and levels converted.
Jakson A. Aquino
iconv, label
| hist.kdnc {descr} | R Documentation |
Plots a histogram with kernel density and normal curve.
hist.kdnc(v, breaks = 0, include.lowest = T, right = T, xlab = deparse(substitute(v)))
v |
The object from which the histogram is desired. |
breaks |
See hist. |
include.lowest |
See hist. |
right |
See hist. |
xlab |
See hist. |
The function plots a histogram of the object x with its kernel density and
a normal curve with the same mean and standard deviation of x.
NULL.
Dirk Enzmann
| Latex {descr} | R Documentation |
Reads a R object and tries to output a LaTeX table from it.
Latex(x, caption = NULL, label = NULL, longtable = FALSE)
x |
A object of class table or that might be converted into table. |
caption |
A string representing the LaTeX table caption. |
label |
A string representing the LaTeX table label. |
longtable |
If TRUE, use \longtable instead of
\table in the LaTeX code. |
NULL.
Jakson A. Aquino
| LogRegR2 {descr} | R Documentation |
The function calculates multiple Rē analogues (pseudo Rē) of logistic regression.
LogRegR2(model)
model |
A logistic regression model. |
The function calculates McFaddens Rē, Cox & Snell Index, and Nagelkerke Index of a logistic regression model.
A object of class list with the calculated indexes.
Dirk Enzmann
# Suppose that "happy" is a factor and "income" is a numeric vector in a data frame: ## Not run: m <- glm(happy ~ income, family=binomial(link="logit")) LogRegR2(m) ## End(Not run)
| toUTF8 {descr} | R Documentation |
Converts the encoding of some attributes of an object to UTF-8
toUTF8(x, from = "WINDOWS-1252")
x |
A R object, usually a variable of a data frame or a data frame. |
from |
A string indicating the original encoding. Common values are
"LATIN1" and "WINDOWS-1252". Type iconvlist() for the
complete list of available encodings. |
The function converts the attribute label of x from the specified
encoding into UTF-8. If x is a factor, the levels are converted as well.
If x is a data.frame, the function makes the conversions in all of its
variables.
The object with its label and levels converted.
Jakson A. Aquino
iconv, label