Skip to content

Commit

Permalink
%>% aliases fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tbates committed Oct 6, 2013
1 parent bda8e61 commit bcc20a1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
3 changes: 1 addition & 2 deletions R/build_run_modify.r
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# https://r-forge.r-project.org/project/admin/?group_id=1745
# http://adv-r.had.co.nz/Philosophy.html
# https://github.com/hadley/devtools
# setwd("~/bin/umx"); devtools::document(); devtools::install();
# setwd("~/bin/umx"); devtools::document("~/bin/umx"); devtools::install("~/bin/umx");
# require(OpenMx); require(umx); ?umx
# setwd("~/bin/umx"); devtools::check()
# devtools::load_all()
# devtools::dev_help("umxX")
# show_news()

# =================================
# = Speed and Efficiency Helpers =
# =================================
Expand Down
12 changes: 6 additions & 6 deletions R/misc_and_utility.r
Original file line number Diff line number Diff line change
Expand Up @@ -737,14 +737,14 @@ grepSPSS_labels <- function(df, grepString, output="both", ignore.case=T, useNam
#'
#' A version of less-than which returns FALSE for NAs (rather than NA)
#'
#' \alias "\%<\%"
#' @aliases %%<%%
#'
#' @export
#' @seealso - \code{\link{umxGreaterThan}},
#' @seealso - \code{\link{umx_greater_than}},
#' @examples
#' c(1:3, NA, 5) = %<% 2

umxLessThan <- function(table, x){
umx_less_than <- function(table, x){
lessThan = table < x
lessThan[is.na(lessThan)] = FALSE
return(lessThan)
Expand All @@ -754,14 +754,14 @@ umxLessThan <- function(table, x){
#'
#' A version of greater-than that excludes NA as a match
#'
#' \alias "\%>\%"
#' @aliases %%>%%
#'
#' @export
#' @seealso - \code{\link{umxLessThan}},
#' @seealso - \code{\link{umx_less_than}},
#' @examples
#' c(1:3,NA,5) = %>% 2

umxGreaterThan <- function(table, x){
umx_greater_than <- function(table, x){
moreThan = table > x
moreThan[is.na(moreThan)] = FALSE
return(moreThan)
Expand Down
4 changes: 1 addition & 3 deletions man/umxGreaterThan.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
\name{umxGreaterThan}
\alias{\%\%>\%\%}
\alias{umxGreaterThan}
\title{umxGreaterThan}
\usage{
Expand All @@ -7,9 +8,6 @@
\description{
A version of greater-than that excludes NA as a match
}
\details{
\alias "\%>\%"
}
\examples{
c(1:3,NA,5) = \%>\% 2
}
Expand Down
4 changes: 1 addition & 3 deletions man/umxLessThan.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
\name{umxLessThan}
\alias{\%\%<\%\%}
\alias{umxLessThan}
\title{umxLessThan}
\usage{
Expand All @@ -8,9 +9,6 @@
A version of less-than which returns FALSE for NAs
(rather than NA)
}
\details{
\alias "\%<\%"
}
\examples{
c(1:3, NA, 5) = \%<\% 2
}
Expand Down

0 comments on commit bcc20a1

Please sign in to comment.