Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upopen pattern parameter of list.files for readLAScatalog or add more detailed documentation #368
Comments
|
|
|
Thank you for the quick fix! |
Dear lidR developers,
I was using the
readLAScatalogfunction to read in a bunch of LAZ files. Because my directory contained two sets of files, one ending in "CIR.laz" and the other in "RGB.laz", I wanted to use thepatternparameter of thelist.filesfunction to only use one of the two sets, i.e. I would have preferred to write:However, this results in the error "formal argument "pattern" matched by multiple actual arguments". As far as I understand it, this is because
readLAScatalogalready passes an argument to thepatternparameter internally. Therefore my code looks like this right now:This is of course not a big issue. I was just excited to see the hint in the documentation for the
...parameter about "Extra parameters to list.files". For me, this description seemed to mean "You don't have to use list.files explicitly here. Just pass any parameters that you would otherwise pass to list.files.".TLDR:
I would be happy if
readLAScatalogallowed its users to pass an argument to thepatternparameter oflist.files, without having to calllist.filesexplicitly. Maybe this is too much of a breaking change but in any case I think the documentation of the ... parameter toreadLAScatalogshould be extended a bit. Maybe something like"Extra parameters to list.files. Typically
recursive = TRUE. Please note that the pattern parameter of list.files is not supported."What are your thoughts on this?