Suppose I have a data array,
dat <- array(NA, c(115,45,10))
How can I get a new data array
dat1<- array(NA, c(115,45)) by averaging dat by the third dimension?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try this:
the c(1,2) means keep the 1st and 2nd dimensions and apply the function (mean) over the rest (3rd).