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

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -