Why map function in named tuple is outputing only one item

Hello, good afternoon

Why this named tuple is being outputed with a single mean when using map function?

	aq = readdlm("data.dat")
	data = (set1=(x=aq[:,1], y=aq[:, 2]),
			set2=(x=aq[:,3], y=aq[:, 4]),
			set3=(x=aq[:,5], y=aq[:, 6]),
			set4=(x=aq[:,7], y=aq[:, 8])
	)

      mean(s -> mean(s.x), data)

In my understand the output needs to be a vector of means

mean() returns a number. Maybe you want mean.()?

1 Like

no, my bad. I used mean when I needed used map

But thank you to show me the issue.