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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Luke Smith
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]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel