Created
December 6, 2013 00:01
-
-
Save robertzk/7816384 to your computer and use it in GitHub Desktop.
R exercise: http://adv-r.had.co.nz/Functions.html
Create a list of all the replacement functions found in the base package. Which ones are primitive functions?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x <- ls("package:base") | |
x[substring(x, nchar(x)-1, nchar(x)) == '<-'] | |
# "[[<-" "[<-" "@<-" "<-" "<<-" "$<-" "attr<-" "attributes<-" "body<-" "class<-" "colnames<-" "comment<-" "diag<-" "dim<-" | |
# "dimnames<-" "Encoding<-" "environment<-" "formals<-" "is.na<-" "length<-" "levels<-" "mode<-" "mostattributes<-" "names<-" "oldClass<-" "parent.env<-" "regmatches<-" "row.names<-" | |
# "rownames<-" "split<-" "storage.mode<-" "substr<-" "substring<-" "units<-" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment