Learn R Programming

NMF (version 0.5.06)

advanced: Advanced usage of package NMF

Description

The functions documented here provide advanced functionalities useful when developing within the framework implemented in the NMF package.

Usage

isNMFfit(object, recursive=TRUE)

Arguments

object
any R object.
recursive
if TRUE and object is a list then the check is performed on each element of the list. Note that the recursivity only applies in the case of lists that are not themselves NMFfit objects, unlike NMFfitXn objects

Value

  • For isNMFfit, a logical vector (or a list if object is a list of list) of the same length as object.

Details

[object Object]

See Also

NMFfit, NMFfitX

Examples

Run this code
# generate a random 50 x 10 matrix
	V <- rmatrix(50, 10)
	
	# single run
	res <- nmf(V, 3)
	isNMFfit(res)
	
	# multiple runs - keeping single fit
	resm <- nmf(V, 3, nrun=3)
	isNMFfit(resm)
	
	# multiple runs - keeping all fits
	resM <- nmf(V, 3, nrun=3, .opt='k') 
	isNMFfit(resM)
	
	# with a list of results
	isNMFfit(list(res, resm, resM, 'not a result'))
	isNMFfit(list(res, list(resm, resM), 'not a result')) # list of list
	isNMFfit(list(res, resm, resM, 'not a result'), recursive=FALSE)

Run the code above in your browser using DataLab