Insert/remove function names in/from the NAMESPACE file {Rfast}R Documentation

Insert/remove function names in/from the NAMESPACE file

Description

Insert/remove function names in/from the NAMESPACE file.

Usage

AddToNamespace(path.namespace,path.rfolder)
RemoveFromNamespace(path.namespace,files.to.remove)

Arguments

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.

Details

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.

Value

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.

Author(s)

R implementation and documentation: Manos Papadakis <papadakm95@gmail.com>.

See Also

colShuffle, colVars, colmeans, read.directory

Examples

## 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)

[Package Rfast version 2.1.0 Index]