M
M
Mikhail012017-05-05 10:36:06
USB
Mikhail01, 2017-05-05 10:36:06

How to find the arithmetic mean of each column of a csv file using RStudio and write those values ​​to an array?

I tried in different ways but the same error occurs. Please tell me how to fix this.

> load("C:/clust.RData")
> m<-9358
> n<-15
> k<-1:n
> for(j in 3:n)
+ M[j]<-mean(air[,j])
Error in M[j] <- mean(air[, j]) : object 'M' not found
In addition: Warning message:
In mean.default(air[, j]) :
  аргумент не является числовым или логическим: возвращаю NA
> M[j]
Error: object 'M' not found

> load("C:/clust.RData")
> m<-9358
> n<-15
> k<-1:n
> for(j in 3:n)
+ for(i in 2:m)
+ M[j]<-c(mean(air[,j]))
Error in M[j] <- c(mean(air[, j])) : object 'M' not found
In addition: Warning message:
In mean.default(air[, j]) :
  аргумент не является числовым или логическим: возвращаю NA

> load("C:/clust.RData")
> A<-data.frame(air)
> m<-9358
> n<-15
> k<-1:n
> for(j in 3:n)
+ for(i in 2:m)
+ M[j]<-mean(A[,j])
Error in M[j] <- mean(air[, j]) : object 'M' not found
In addition: Warning message:
In mean.default(air[, j]) :
  аргумент не является числовым или логическим: возвращаю NA

air is the csv format file that I imported

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2018-06-23
@NeiroNx

Through "disk management" format or delete and create a new partition.

S
sim3x, 2017-05-05
@sim3x

stackoverflow.com/questions/27886839/what-does-err...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question