[Rd] [Enhancement] New argument for dirname() -- dirname(path, depth = 1L)

Luke Smith |uked@n@m| @end|ng |rom @bcg|ob@|@net
Tue Mar 26 02:03:43 CET 2019


The new argument 'depth' would specify the depth to recurse up the file path.  As in:
> dirname("path/to/some/where", depth = 3L)[1] "path"
The new argument would take on the default value of 1L, since this is the current behavior of the function.

 Problems will arise when 'depth' is unusually large (i.e. dirname(path, depth = 1e5)).

During execution, a warning could be issued to the user indicating an unusually large value for 'depth'.

	[[alternative HTML version deleted]]



More information about the R-devel mailing list