Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

added 7 characters in body
Source Link
Robert S.
  • 1.3k
  • 11
  • 17

R, (削除) 51 (削除ここまで) (削除) 45 (削除ここまで) 38(削除) 38 (削除ここまで) 37 bytes

Thanks to Giuseppe and J.Doe!

function(x)scale(x)*/(1-1/sum(x|1))^-.5

Try it online! Try it online!

R, (削除) 51 (削除ここまで) (削除) 45 (削除ここまで) 38 bytes

Thanks to Giuseppe and J.Doe!

function(x)scale(x)*(1-1/sum(x|1))^-.5

Try it online!

R, (削除) 51 (削除ここまで) (削除) 45 (削除ここまで) (削除) 38 (削除ここまで) 37 bytes

Thanks to Giuseppe and J.Doe!

function(x)scale(x)/(1-1/sum(x|1))^.5

Try it online!

added 30 characters in body
Source Link
Robert S.
  • 1.3k
  • 11
  • 17

R, (削除) 51 (削除ここまで) 45(削除) 45 (削除ここまで) 38 bytes

-6 bytes thanks Thanks to Giuseppe and J.Doe!

(s=(x=scanfunction()x)-meanscale(x))/(sum*(s^2)1-1/sum(x|1))^-.5

Try it online! Try it online!

R, (削除) 51 (削除ここまで) 45 bytes

-6 bytes thanks to Giuseppe!

(s=(x=scan())-mean(x))/(sum(s^2)/sum(x|1))^.5

Try it online!

R, (削除) 51 (削除ここまで) (削除) 45 (削除ここまで) 38 bytes

Thanks to Giuseppe and J.Doe!

function(x)scale(x)*(1-1/sum(x|1))^-.5

Try it online!

added 31 characters in body
Source Link
Robert S.
  • 1.3k
  • 11
  • 17

R, 51(削除) 51 (削除ここまで) 45 bytes

-6 bytes thanks to Giuseppe!

(s=(x=scan();m=mean(x);-mean(x-m))/(sum((x-m)^2s^2)/sum(x|1))^.5

Try it online! Try it online!

R, 51 bytes

x=scan();m=mean(x);(x-m)/(sum((x-m)^2)/sum(x|1))^.5

Try it online!

R, (削除) 51 (削除ここまで) 45 bytes

-6 bytes thanks to Giuseppe!

(s=(x=scan())-mean(x))/(sum(s^2)/sum(x|1))^.5

Try it online!

Source Link
Robert S.
  • 1.3k
  • 11
  • 17
Loading

AltStyle によって変換されたページ (->オリジナル) /