As a C# developer I curious about the formula parameter in R's lm function
As in the following code
wine<-read.csv("wine_train.csv")
fit<-lm(formula=quality ~ ., data=wine)
In the help shown by
?lm
It says
formula
an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted.
In the help shown by
? formula
It says
Model Formulae
The generic function formula and its specific methods provide a way of extracting formulae which have been included in other objects.
So I am confused as to whether formula is a class or a function or an "expression" whatever that is.
In C# we have delegates, lambdas and actions that all seem useful to treat code snippets as memory variables.
R is strongly but dynamically typed where as c# is mostly statically typed
Is there a useful parallel in C# for the formula in R?
[Update]
I get that the left and right side of the tilde act as parameters to be used in lm