I'm trying to scale a matrix in R.
I have: 

```
maxs<- apply(rawsingle,2,max)
mins<- apply(rawsingle,2,min)

```

and then

```
scaledss<- scale(rawsingle,center=mins,scale = (maxs-mins))

```

I get the error:

> 
> 'Error in scale.default(rawsingle, center = mins, scale = (maxs - mins)) :  
> 
>  length of 'center' must equal the number of columns of 'x'' 
> 
> 
> 

Immediately following the error, I typed:

```
 length(mins)==ncol(rawsingle)

```

and it returned `TRUE`, so I have no idea whats going on.

Has anyone had a similar issue before?