When I use apply(notypos[ , -c(1,3)], 2 mean,na.rm=T), it presented a warning ( In mean.default(newX[, i], ...) :
argument is not numeric or logical: returning NA)
When I use apply (notypos[ , -c(1,3)], 2, sd, na.rm=T), it presented a a warning but simuanteouly presented Std (In var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm) :
NAs introduced by coercion.
Please give a fully reproducible code that can run standalone. Then only we can help you.
You can see this excellent documenation and read/see at liesure - it will be useful in future too.
str(data_1)
#> Error in str(data_1): object 'data_1' not found
summary(data_1)
#> Error in summary(data_1): object 'data_1' not found
notypos <- data_1
#> Error in eval(expr, envir, enclos): object 'data_1' not found
apply(notypos[, c("gender","grade","major")], 2,table)
#> Error in apply(notypos[, c("gender", "grade", "major")], 2, table): object 'notypos' not found
apply(notypos[,c("gender","grade")],2,table)
#> Error in apply(notypos[, c("gender", "grade")], 2, table): object 'notypos' not found
summary(notypos)
#> Error in summary(notypos): object 'notypos' not found
summary(notypos$GPA)
#> Error in summary(notypos$GPA): object 'notypos' not found
notypos$GPA[notypos$GPA>4] <-NA
#> Error in notypos$GPA[notypos$GPA > 4] <- NA: object 'notypos' not found
summary(notypos$GPA)
#> Error in summary(notypos$GPA): object 'notypos' not found
names(notypos)
#> Error in eval(expr, envir, enclos): object 'notypos' not found
head(notypos[ , 6:56])
#> Error in head(notypos[, 6:56]): object 'notypos' not found
notypos[ , 6:56] [ notypos[ , 6:56] > 6] <- NA
#> Error in notypos[, 6:56][notypos[, 6:56] > 6] <- NA: object 'notypos' not found
summary(notypos)
#> Error in summary(notypos): object 'notypos' not found
names(notypos)
#> Error in eval(expr, envir, enclos): object 'notypos' not found