我想平方每个值data
,我正在考虑使用这样的 for 循环:
data = rnorm(100, mean=0, sd=1)
Newdata = {L = NULL; for (i in data) {i = i*i} L = i return (L)}
我想平方每个值data
,我正在考虑使用这样的 for 循环:
data = rnorm(100, mean=0, sd=1)
Newdata = {L = NULL; for (i in data) {i = i*i} L = i return (L)}