r - Create a column with random decimal values -


just trying create column random decimal points between 0.001 , 0.009 i'm using code:

data$newrow <- sample(0.001:0.009,replace=t, nrow(data))

but seems produce column 0.001.

summary(data$newrow) min. 1st qu. median mean 3rd qu. max. 0.001 0.001 0.001 0.001 0.001 0.001

any ideas why?

thanks!


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

Command prompt result in label. Python 2.7 -