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

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -