So, I am trying to build a artificial neural network in R, but when I try to scale my dataset, it doesn't let me and shows a error that says this :
Error in FUN(x, aperm(array(STATS, dims[perm]), order(perm)), ...) :
non-numeric argument to binary operatorIn addition: Warning message: In scale.default(yrbs_csv, center = min, scale = max - min) : NAs introduced by coercion
I have checked three different step by step guide on how to make it but can't figure out what's going on
index = sample(seq_len(nrow(yrbs_csv)), size = samplesize)
datatrain=data[index,]
Error in data[index, ] : object of type 'closure' is not subsettable
> datatrain=yrbs_csv[index,]
> datatest=yrbs_csv[-index,]
> max=apply(yrbs_csv,2,max)
> min=apply(yrbs_csv,2,min)
> scaled=as.data.frame(scale(yrbs_csv,center = min,scale=max-min))
Error in FUN(x, aperm(array(STATS, dims[perm]), order(perm)), ...) :
non-numeric argument to binary operatorIn addition: Warning message: In scale.default(yrbs_csv, center = min, scale = max - min) : NAs introduced by coercion