Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

How is possible that X is acting like a vector and a concrete variable at the same time (R)?

$
0
0

I'll use the following code example:

minmax_norm <- function(X) {
  (X - min(X))/diff(range(X))
}

dSeeds_minmax <- apply(dSeeds,2,minmax_norm)

How is possible that X is acting like each column of the dataframe and also is acting as each variable of the column? I mean min(X) is the minimum value of the column but X - min(X) is the current value of the variable minus the minimum value of all the column.

Thanks for your attention.


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>