Skip to content

Commit

Permalink
Internal assign_by_index() etc are now plain functions [#8]
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikBengtsson committed Oct 17, 2015
1 parent a2a1199 commit cbbedd6
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions R/listenv.R
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,7 @@ new_variable <- function(envir, value) {
} # new_variable()


assign_by_name <- function(...) UseMethod("assign_by_name")

assign_by_name.listenv <- function(x, name, value) {
assign_by_name <- function(x, name, value) {
## Argument 'name':
if (length(name) == 0L) {
stop("Cannot assign value. Zero-length name.", call.=FALSE)
Expand Down Expand Up @@ -376,9 +374,7 @@ assign_by_name.listenv <- function(x, name, value) {
} # assign_by_name()


assign_by_index <- function(...) UseMethod("assign_by_index")

assign_by_index.listenv <- function(x, i, value) {
assign_by_index <- function(x, i, value) {
## Argument 'i':
if (length(i) == 0L) {
stop("Cannot assign value. Zero-length index.", call.=FALSE)
Expand Down Expand Up @@ -417,9 +413,7 @@ assign_by_index.listenv <- function(x, i, value) {
} # assign_by_index()


remove_by_name <- function(...) UseMethod("remove_by_name")

remove_by_name.listenv <- function(x, name) {
remove_by_name <- function(x, name) {
## Argument 'name':
if (length(name) == 0L) {
stop("Cannot remove element. Zero-length name.", call.=FALSE)
Expand All @@ -446,9 +440,7 @@ remove_by_name.listenv <- function(x, name) {
} # remove_by_name()


remove_by_index <- function(...) UseMethod("remove_by_index")

remove_by_index.listenv <- function(x, i) {
remove_by_index <- function(x, i) {
## Argument 'i':
if (length(i) == 0L) {
stop("Cannot remove element. Zero-length index.", call.=FALSE)
Expand Down

0 comments on commit cbbedd6

Please sign in to comment.