Correct formula

Everything related to the development of modules in jamovi
Post Reply
User avatar
yurismol
Posts: 21
Joined: Sat May 27, 2023 6:40 am
Location: Chita
Contact:

Correct formula

Post by yurismol »

Dear developers!
Please do not make like this:
formula <- as.formula(paste(paste(dep, paste0(vars, collapse ="+"), sep="~")))
This command does not handle complex variable names correctly (for example 'RBC (10^9/l)')
Please do:
formula <- jmvcore::constructFormula(self$options$dep, self$options$vars)
or at least put variable name in quotes.
User avatar
jonathon
Posts: 2821
Joined: Fri Jan 27, 2017 10:04 am

Re: Correct formula

Post by jonathon »

yup, good tip.

described in the docs here:

https://dev.jamovi.org/tuts0104-impleme ... lysis.html

jonathon
Post Reply