datacamp/rdocumentation-2.0

Filtered dataframe causes critical error

pg320 opened this issue · 0 comments

pg320 commented

Hi,

I am running a fit using nlsLM, matching a function against a tibble of observed data.

The function runs fine on a particular dataset "data", but if I try to run it on a subset "data_subset" (subset using a filter statement) I get the following error:

"Error in model.frame.default ... invalid type (list) for variable"

The two tibbles look identical to me, using str(data) and str(data_subset), and I cannot work out where the list is coming from.

I was wondering if anyone had encountered this problem before and what I can do to resolve it?

Parmesh