Question: Is there a way (using jQuery) to have the enter behave differently depending upon what textfield is currently active?

So, if I have: 

```
<input type="text" name="different" value="something" />
<button id="somebutton">Go</button>

<textarea name="something">Some stuff</textarea>
<input type="submit" name="sendit" value="Send It" />

```

I'm trying to figure out how to run a function if the user is in the and either hits enter or clicks , whereas if the user is in the textarea and hits enter, it'll submit the form... 

Sorry, I'm not entirely certain of what to call this kind of behavior, which has made googling for it difficult...

Answer: 
yes, `scale()`:

```
x <- c(1,3,4,5,7)
scale(x)

```
The function you are looking for is `scale`.

```
scale(x)

           [,1]
[1,] -1.3416408
[2,] -0.4472136
[3,]  0.0000000
[4,]  0.4472136
[5,]  1.3416408
attr(,"scaled:center")
[1] 4
attr(,"scaled:scale")
[1] 2.236068

```

Note that the answers are not identical to what you posted in your question. The reason is that the standard deviation in your x is actually 2.23, not 2. 

```
sd(x)
[1] 2.236068

```