ez icon indicating copy to clipboard operation
ez copied to clipboard

ezANOVA: Dynamically specify the names of columns in the data frame

Open deboerk opened this issue 12 years ago • 1 comments

Hi Mike,

I would like to dynamically specify the names of columns in the data frame for the between parameter to save a lot of duplicate code, but I could not figure out how to do this with .() lists. With character vectors, this can be easily done, however, they are not allowed.

Here is an example:

Instead of using a .() list

between=.(foobar,foobaz)

I would like to specify the between parameter using a dynamically created character vector

between=paste("foo", c("bar", "baz"), sep="")

Why do references to multiple columns have to be specified as a .() list, and character vectors are not allowed?

Thanks for your help!

Regards Birk

deboerk avatar Dec 12 '12 10:12 deboerk

Hi deboerk,

this issue was just raised yesterday by rcuriosity. As I have run into this a couple of weeks ago myself, I have posted a link to a temporary solution in the comments.

crsh avatar Dec 12 '12 12:12 crsh