Lets say for now considering base
package. How can I search all types of operators within the function list of a package
To see the list of functions in base
package, we can do
ls("package:base")
So the above list would also have operators like Arithmetic operators, Logical operators, Infix operators, Binary operators etc.
So Basically how can I search the operators from the list using grep()
or any other alternative function?
Example, for base package searching functions with =
sign in it..
grep("\\=",ls("package:base"),value=T)
# [1] "!=" "<=" "=" "==" ">="
But it would be good if we get all types of operators at once.
How to get list of all types of operators present in R, so that we grep
over that list of operators.
Any help is highly appreciated.