Object not found when running a user-defined-function

Hi, I'm just getting started with R so I was following this video https://www.youtube.com/watch?v=GnABzUtHiJo&list=PLD8eCxFKntVHFjlWz30rCeVeSFId2z49f&index=7&ab_channel=weecology to practice how to create my own functions, wrote the code the exact same way as the guy in the vid did but when I run it, R shows the message "object 'length not found", a little help please?

calc_shrub_vol <- function(length, width, height) {
area <- lenght * width
volume <- area * height
return(volume)
}
calc_shrub_vol(8,9,5)

You are just making a typo, the declared argument name is length not lenght

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.