swirldev / swirl_courses

:mortar_board: A collection of interactive courses for the swirl R package.
http://swirlstats.com
Other
4.32k stars 7.24k forks source link

Wrong answer in [R Programming][Functions] #433

Open AlexandreBeaudoin opened 5 years ago

AlexandreBeaudoin commented 5 years ago

The following accepts an invalid answer, it should only accept (0), but accepts (4,0)

| Now try using evaluate() along with an anonymous function to return the last element of the vector c(8, 4, 0). Your anonymous function should only take one argument which should be a variable x.

> evaluate(function(x){x[-1]}, c(8, 4, 0)) [1] 4 0

| Great job!

wincross commented 5 years ago

I experienced the same issue.

erntan commented 2 years ago

I still see this issue as well.