Skip to content

Commit

Permalink
updated docuemntation after spell check for push to CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
trinker committed Aug 1, 2014
1 parent 032b12f commit cfb146e
Show file tree
Hide file tree
Showing 36 changed files with 99 additions and 71 deletions.
6 changes: 3 additions & 3 deletions R/Network.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ function(x, ...){
#' @importFrom qdapTools lookup
#' @note The output from \code{Network} is an \pkg{igraph} object and can be
#' altered and plotted directly using \pkg{igraph}. The \pkg{qdap} \code{print}
#' method is offered as a quick approach to styling the figure. For mor control
#' method is offered as a quick approach to styling the figure. For more control
#' use \code{\link[igraph]{V}}, \code{\link[igraph]{E}}, and
#' \code{plot.igrapgh}.
#' \code{plot.igraph}.
#' @method print Network
#' @export
print.Network <- function(x, title = NA, title.color = "black",
Expand Down Expand Up @@ -118,7 +118,7 @@ plot.Network <- function(x, ...){
#'
#' This operator allows you to add themes to a Network object.
#'
#' @param Network.obj A object of class \code{Network}.
#' @param Network.obj An object of class \code{Network}.
#' @param x A component to add to \code{Network.obj}
#' @export
#' @rdname addNetwork
Expand Down
6 changes: 3 additions & 3 deletions R/as.tdm.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
#' speech <- stemmer(dat$dialogue)
#' mytable1 <- with(dat, as.tdm(speech, list(person, time), stopwords = Top25Words))
#'
#' fit <- ca(as.matrix(ytable1))
#' fit <- ca(as.matrix(mytable1))
#' summary(fit)
#' plot(fit)
#' plot3d.ca(fit, labels=1)
Expand Down Expand Up @@ -520,9 +520,9 @@ wfm2xtab <- function(text.var, grouping.var = NULL, ...) {
#' @param sent.split logical. If \code{TRUE} the text variable sentences will
#' be split into individual rows.
#' @param row.names \code{NULL} or a character vector giving the row names for
#' the data frame. Not used in \pkg{qdap}; for base genric consistency.
#' the data frame. Not used in \pkg{qdap}; for base generic consistency.
#' @param optional logical. If \code{TRUE}, setting row names and converting
#' column names is optional. Not used in \pkg{qdap}; for base genric consistency.
#' column names is optional. Not used in \pkg{qdap}; for base generic consistency.
#' @return \code{as.data.frame} - Converts a \code{\link[tm]{Corpus}} and returns
#' a \pkg{qdap} oriented \code{\link[base]{data.frame}}.
#' @rdname as.tdm
Expand Down
12 changes: 6 additions & 6 deletions R/check_spelling.R
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ check_spelling <- function(text.var, range = 2,
#' @param suggest logical. If \code{TRUE} returns a
#' \code{\link[base]{data.frame}} with possible suggestions for misspelled words
#' (words not found in the dictionary).
#' @param nchar.dictionary A vector that correponds in length and content to
#' @param nchar.dictionary A vector that corresponds in length and content to
#' \code{dictionary} with elements that are the precalculated number of
#' characters for each word in the dictionary.
#' @param first.char.dictionary A vector that corresponds in length ans content
#' @param first.char.dictionary A vector that corresponds in length and content
#' to \code{dictionary} with elements that are the pre-allotted first characters
#' of each word in the dictionary.
#' @return \code{which_misspelled} - Returns either a named vector (names are
Expand Down Expand Up @@ -272,7 +272,7 @@ print.which_misspelled <- function(x, ...){
#' \code{check_spelling_interactive} - Interactively check spelling.
#'
#' @param click logical. If \code{TRUE} the interface is a point and click GUI.
#' If \code{FALSE} the interace is command line driven.
#' If \code{FALSE} the interface is command line driven.
#' @note \code{check_spelling_interactive} - The user may go back (undo) by
#' pressing \code{"TYPE MY OWN"} entering either \code{"!"} (not) or \code{"0"}
#' (similar to a phone system). The second choice in the
Expand Down Expand Up @@ -358,7 +358,7 @@ correct <- function(x, ...){
#' first letter of the misspelled word is correct. This reduces the dictionary
#' size, thus speeding up computation.
#' @param click logical. If \code{TRUE} the interface is a point and click GUI.
#' If \code{FALSE} the interace is command line driven.
#' If \code{FALSE} the interface is command line driven.
#' @param method Method for distance calculation. The default is "jaccard". It
#' is assumed that smaller measures indicate closer distance. Measures that do
#' not adhere to this assumption will result in incorrect output (see
Expand Down Expand Up @@ -427,7 +427,7 @@ check_spelling_interactive.character <- function(text.var, range = 2,
#' first letter of the misspelled word is correct. This reduces the dictionary
#' size, thus speeding up computation.
#' @param click logical. If \code{TRUE} the interface is a point and click GUI.
#' If \code{FALSE} the interace is command line driven.
#' If \code{FALSE} the interface is command line driven.
#' @param method Method for distance calculation. The default is "jaccard". It
#' is assumed that smaller measures indicate closer distance. Measures that do
#' not adhere to this assumption will result in incorrect output (see
Expand Down Expand Up @@ -494,7 +494,7 @@ check_spelling_interactive.factor <- function(text.var, range = 2,
#' first letter of the misspelled word is correct. This reduces the dictionary
#' size, thus speeding up computation.
#' @param click logical. If \code{TRUE} the interface is a point and click GUI.
#' If \code{FALSE} the interace is command line driven.
#' If \code{FALSE} the interface is command line driven.
#' @param method Method for distance calculation. The default is "jaccard". It
#' is assumed that smaller measures indicate closer distance. Measures that do
#' not adhere to this assumption will result in incorrect output (see
Expand Down
8 changes: 4 additions & 4 deletions R/discourse_map.R
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,9 @@ plot.discourse_map <- function(x, ...){

}

#' Plots a animated_discourse_map Object
#' Plots an animated_discourse_map Object
#'
#' Plots a animated_discourse_map object.
#' Plots an animated_discourse_map object.
#'
#' @param x The animated_discourse_map object.
#' @param \ldots Other arguments passed to \code{print.animated_discourse_map }.
Expand Down Expand Up @@ -398,9 +398,9 @@ animated_discourse_map <- function(DF, edge.constant, sep = "_",
igraph_objs
}

#' Prints a animated_discourse_map Object
#' Prints an animated_discourse_map Object
#'
#' Prints a animated_discourse_map object.
#' Prints an animated_discourse_map object.
#'
#' @param x The animated_discourse_map object.
#' @param title The title of the plot.
Expand Down
2 changes: 1 addition & 1 deletion R/dispersion_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' @param match.terms A vector of quoted terms or a named list of quoted terms.
#' If the latter terms will be combined into a single unified theme named
#' according to the list names. Note that terms within the vectors of the list
#' cannot be dulicated.
#' cannot be duplicated.
#' @param grouping.var The grouping variables. Default \code{NULL} generates
#' one word list for all text. Also takes a single grouping variable or a list
#' of 1 or more grouping variables.
Expand Down
2 changes: 1 addition & 1 deletion R/dissimilarity.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#' plot(fit)
#' pvrect(fit, alpha=.95)
#'
#' ## Mutidimentional Scaling
#' ## Multidimentional Scaling
#' ## Based on blog post from Bodong Chen
#' ## http://bodongchen.com/blog/?p=301
#'
Expand Down
25 changes: 19 additions & 6 deletions R/end_mark.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @param missing.end.mark A value to use for sentences with missing endmarks.
#' @param missing.text A value to use for sentences with missing (\code{NA})
#' text.
#' @param other.endmarks Other 1-2 character endmarks tos earch for.
#' @param other.endmarks Other 1-2 character endmarks to search for.
#' @param grouping.var The grouping variables. Default \code{NULL} generates
#' one word list for all text. Also takes a single grouping variable or a list
#' of 1 or more grouping variables.
Expand Down Expand Up @@ -79,9 +79,7 @@
#' sentraj <- lapply(with(rajSPLIT, split(dialogue, act)), function(x) {
#' end_mark(x)
#' })
#'
#'
#'
#'
#' sentplots2 <- lapply(seq_along(sentraj), function(i) {
#' m <- plot(cumulative(sentraj[[i]]))
#' if (i != 2) m <- m + ylab("")
Expand All @@ -90,7 +88,22 @@
#' m + ggtitle(paste("Act", act[i]))
#' })
#'
#' do.call(grid.arrange, sentplots2)
#' ## ggplot2 function to extract legend
#' g_legend <- function(a.gplot){
#' tmp <- ggplot_gtable(ggplot_build(a.gplot))
#' leg <- which(sapply(tmp[["grobs"]], function(x) x[["name"]]) == "guide-box")
#' legend <- tmp[["grobs"]][[leg]]
#' legend
#' }
#'
#' ## remove legends from plots
#' sentplots3 <- lapply(sentplots2, function(x){
#' x + theme(legend.position="none") + xlab(NULL) + ylab(NULL)
#' })
#'
#' sentplots3[[6]] <- g_legend(sentplots2[[1]])
#'
#' do.call(grid.arrange, sentplots3)
#' }
end_mark <- function(text.var, missing.end.mark = "_", missing.text = NA,
other.endmarks = NULL) {
Expand Down Expand Up @@ -129,7 +142,7 @@ function(x, ...) {
#' Sentence End Marks
#'
#'
#' \code{end_mark_by} - Grab the sentence end marks for a transcriptby grouping
#' \code{end_mark_by} - Grab the sentence end marks for a transcript by grouping
#' variable(s).
#'
#' @rdname end_mark
Expand Down
2 changes: 1 addition & 1 deletion R/formality.R
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ plot.animated_formality <- function(x, ...){
#' @param contextual The color to use for 0\% formality (purely contextual).
#' @param formal The color to use for 100\% formality (purely formal).
#' @param edge.constant A constant to multiple edge width by.
#' @param title The title to apply to the Networkd image(s).
#' @param title The title to apply to the \code{Network}ed image(s).
#' @param digits The number of digits to use in the current turn of talk
#' formality.
#' @param plus.300.color The bar color to use for grouping variables exceeding
Expand Down
2 changes: 1 addition & 1 deletion R/gantt.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
#' Animate(plot(ani_gannt))
#'
#' library(animation)
#' loc <- folder(animation_gantt)
#' loc <- reports::folder(animation_gantt)
#'
#' ## Set up the plotting function
#' oopt <- animation::ani.options(interval = 0.1)
Expand Down
2 changes: 1 addition & 1 deletion R/gantt_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
#' ani_gantt <- with(mraja1, gantt_plot(dialogue, person))
#'
#' library(animation)
#' loc <- folder(animation_gantt)
#' loc <- reports::folder(animation_gantt)
#'
#' ## Set up the plotting function
#' oopt <- animation::ani.options(interval = 0.1)
Expand Down
2 changes: 1 addition & 1 deletion R/igraph_params.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Apply Parameter to List of Igraph Vertices/Edges
#'
#' \code{vertex_apply} - Uniformly apply \pkg{igrph} vertex plotting parameters to a list of \pkg{igraph} objects.
#' \code{vertex_apply} - Uniformly apply \pkg{igraph} vertex plotting parameters to a list of \pkg{igraph} objects.
#'
#' @param x A list of \pkg{igraph} objects.
#' @param \ldots Arguments passed \pkg{igraph}'s \code{\link[igraph]{V}} and \code{\link[igraph]{E}}.
Expand Down
2 changes: 1 addition & 1 deletion R/multigsub.R
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ mgsub <- multigsub
#' \item{unhold}{A function used to revert back to the original values}
#' @rdname multigsub
#' @note The \code{unhold} function for \code{sub_holder} will only work on keys
#' that have not been disturbed by subsequen alterations. The key follows the
#' that have not been disturbed by subsequent alterations. The key follows the
#' pattern of `qdapplaceholder` followed by lower case letter keys followed by
#' `qdap`.
#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/name2sex.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' @param USE.NAMES logical. If \code{TRUE} names.list is used to name the
#' gender vector.
#' @param database A database of names (mostly for internal purposes).
#' @param \ldots Other aguments passed to \code{\link[qdap]{check_spelling}}.
#' @param \ldots Other arguments passed to \code{\link[qdap]{check_spelling}}.
#' @return Returns a vector of predicted gender (M/F) based on first name.
#' @author Dason Kurkiewicz and Tyler Rinker <tyler.rinker@@gmail.com>.
#' @keywords name gender
Expand Down
11 changes: 6 additions & 5 deletions R/polarity.R
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
#'
#' saveHTML(FUN(), autoplay = FALSE, loop = TRUE, verbose = FALSE,
#' ani.height = 1000, ani.width=650,
#' outdir = loc2, single.opts =
#' outdir = loc, single.opts =
#' "'controls': ['first', 'play', 'loop', 'speed'], 'delayMin': 0")
#'
#' #=====================#
Expand All @@ -207,6 +207,7 @@
#' library(reports)
#' library(igraph)
#' library(plotrix)
#' library(gridExtra)
#'
#' deb2dat <- subset(pres_debates2012, time=="time 2")
#' deb2dat[, "person"] <- factor(deb2dat[, "person"])
Expand Down Expand Up @@ -311,7 +312,7 @@
#' deb2_line <- plot(cumulative(deb2_bar))
#'
#' ## Generate a folder
#' loc2 <- folder(animation_polarity2)
#' loc2b <- folder(animation_polarity2)
#'
#' ## Set up the plotting function
#' oopt <- animation::ani.options(interval = 0.1)
Expand All @@ -325,7 +326,7 @@
#'
#' lapply(theseq, function(i) {
#' if (follow) {
#' png(file=sprintf("%s/images/Rplot%s.png", loc2, i),
#' png(file=sprintf("%s/images/Rplot%s.png", loc2b, i),
#' width=650, height=725)
#' }
#' ## Set up the layout
Expand Down Expand Up @@ -368,7 +369,7 @@
#'
#' saveHTML(FUN2(), autoplay = FALSE, loop = TRUE, verbose = FALSE,
#' ani.height = 1000, ani.width=650,
#' outdir = loc2, single.opts =
#' outdir = loc2b, single.opts =
#' "'controls': ['first', 'play', 'loop', 'speed'], 'delayMin': 0")
#'
#' FUN2(TRUE)
Expand Down Expand Up @@ -1630,7 +1631,7 @@ constrain <- function(x) ((1 - (1/(1 + exp(x)))) * 2) - 1
#' @param positive The color to use for positive polarity.
#' @param neutral The color to use for neutral polarity.
#' @param edge.constant A constant to multiple edge width by.
#' @param title The title to apply to the Networkd image(s).
#' @param title The title to apply to the Networked image(s).
#' @param digits The number of digits to use in the current turn of talk
#' polarity.
#' @param \ldots Other arguments passed to \code{\link[qdap]{discourse_map}}.
Expand Down
2 changes: 1 addition & 1 deletion R/sentSplit.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#' sentence.
#'
#' @section Suggestion: It is recommended that the user runs \code{\link[qdap]{check_text}} on the
#' output of \code{sentSplit}'s text coloumn.
#' output of \code{sentSplit}'s text column.
#' @rdname sentSplit
#' @author Dason Kurkiewicz and Tyler Rinker <tyler.rinker@@gmail.com>.
#' @seealso
Expand Down
2 changes: 1 addition & 1 deletion man/Dissimilarity.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fit <- suppressMessages(pvclust(wfm.mod, method.hclust="ward",
plot(fit)
pvrect(fit, alpha=.95)

## Mutidimentional Scaling
## Multidimentional Scaling
## Based on blog post from Bodong Chen
## http://bodongchen.com/blog/?p=301

Expand Down
2 changes: 1 addition & 1 deletion man/Network.formality.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

\item{edge.constant}{A constant to multiple edge width by.}

\item{title}{The title to apply to the Networkd image(s).}
\item{title}{The title to apply to the \code{Network}ed image(s).}

\item{digits}{The number of digits to use in the current turn of talk
formality.}
Expand Down
2 changes: 1 addition & 1 deletion man/Network.polarity.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

\item{edge.constant}{A constant to multiple edge width by.}

\item{title}{The title to apply to the Networkd image(s).}
\item{title}{The title to apply to the Networked image(s).}

\item{digits}{The number of digits to use in the current turn of talk
polarity.}
Expand Down
2 changes: 1 addition & 1 deletion man/addNetwork.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
\method{+}{Network}(Network.obj, x)
}
\arguments{
\item{Network.obj}{A object of class \code{Network}.}
\item{Network.obj}{An object of class \code{Network}.}

\item{x}{A component to add to \code{Network.obj}}
}
Expand Down
6 changes: 3 additions & 3 deletions man/as.tdm.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ Other arguments passed to \code{\link[qdap]{sentSplit}}. If
be split into individual rows.}

\item{row.names}{\code{NULL} or a character vector giving the row names for
the data frame. Not used in \pkg{qdap}; for base genric consistency.}
the data frame. Not used in \pkg{qdap}; for base generic consistency.}

\item{optional}{logical. If \code{TRUE}, setting row names and converting
column names is optional. Not used in \pkg{qdap}; for base genric consistency.}
column names is optional. Not used in \pkg{qdap}; for base generic consistency.}

\item{demographic.vars}{Additional demographic information about the grouping
variables. This is a data.frame, list of equal length vectors, or a single
Expand Down Expand Up @@ -281,7 +281,7 @@ dat <- dat[dat$person \%in\% qcv(ROMNEY, OBAMA), ]
speech <- stemmer(dat$dialogue)
mytable1 <- with(dat, as.tdm(speech, list(person, time), stopwords = Top25Words))

fit <- ca(as.matrix(ytable1))
fit <- ca(as.matrix(mytable1))
summary(fit)
plot(fit)
plot3d.ca(fit, labels=1)
Expand Down
6 changes: 3 additions & 3 deletions man/check_spelling.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@ An object from \code{check_spelling_interactive}.}
\code{\link[base]{data.frame}} with possible suggestions for misspelled words
(words not found in the dictionary).}

\item{nchar.dictionary}{A vector that correponds in length and content to
\item{nchar.dictionary}{A vector that corresponds in length and content to
\code{dictionary} with elements that are the precalculated number of
characters for each word in the dictionary.}

\item{first.char.dictionary}{A vector that corresponds in length ans content
\item{first.char.dictionary}{A vector that corresponds in length and content
to \code{dictionary} with elements that are the pre-allotted first characters
of each word in the dictionary.}

\item{click}{logical. If \code{TRUE} the interface is a point and click GUI.
If \code{FALSE} the interace is command line driven.}
If \code{FALSE} the interface is command line driven.}

\item{\ldots}{ignored}
}
Expand Down
2 changes: 1 addition & 1 deletion man/check_spelling_interactive.character.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ first letter of the misspelled word is correct. This reduces the dictionary
size, thus speeding up computation.}

\item{click}{logical. If \code{TRUE} the interface is a point and click GUI.
If \code{FALSE} the interace is command line driven.}
If \code{FALSE} the interface is command line driven.}

\item{method}{Method for distance calculation. The default is "jaccard". It
is assumed that smaller measures indicate closer distance. Measures that do
Expand Down
2 changes: 1 addition & 1 deletion man/check_spelling_interactive.check_spelling.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ first letter of the misspelled word is correct. This reduces the dictionary
size, thus speeding up computation.}

\item{click}{logical. If \code{TRUE} the interface is a point and click GUI.
If \code{FALSE} the interace is command line driven.}
If \code{FALSE} the interface is command line driven.}

\item{method}{Method for distance calculation. The default is "jaccard". It
is assumed that smaller measures indicate closer distance. Measures that do
Expand Down
Loading

0 comments on commit cfb146e

Please sign in to comment.