Skip to content

Commit

Permalink
deleted doc of self_link() hence becomes hidden for NAMESPACE
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Aug 31, 2011
1 parent f45cebe commit 3aa7c76
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 61 deletions.
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export(remove_link)
export(save_brush_history)
export("selected<-")
export(selected)
export(self_link)
export(set_cursor)
export(setMapColorByLabel)
export("size_label<-")
Expand Down
20 changes: 0 additions & 20 deletions R/link.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,26 +83,6 @@ remove_link = function(..., id) {
}
}

##' Update a mutaframe by the linking on itself through a categorical
##' variable
##'
##' If the linking type is \code{self} on a mutaframe, and the linking
##' variable has been specified, this function will brush all the rows
##' which are in the same category or categories of the current
##' brushed elements.
##' @param data a mutaframe created by \code{\link{qdata}}
##' @return the \code{.brushed} column in the mutaframe is updated
##' @author Yihui Xie <\url{http://yihui.name}>
##' @seealso \code{\link{link_var}}, \code{\link{link_type}}
##' @export
##' @examples mf = qdata(iris)
##' selected(mf)[1] = TRUE # brush the 1st row
##' selected(mf)
##'
##' link_var(mf) = 'Species'
##' link_type(mf) = 'self'
##' self_link(mf) # all the first 50 rows are brushed
##' selected(mf)
self_link = function(data) {
if ((!('self' %in% link_type(data))) || is.null(v <- link_var(data))) return()
selected(data) = data[, v] %in% unique(data[selected(data), v])
Expand Down
7 changes: 2 additions & 5 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,7 @@ match_key = function(key, event) {
##'
##' @section Mouse Events: Left click to brush the plot with a
##' rectangle brush, and right click to resize the brush (the cursor
##' shape will become a cross). If the linking variable has been set
##' and the linking type is \code{'self'}, the data will be
##' self-linked in the mouse move event (see
##' \code{\link{self_link}}). When the mouse is released, the brush
##' shape will become a cross). When the mouse is released, the brush
##' history will be saved (\code{\link{save_brush_history}}).
##'
##' @section Key Events: The keys A, O, X, N and C corresponds to the
Expand Down Expand Up @@ -325,7 +322,7 @@ common_mouse_press = function(layer, event, data, meta) {
##' @rdname common_events
##' @export
common_mouse_move = function(layer, event, data, meta) {
self_link(data)

}
##' @rdname common_events
##' @export
Expand Down
35 changes: 0 additions & 35 deletions man/self_link.Rd

This file was deleted.

0 comments on commit 3aa7c76

Please sign in to comment.