尺度行值忽略列
我有以下数据。Frame:
char A B C
a 1 2 3
b 300 239 444
c 15 25 32
我需要通过将行值转换为0到1之间的间隔来忽略第一列,但要将其保留在结果中。
我该怎么办?
I have the following data.frame:
char A B C
a 1 2 3
b 300 239 444
c 15 25 32
I need to normalize the data by transforming the row values into intervals between 0 and 1 ignoring the first column but keeping that in the results.
How could I do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(3)
您可以这样做:
输出:
You can do this:
Output:
您可以使用
scales :: cescale()
进行恢复连续矢量以具有指定的最小值和最大值。输出范围默认为c(0,1)
。版本2
输出
You can use
scales::rescale()
to rescale continuous vector to have specified minimum and maximum. The output range defaults toc(0, 1)
.Version 2
Output
使用
PMIN/PMAX
或其他选项是
recale
dapply-Output
数据
Using
pmin/pmax
Or another option is
rescale
withdapply
-output
data