0

I have four(say) .Rda files where each file consists a vector of observations.

I like to compute simple mean vector whose elements computed from different file

mean1=array(0,dim=4)
for (i in 1:4){
mean1[i]= mean(readRDS(file = "i-th file "))
}

How to do this? I am using simple mean function to illustrate the my point but eventually I will do to more than one things with in a loop after using i-th file.

I read different materials like this but could not apply it here.

Janak
  • 621
  • 6
  • 23

0 Answers0