0

I am currently trying to run a for loop in R that creates las files from a vector of 530 objects (EABplots). I have downloaded lidR, rLiDAR, and the relevant packages that come along with them (sp, raster, etc.), but it still isn't allowing me to run my for loop.

My code:

plots <- seq(1:530)
for(n in 1:length(plots))
{
  plot.n <- plots[n]
  writeLAS(EABplots[[plot.n]], filename = paste(plot.n, ".las",  sep = ""))
}

Error Message:

  Error in writeLAS(EABplots[[plot.n]], filename = paste(plot.n, ".las",  : 
  unused argument (filename = paste(plot.n, ".las", sep = ""))
0

1 Answer 1

3

There is no argument filename in writeLAS(). The signature of writeLAS() is

writeLAS(las, file)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.