gsucarrat / gets

R Package for General-to-Specific (GETS) modelling and Indicator Saturation (ISAT) methods
8 stars 5 forks source link

Sort variable names in as.lm #3

Closed moritzpschwarz closed 4 years ago

moritzpschwarz commented 4 years ago

https://github.com/gsucarrat/gets/blob/860494baf13eaccd3aef86e2e4d4fc71a7809278/as.lm.R#L35

I think the problem with the variable names is that the data that comes in is a matrix - can you try first creating a data.frame and then putting this into lm?

Of course we can change the name from yx

yx <- data.frame(y, x)
result <- lm(formula = y ~ . - 1, data = yx)