Skip to content

Commit

Permalink
Merge pull request #135 from billdenney/allow-assign
Browse files Browse the repository at this point in the history
Allow assignment into xpose_data class without conversion to uneval
  • Loading branch information
Benjamin authored Jan 19, 2019
2 parents 5f23dd0 + 0934667 commit 4bf7ff9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/xpose_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,10 @@ xpose_data <- function(runno = NULL,
structure(class = c('xpose_data', 'uneval'))
}


#' Allow assignment into xpose_data without conversion to class uneval
`[[<-.xpose_data` <- function(x, i, value) {
x <- unclass(x)
x[[i]] <- value
as.xpdb(x)
}
`$<-.xpose_data` <- `[[<-.xpose_data`

0 comments on commit 4bf7ff9

Please sign in to comment.