i used the scale function to conduct a z-transformation.

i have a question in respect of a problem, calculating a mean of a column. take this data for exampel:

Code:

```
aV <- c(rnorm(20,0,1))
condition<-rep(c(1:10),2)
index<-rep(c(1:5),4)
df<- data.frame(condition,index,aV)
df$z.aV <- scale(df$aV ,center=TRUE, scale = TRUE)
```

Code:

```
> mean(df$z.aV[df$index==2])
[1] -0.3075451
```

Code:

```
> mean(df$z.aV)
[1] 9.013786e-18
```

Code:

`data$aV <- scale(data$av, center = TRUE, scale = TRUE)`

when i take a random subset, for example

Code:

`data$aV[data$index==5 & data$condition==1 ]`

Code:

```
[1] 0.45603199 -0.55385017 0.25405556 0.25405556 -0.55385017 0.65800842 1.86986702 0.05207912
[9] 0.45603199 -1.15977947
```

Code:

`mean(data$aV[data$index==24 & data$condition==1 ])`

Code:

`[1] 1.73265`

Code:

`mean(data$aV)`

Code:

`[1] 6.256592e-17`

Code:

`[1] -0.001454894`

when i only calculate the mean for index 24 separately the mean is reasonable as well:

Code:

`[1] 0.03153915`

I never had this problem before, after a z-transformation...

thank you in advance for your help (!)...i actually have no idea what the problem is here...