View source: R/system_and_package.R
Insert/remove function names in/from the NAMESPACE file | R Documentation |
Insert/remove function names in/from the NAMESPACE file.
AddToNamespace(path.namespace,path.rfolder)
RemoveFromNamespace(path.namespace,files.to.remove)
path.namespace |
An full path to the NAMESPACE file. |
path.rfolder |
An full path to the directory the new files to be added are stored. |
files.to.remove |
An character with the names of the functions to be removed from file NAMESPACE. |
AddToNameSpace: Reads the files that are exported in NAMESPACE and the functions that are inside rfolder (where R files are) and insert every function that is not exported. For that you must add the attribute "#[export]" above every function you wish to export. Also you can use the attribute "#[export s3]" for exporting S3methods. Finally, if you don't want the program to read a file just add at the top of the file the attribute "#[dont read]".
RemoveFromNamespace: Remove every function, from argument "files.to.remove", from NAMESPACE.
AddToNameSpace:
without export |
A character vector with the names of the R functions that don't have te "#[export]" attribute. |
hidden functions |
A character vector with the names of the R functions that are hidden. |
RemoveFromNamespace: Return the files that could not be removed.
R implementation and documentation: Manos Papadakis <papadakm95@gmail.com>.
colShuffle, colVars, colmeans, read.directory
## Not run:
#for example: path.namespace="C:\some_file\NAMESPACE" where is NAMESPACE file
#path.rfolder="C:\some_file\R\" where is R files are
#system.time( a<-AddToNamespace(path.namespace,path.rfolder) )
#if(length(a)==0){
# print("all the files are inserted")
#}else{
# print("The new files that inserted are: \n")
# a
#}
#system.time( a<-RemoveFromNamespace(path.namespace,c("a","b")) )
#if(length(a)==0){
# print("all the files are inserted")
#}else{
# print("The files thatcould not be deleted are: \n")
# a
#}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.